User avatar
peepo
Posts: 305
Joined: Sun Oct 21, 2012 9:36 am

howto improve frame rates >2fps ?

Mon Jun 10, 2013 1:43 pm

has anyone examples of frame rates in the range 5-90 fps using raspistill?

in my tests using bright cloudy sky
I tried a variety of timelapse intervals from 12 to 100
with a range of times from 300 to 6000
using both the default format and 640x480

eg /opt/vc/bin/raspistill -t 3000 -tl 100 -o test%d.jpg

in all cases the number of images captured reflected t/tl ie 30 in the above example.

However in all cases the maximum frame rate was ~2fps
with very little variation.

is there a guide anywhere?

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

Re: howto improve frame rates >2fps ?

Mon Jun 10, 2013 2:06 pm

You will not be able to get fast frame rates in raspistill at high resolution. The sensor itself can do 15fps in full resolution stills mode, but the bandwidth inside the GPU and transfering data to the ARM cannot keep up with that. There are difference in the way that stills and video are handled internally and captures do a lot more work switching to and from different resolutions which takes quite a bit of time. That time is independent of the resolution of the captured image, so you alsways have that limitation whatever size of image you capture. Video simply streams one resolution. So video will also be able to stream more bandwidth than captures.

2fps at full resolution would be a decent frame rate I think, and probably close to the best possible.

Of course, once you get to that speed, you are not leaving any time for the system to work out exposures etc, so the picture quality will likely suffer.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

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

Re: howto improve frame rates >2fps ?

Mon Jun 10, 2013 2:27 pm

peepo wrote: is there a guide anywhere?
Full manual here:

https://github.com/raspberrypi/userland ... amDocs.odt

I made an RTF version here:

https://dl.dropboxusercontent.com/u/243 ... Docs-1.rtf
Android app - Raspi Card Imager - download and image SD cards - No PC required !

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: howto improve frame rates >2fps ?

Mon Jun 10, 2013 2:37 pm

Actually I had converted the contents of that Word doc into a markdown README to replace the README stub on the userland repo, but they never approved my pull request.

See here: https://github.com/towolf/userland/blob ... /README.md

User avatar
peepo
Posts: 305
Joined: Sun Oct 21, 2012 9:36 am

Re: howto improve frame rates >2fps ?

Mon Jun 10, 2013 3:10 pm

jamesh,

raspiyuv should be able to pipe or blat the data out at 90fps for some format surely?
without -tl this is hard to test...
with no processing where is the constriction?

else how to improve frame rate?

as per title that is the guide I seek...

I did try -w 640 -h 480 with no improvement afaict.

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

Re: howto improve frame rates >2fps ?

Mon Jun 10, 2013 3:22 pm

peepo wrote:jamesh,

raspiyuv should be able to pipe or blat the data out at 90fps for some format surely?
without -tl this is hard to test...
with no processing where is the constriction?

else how to improve frame rate?

as per title that is the guide I seek...

I did try -w 640 -h 480 with no improvement afaict.
YUV has gone through the same processing as JPEG, just without the encoding stage. So its a standard capture, with all the overheads of stills capture.

Are you thinking of RAW mode?

And there are no 90fps modes yet. Video mode current has a max of 30fps. We hope to have 60 and 90 fps modes in the future, but at the moment I am not able to work on the camera firmware.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
peepo
Posts: 305
Joined: Sun Oct 21, 2012 9:36 am

Re: howto improve frame rates >2fps ?

Mon Jun 10, 2013 4:44 pm

jamesh

This application needs to process pixel data:

I'm looking for the fastest way to get pixel data out, in frames per second,
not to SD card, but read and write to buffer in memory for processing,

hence my queries around information on programming the ISP to return ROI,

unfortunately both jpg and h.264 use up considerable processing power to - convert or demux - to bitmap YUV, RGB or whatever.

current raw is limited by jpg speed,
see Raw Output Information
http://www.raspberrypi.org/phpBB3/viewt ... 05#p364905

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

Re: howto improve frame rates >2fps ?

Mon Jun 10, 2013 5:09 pm

OK, you probably need to adapt raspivid to send uncompressed buffers directly to the Arm, in effect doing something similar to what raspiyuv does.

BUT, you will need to reduce the bandwidth dramatically for this to work, either fps or frame size or both. I'd start at 320x240p30, see if that works, and work up until it no longer works. If you assume 30MBits/s as a max datarate (might be able to get a bit more), you can work out what speed/size you can get.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

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

Re: howto improve frame rates >2fps ?

Mon Jun 10, 2013 6:00 pm

You may have to get your hands dirty with code to get access to the frames faster than 2-3 fps,
but people have already made progress there:

http://www.raspberrypi.org/phpBB3/viewt ... 2&p=364358

MMAL:
https://github.com/raspberrypi/userland ... rface/mmal

http://www.jvcref.com/files/PI/document ... index.html
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
peepo
Posts: 305
Joined: Sun Oct 21, 2012 9:36 am

Re: howto improve frame rates >2fps ?

Tue Jun 11, 2013 7:30 am

jamesh

is it correct that for the present, it wont be possible to improve on 30fps, as that is the default video frame rate.
ie using mmal or any other method,
irrespective of the format....

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

Re: howto improve frame rates >2fps ?

Tue Jun 11, 2013 9:40 am

peepo wrote:jamesh

is it correct that for the present, it wont be possible to improve on 30fps, as that is the default video frame rate.
ie using mmal or any other method,
irrespective of the format....
At the moment, that is correct - the fastest mode we have got working is 30fps, irrespective of frame size. We do have the register sets for higher frame rates (VGA sized I think), but they don't work (black frames), and I don't have time right now to determine why.

James
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
peepo
Posts: 305
Joined: Sun Oct 21, 2012 9:36 am

Re: howto improve frame rates >2fps ?

Tue Jun 11, 2013 6:10 pm

jamesh,

is there a way to send only 'y' data to buffer?

to elaborate, have MMAL running using tasanakorn
at 1280x720 ~22fps

"assuming 30MBits/s as a max datarate"

this might provide 50% boost to 30fps...

johngilbrough
Posts: 1
Joined: Wed Nov 02, 2016 8:15 pm

Re: howto improve frame rates >2fps ?

Wed Nov 02, 2016 8:49 pm

Now that it's 2016, Is a still frame rate for the ribbon PiCamera of 90FPS or better possible?

User avatar
peepo
Posts: 305
Joined: Sun Oct 21, 2012 9:36 am

Re: howto improve frame rates >2fps ?

Thu Nov 03, 2016 6:46 am

iirc it is,

did you try openGLES?

Return to “Camera board”