Image acquisition-skipping frames
2 visualizzazioni (ultimi 30 giorni)
Hello, I am working on a program that starts capturing frames whenever it receives a signal from a remote computer and stores it as a TIFF stack. It stops recording whenever it receives the appropriate signal from the remote computer.
For shorter durations (~15s-30s), all the frames are stored. However, for longer durations (~5 min), it is losing frames. I have tried increasing the frame memory but it does not seem to be helping. I have reliably determined that it is receiving the correct signal, and that the stop function (stop(vi)) is being called.
The images are of size 512*512.
Walter Roberson il 28 Mag 2012
If you are storing the images to disk as you go, you are going to end up with frames dropped (unless perhaps you are using a solid state disk.) Disks are much slower than main memory.
Geoff il 29 Mag 2012
Those images are 512 * 512 * 1 ? That's 256kB. These are small. What is your frame rate? I'll assume 50 fps. That's 12.5 MB per second. Peanuts for a single hard drive to cope with. A drive would still manage that at around 300 fps.
You say TIFF stack. I'm not up with the terminology here.. Is that a single file containing all frames? How often do you write this file? Once at the end, I'd hope? If not, then do that and see if you still have a problem.
Otherwise, I would be storing one image per file and see how you go with that. If there's a bottleneck encoding the file, then write out the binary data raw and process it later.
If you're pushing disk limits you need to be extremely efficient in how you write data. If you're not pushing limits, and still having trouble, then you're probably being very inefficient somewhere.