10-06-2015 01:15 PM
Hi,
If I had to guess, you might be skipping frames during the acquisition and this would cause your frame rate during playback to appear faster. If you post your code it might be easier to spot the problem.
10-06-2015 01:30 PM
10-06-2015 11:39 PM - edited 10-06-2015 11:39 PM
Attached is a zip file of the software I am working on. Sorry it might be a little messy, but it should be readable.
After thinking about it tonight, I know exactly what is going on. The images are actually references to the image buffer. I was treating them like the were image data and not references. Since the program uses a producer-consumer pattern, the program wasn't writing every image to the avi file, but rather whatever reference was available at the time. This was creating the jitter because I was only putting some frames into the AVI file.
At one point I even tried waiting until I "acquired" all the images by running the save to disk loop last. Of course, I only ended up with the last image for the entire duratoin of the AVI movie.
Once I realized this, then I created 500 buffers to extract the image from. This helped, but it still isn't quite right. I imagine that the buffers get filled with new references before my consumer loops can consume them all. The bottleneck is the amount of time that the IMAQ AVI2 Write Frame.vi takes to write the frame to the file. While it is saving the image reference is getting written over.
Also, this is what is causing the last image to be written to the AVI file for the majority of the movie.
Am I going to be able to write every frame to disk during a live acquisition? Or will I have to do something like save the data to a binary file and convert the binary file data to AVI after acquisition?
10-06-2015 11:42 PM
Here is a link to the video I referenced in my last post: https://youtu.be/VzavEuHGWS8
10-07-2015 11:19 AM