LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Too fast video grabbing IMAQdx

Hello,

 

I have a small program for grabbing .avi videos with IMAQdx (See attachement). I use a 3rd party mini USB camera with HD quality, 1 MPixels. My problem is that video is too fast. The speed is about 2 times faster than normal. I try to adjust the framerate down, but at some point it will be too few samples/second and video will stutter. I have also tried to put a "Wait" and "Wait until next.." function in loop and adjust the time, but it doesn't affect at all the speed of video. What is wrong? What can I do to "tune" the video to correct speed?

 

br,

paalbrok 

0 Kudos
Message 1 of 4
(2,006 Views)

Hey, 

 

Have you had a chance to look through this other forum post that goes through a similar matter?

      - https://forums.ni.com/t5/LabVIEW/Record-and-playback-video-in-slow-motion/td-p/2782682

 

Would this be something that you could work with?

 

Best regards,

Geo

0 Kudos
Message 2 of 4
(1,957 Views)

IMAQdx uses a slightly different "clocking" method to control Image Acquisition.  First, there is the rate at which Images are acquired by the Camera, i.e. its Frame Rate.  This is an Acquisition Attribute defined by the GenICam standards (assuming your Camera supports this).  Now all that you need to do is to make sure that the IMAQdx Get Image waits until an entire Image has been acquired.

 

I usually do this by specifying multiple buffers for the Camera and setting Get Image to return when the Next buffer is filled.  It is also possible (although it is not easy to find documentation for this) to use an Event Structure and fire an Event when the Buffer Number changes (you'd use the Actual Buffer Number in this case).

 

Bob Schor

0 Kudos
Message 3 of 4
(1,947 Views)

Here's some example code using the WebCam on my Laptop.  When I open it in MAX and look at Camera Attributes, it shows me that it is set to 30 FPS.  When I run this code and give it 60 frames (about 2 seconds worth), it computes a Frame Rate of 29.6 (it's a little variable, but this is an inexpensive WebCam in a laptop, and the result is pretty close to the expected ...).

Measure FPSMeasure FPS

Bob Schor

0 Kudos
Message 4 of 4
(1,939 Views)