The example demonstrates how to save acquired images to a AVI video.
The example is based upon the standard Low-Level Grab Async example from the LabVIEW example finder.
The image acquisition is asynchronous since the IMAQdx Configure Acquisition is configured to use multiple image buffers and the image buffer is read with IMAQdx Get Image when an event has been triggered. To accomplish this a dynamic event has been created that triggers whenever the IMAQdx driver reports that a new image has been recorded.
The acquired images are then recorded into a AVI video file. AVI is a container format that can use different codecs with different characteristics regarding encoding and decoding speed as well as compression efficiency. Not every Windows system features the same set of possible video codecs, therefore the IMAQ AVI2 Get Codec Names function reads the available codecs so the user can decide which codec to use. For simplicity the example uses the first available codec.
LabVIEW 2012 Base Development System (or compatible)
Vision Development Module 2012 (or compatible)
NI-IMAQdx 4.0 (or compatible)
NI-IMAQdx driver supports the following buses and standards: Gigabit Ethernet Cameras Supporting GigE Vision, FireWire IEEE 1394 Cameras, USB 2.0 Cameras Supporting Microsoft DirectShow (often called 'webcam'), USB 3.0 Cameras Supporting USB3 Vision
Steps to Implement or Execute Code
Open the attached file
Select the path to the AVI file
Select the camera name
Run the VI
Activate the Record button to start writing image frames to the AVI
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text 'NIVerified'. Read here for more information about the new Example Guidelines and Community Platform.**