Hi @ovinc
here is some further information regarding the RingBuffer:
https://forum.commonvisionblox.com/t/where-does-the-image-point-to-using-rgbufferseq-with-numbuffers-1/140/5
https://forum.commonvisionblox.com/t/getting-started-with-cvb-net/246/14
And the online reference:
https://help.commonvisionblox.com/NextGen/14.0/md_scripts_main__a_p_i__overview.html
Basically whenever you start your Stream, the buffers of the RingBuffer will be filled with image data until its either full and you get lost images (can be checked with the acquisitions statistics on the Stream) or you do a wait() or wait_for() call on the Stream.
Every wait() will leave you with a more or less actual image from your ringbuffer thus unlocking this part of the buffer for new image data to be filled with.
In a best case szenario you dont have to cache your images in the buffer as your processing is slightly faster than your acquisition or you trigger your camera thus only taking a new image once your processing is done.
There are use cases however, where you want to have high frame rates for a limited amount of time to acquire images that you want to process later on.
With the Ringbuffer you can do exactly that.
Eg. acquire images into a RingBuffer with NumBuffers = 1000, to keep 1000 images in the RAM and once your recording is done (or parallel to the recording) process your images. This way you are (almost) not limited with your fps.
In your case, you only need to be aware that the wait() has a default timeout of 10s.
You should also always check, if you still have buffers pending.
In a best case szenario you wait_for(13000ms) and get a timeout exception if there were no new image data within this interval, or a new image (within 12s) to process.
In your case however we have intervals between 1s and 12s, which is no problem, as long as your processing is always faster than the shortest interval between images.
If at any time your processing and thus the interval to the next wait() call COULD take longer than 1 second, you do not simply want to call another wait() as you still have image data in the buffer, which is the image that was taken while you were still processing.
This effect will now add up to the point where all your buffers are full and you start loosing images.
I hope this information is what you needed, in any case just let me know if you need further information.
Cheers
Chris