Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Is there a way to check how full a ring buffer is?

I am using the IMAQ C library, and am using a ring buffer to acquire images continuously. I am creating a function for storing image data to the disk until you call the function to stop the storage. At that point, I'd like to see how many unprocessed frames are currently in the ring buffer, and store that many more frames before closing the file. I do not want to stop acquisition of frames. Is there a way to check the number of filled image buffers in the ring?

0 Kudos
Message 1 of 3
(1,186 Views)

In LabVIEW, there is a property node called Last Valid Buffer, which gives you the index of the last image acquired into the buffer.  This sounds like what you want.  I assume there is an equivalent value available in C.

 

Bruce

Bruce Ammons
Ammons Engineering
Message 2 of 3
(1,179 Views)

Ah - It looks like "imgSessionStatus" returns the value of "the last available buffer list index". I was unsure of what this meant, but it sounds like what you've just described. Thanks!

0 Kudos
Message 3 of 3
(1,173 Views)