05-19-2009 02:38 PM
Hello all,
I am having trouble making a video. The jist of my project is that I am processing incoming frames from a camera after a grab in a loop. The processing varies the time so I get a frame rate of between 10 to 30. I am able to capture video and store in an AVI with just a grabber in a loop and all that. But when I try to make a video of the processed frames, the process time jumps up to 200 - 600 ms per iteration of the loop, and the video it gets is completely distoreted. I thought it was possible that since the frame rate needs to be set in the write frame to avi VI, maybe that was messing it up. I tried a number of different things, like sending the info to a shared variable and writing from another vi, but it did the same thing, so I really have no clue what is wrong. If anyone knows how to fix this, and more importantly, what exactle the problem is, I would be very grateful.
labview 8.2
Vision (newest, I think 8.6)
Matt
05-19-2009 02:43 PM
05-21-2009 11:42 AM
Randall,
Here is my code. There are a bunch of sub vi's and fuzzy controllers that are not aded, this just shows how we tried to record. Please let me know if I can help. It is a bit of a mess, we need to optimize, but hopefully it isn't to confusing. Thanks a lot for your help.
Matt
05-22-2009 10:29 AM
I do not have the time it would take to decipher the code you posted. If you want any help in these forums, you need to clean it up so that those who are volunteering to help can do so.
You left out several vis that might contribute to the performance problems. You are displaying many images at once which can also slow things down.
My suggestion is to open a new vi and copy pieces of your code one at a time to the new vi, cleaning up as you go (establishing left to right flow, grouping vis into subvis, especially duplicated functions). Check the timing as you add new pieces until you start seeing performance issues.
05-22-2009 11:56 AM
Hi Matt,
Your code is quite difficult to follow.
What is the 'processing' you are doing before writing to AVI? If you write the images directly to file, are they corrupted? If you cut down the processing, do they work?