What is a good amount of buffers to push for continuous mode?

Hi,

I have a Point Grey Research-Blackfly BFLY-PGE-50A2M camera that I’m using in continuous mode with software trigger. I’m using C++. At construction, I create an ArvStream and push some buffers to that steam.

I’m wondering how I decide how many buffers should be pushed for continuous mode? In the software trigger callback, I always pop the buffer, do my image processing, and then push one new buffer to the stream.

In the arvcameratest.c code, 50 buffers are pushed. Why 50?

Thanks,
zjeffer

Hi,

It depends on how you are processing the buffers. If you process them synchronously in the callback handler, 1 buffer should be enough, as you are blocking the receiving thread.

If you process them asynchronously, 2 buffers is better, as you can process one when another is being filled.

If the buffer process duration is highly variable and sometime longer than the acquisition period, you may have to increase the number of buffers.

For no solid reason, it is a test code.

Emmanuel.

1 Like

Is there a downside to setting it to 5 or something, just to be safe?

Bumping thread… I have this question too. Why not use 10 or even 100 buffers?

If the buffer process duration is highly variable and sometime longer than the acquisition period, you may have to increase the number of buffers.

@Emmanuel And what can cause the buffer process duration to be variable?

It depends on what the user is doing with the buffer. Aravis process time is constant.

Emmanuel.