Save Images and Video in LabVIEW Using NI-IMAQ Functions

Updated Aug 20, 2018

Reported In

Software

  • LabVIEW

Driver

  • Vision Acquisition Software
  • NI-IMAQ

Issue Details

  • I want to save the images that I acquired with the NI-IMAQ or NI-IMAQdx driver from NI Vision Acquisition Software (VAS), but I do not have the NI Vision Development Module for LabVIEW. What are my options for saving images as pictures or videos in LabVIEW using only VAS?
  • I am using VAS to obtain images, and I want to save the images as a video file. What options do I have? What video file format can I use?

Solution

In LabVIEW, there are functions to save images as various files types. You can save an image as a JPEG, BMP, TIFF, or PNG file type, and you can save images in an AVI video format.
 

Save as Image

  • Use the IMAQ Write File 2 VI.  This VI will allow you to save images as JPEG, BMP, TIFF, or PNG files. 

These VIs are located in the Functions Palette under Vision and Motion»Vision Utilities»Files.
 

 
Save as Video

  • Use the AVI functions located in the Functions Palette under Vision and Motion»Vision Utilities»Files»AVI.  These functions will allow you to save a sequence of images to an AVI video file and read AVI files.
 

Additional Information

Examples of how to configure and save to both Image and AVI files can be found in newer versions of LabVIEW in the NI Example Finder.  Once the Example Finder is open, simply navigate to Hardware Input and Output » Vision Acquisition » IMAQ » File Input and Output to find example code that shows how to properly configure the save process. The three examples are Grab and Save to AVI.viSequence and Save to AVI.vi, and Snap and Save to File.vi.    

WAS THIS ARTICLE HELPFUL?

Not Helpful