06-23-2011 03:47 PM
Hello,
I'm taking a video from a Basler A504K camera of well plate bottoms deflecting down. I have a frame rate indicator from the Vision Acquisition to see at what fps the camera is acquiring images, and I also have a frame rate controller at the IMAQ AVI Create VI.
The problem is when I set the frame rate at the Create VI. The higher I set the frame rate, the fewer frames it seems to take. For example when I play the videos on Windows Media Player, at 10fps, the video length is 60s. At 100fps, the video length is 6s. At 20fps, it's 30s, and at 50fps, it's 12s. Obviously, the video length decreasing by the factor by which I increase the fps. But since higher frames per second videos show a slower/longer videos, since they have more images to display per second?
I need to be able to see a slow increase and decrease in the well deflections smoothly. At high frame rates, the video goes by so fast that I cannot analyze the deflections. At low frame rates, the video is slower, but there are too many missing frames so the deflection is not smooth (ie. you see no deflection one second, and the next, you see the peak deflection without seeing the gradual increase in deflections). It is very hard to find an "ideal" frame rate, so I was wondering if there was another way to control the frame rate such that I have high fps, and longer video lengths?
I'm attaching my VI. The bottom loop is where all the Video and Camera controls are. The top loops is to control pressure gauge and valve (just ignore that loop)
Thank you,
B.J. Kim
University of Michigan
06-27-2011 10:06 AM
Hi B.J. Kim,
The problem you're seeing with the fps and video length makes sense to me. If you keep the overall frame count constant and change only the rate of playback, then the video time will be indirectly proportional, as you have noticed. Just from simple math, it appears like you kept the video image at a constant of 600 total frames while changing the frame rate between 10, 20, 30fps, etc. If you're looking to have more resolution in you video, maybe you could increase the actual frame rate of acqusition from your camera. You may also try placing a small millisecond wait in your while loop to slow down execution speed.