LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling frame rate of camera

Is it possible to input frame rate in decimals like 0.024 or 2.9 during image acquisition from camera? 

0 Kudos
Message 1 of 6
(3,195 Views)

The LabVIEW IMAQ function IMAQ AVI2 Create has a U32 Input "Frames per second".  Any float you wire to this input will be coerced to an unsigned integer.  My guess (in the absence of doing a Web search) is that this is a "feature" of the AVI API that playback speed is required to be an integer.  In principle, there is nothing to prevent you from playing the AVI at any speed you wish, capturing individual Frames, and saving the individual Frames as a sequence of Images that you can render at any speed you wish.  You will probably have a larger file, as you will lose some of the compression between frames that AVI affords, but you now have finer control over playback speed.

 

Bob Schor

0 Kudos
Message 2 of 6
(3,158 Views)

Thank you for your replay. But to Visualize the test specimen accelerating at a partikular eigen frequency, we have to capture the frames at a partikular rate. Speed of video or size to that matter does not impact.

0 Kudos
Message 3 of 6
(3,155 Views)

Ah, that's a different question!  If the acquisition rate is sufficiently slow, you should be able to acquire at (more-or-less) any rate you want by doing single acquisitions in a loop with an appropriate Wait (ms) delay in it to set the "Frame Rate".  I don't see any reason you wouldn't be able to write this out as an AVI, with the Frame Rate only referring to the AVI playback speed (but you don't care, as you are interested in individual frames).

 

Bob Schor

0 Kudos
Message 4 of 6
(3,124 Views)

Thankyou. To be precise, if the eigen frequency of my sample is 35.8 Hz, i need the frame rate to be 35.75 or 3.57. And this eigen frequency is different in each sample. so my question is , is it possible to give frame rate as 35.75 or any other decimal number as i wish.

0 Kudos
Message 5 of 6
(3,111 Views)

Do you know the difference (in IMAQdx) between "Snap" (as in "Snap a picture with your still camera") and "Grab" (as in "Grab some frames with your video camera"?  "Grab" puts the issue of timing of the acquisiition in the Camera (where the timing of the first frame is not well-controlled, but the spacing between frames should be fairly accurate and precise).  Presumably a "Snap" will have a consistent (but unknown, at least until you attempt to measure it) latency between issuing the Command and acquiring the Image.  An interesting Thought Exercise is to figure out a way to measure this latency ...

 

So if you determine that Snap at least has an unknown, but fixed, latency, you could take frames at whatever (low) frequency you desire.  I'm not sure I would save them as AVIs, as that format (I think) assumes some frequency of acquisition, which might have an impact in the way the compression works (maybe, or maybe not -- you might need to do a little research on this).  

 

Bob Schor

0 Kudos
Message 6 of 6
(3,087 Views)