Showing results for 
Search instead for 
Did you mean: 

post event saving of images

Go to solution
Hi all, We are trying to save some images but only after spotting an event. This way we do not end up with huge data sets due high frequency imaging. Our idea is to use some sort of a buffer. We would really appreciate any hints on how to approach this issue. thanks in advance
0 Kudos
Message 1 of 5

Can you define the event? Front panel event? Trigger from sensor? Software trtigger?

0 Kudos
Message 2 of 5



the event meant here is a biological event. between the event happening and pressing save we will lose a number of frames (important ones). So we would like to keep a certain amount of frames in memory.

in other words, we would like to save the past frames rather than the once yet to happen.




0 Kudos
Message 3 of 5



if you want to realize such a functionality, you have to create an array temporary memory location for an image. This means, you have to use the IMAQ create VI many times and save the output of the VI (New Image) in a buffer. now, you have to save the pictures within the array. The array should have the functionality of an ringbuffer. (Overwrite the oldest picture if the array is "full of pictures"). If an Event occurrs, you can save the pictures you need (actually the pictures are in the temporary memory). Be careful realizing such a functionality, because all the pictures of the ringbuffer are saved in the RAM, so you have to make sure that the buffer is not getting too full.


This could be a way how to realize such a functionality, I hope I understood your question correctly. 



Best Regards, Fabian

0 Kudos
Message 4 of 5
Accepted by mssm22

We use IMAQdx to capture images at 10 frames/second of biological activity in mice.  We have an external sensor that tells us when the event we want has occurred, and we save videos from 2.5 seconds before the event to 5 seconds after.  And we do this for 24 mouse stations running simuultaneously, with a recording session lasting about two hours (requires 24 cameras, of course ...).


The basic technique is to configure a number of buffers in the camera (actually, in the driver, I suspect).  We save the buffer numbers in a lossy queue, and when we get a signal that an Event has occurred, we start emptying the Queue (which contains buffer numbers -- we get a buffer number, use that to pull up an image, and write that to an image file) until we have saved the proper number of images (75, in the example above).



0 Kudos
Message 5 of 5