Software Archive
Read-only legacy content
17061 Discussions

Lowering framerate to lower overhead

John_M_9
Beginner
797 Views

Hi All,

I would like to get data out of the camera at a lower rate than 30 fps.  Maybe 10fps, or on demand.  My application does not need data very fast, and getting data at 30 fps wastes power and resources.  I have tried to acquire frames, not in a thread, which runs at 30 fps, but in a routine that I call, say at 10 fps, or on demand.  While that gets me data at a lower rate, it is still streaming in at 30 fps on the USB connection, and using all of the associated resources.  Is there a way to slow it down, coming from the camera itself?

Thanks!

John

0 Kudos
3 Replies
samontab
Valued Contributor II
797 Views

Hi John, when you enable the streams you can optionally specify the frame rate as well.

Have a look here:

https://youtu.be/wIkIdjN6Oyw?t=4m15s

0 Kudos
John_M_9
Beginner
797 Views

Hi Samontab,

Correct me if I'm wrong, but as far as I can tell, the lowest you can set the frame rate is 30 fps.  That means the camera is sending up a lot of data 30 times/sec.  I want to get data at a much slower rate, as I said, 10fps, or on demand.  I don't want to use the overhead of all that data coming up when I don't need it.

John

0 Kudos
samontab
Valued Contributor II
797 Views

mmm, it seems you're right:

"The AcquireFrame function waits until some data is available for processing"

So, it is not asking for a new frame, but just a blocking command that returns whenever a new frame is available. And this seems to be the only way of acquiring images, so no luck there.

This means that you need to have a look at the streams definition to change the frame rate, and not the frame acquisition method. Have a look at the more comprehensive function EnableStreams (instead of EnableStream), which may allow you to get a better stream for your application.

For example, to get a slower frame rate, you could use the synchronized streams method, which will run as slow as the slowest stream available.

Also, try different values for the fps as maybe some are invalid while others are valid. For example maybe 10 doesn't work, but 15 may work. Make sure to get the list of all available configurations for your stream.

0 Kudos
Reply