dodamn
Posts: 15
Joined: Wed Sep 25, 2013 8:33 am

Can raspistill take photos at 10 fps or more faster speed?

Wed Sep 25, 2013 9:30 am

I know that storage writing speed is bottleneck.

But.... If storage writing speed were infinte, how many photos does raspistill take per a second for high/full resolution?

For example,

# raspistill -o %04d.jpg -t 10000 -tl 100

Does the above command produce 100 photos?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23338
Joined: Sat Jul 30, 2011 7:41 pm

Re: Can raspistill take photos at 10 fps or more faster spee

Wed Sep 25, 2013 9:43 am

Storage isn't the only limitation - there is memory bandwidth, and the pixel speed of the ISP to add to that, plus the maximum speed of the camera module itself.

There is a theoretical top speed, based on the pixel rate, which I cannot remember - I'll try and find out.

It all comes down to how big your image is - full sensor resolution? Cropped?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Can raspistill take photos at 10 fps or more faster spee

Wed Sep 25, 2013 10:40 am

You can remove the SD card writing speed "bottleneck" by writing to a ramdisk:

raspistill -o /run/shm/%04d.jpg -t 10000 -tl 100

but that doesn't get you many more frames per second (2-3fps) as that's as fast as raspistill goes.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 23338
Joined: Sat Jul 30, 2011 7:41 pm

Re: Can raspistill take photos at 10 fps or more faster spee

Wed Sep 25, 2013 11:11 am

The theoretical max throughput of the ISP is 200MPixels/second. But in practice this is 150-160Mpixels/second.

So, when you have a full res image from the Raspi sensor, at 2592x1944 pixels = 5MPish. Which you might think would be about 30fps. (150/5). But the camera can only do 15fps at full resolution, and there are multiple overheads inside controlling code that also limit fps. For example, the time taken to switch from preview to capture mode (1080p to full resolution) is at least one frame, and there is also the time to switch back, so you lose two frames at least (at 15fps). Now add the overhead of transferring the data around the system (the big one is GPU to the ARM) and you can see why things are much slower than theory might indicate.

More modern smartphone camera are able to capture at full resolution at preview frame rates (i.e. 30 fps). A faster ISP would be able to accept data at this speed, so no mode changes would be necessary - this is how things like zero shutter lag and the ability to take multiple pictures around the time the button is pressed and pick the best work - the ISP is constantly receiving full frames so can just pick and chose the one it wants. This is actually easier to handle - much less state changing going on - providing the CSI-2 peripheral and ISP and memory bandwidth allows it. It actually make video easier too - no video mode - just run the camera at full rez and scale down to the required video resolution.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

mikerr
Posts: 2774
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Can raspistill take photos at 10 fps or more faster spee

Wed Sep 25, 2013 11:21 am

Not raspistill, but using the V4L driver the author says he can get photo frame rates from the raspicam at:
RpiName wrote: ~30 fps at 320x240, 20 fps at 640x480, 6 fps at 1280x960 and 3fps at 1920x1088.
http://www.raspberrypi.org/phpBB3/viewt ... 2968#p4029

Had a quick go with his code, and displaying frames in a window obviously slows it down alot, but I was able to get an opencv display of 640x480 at 10fps / 320x240 @ 15fps
https://github.com/mikerr/piVision/blob ... amtest.cpp

Return to “Camera board”