Example Code

IMAQdx Grab and Save Individual Files

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • Vision Development Module
  • LabVIEW

    Driver

  • NI Vision Acquisition Software

Code and Documents

Attachment

Overview

The example demonstrates how to acquire images and save them to series of images or a video.

 

Description

The example shows how to use an IMAQdx Get Image to save each frame as an individual image file (formats: BMP, JPG, PNG) or a video (format: AVI). In case the frames of the camera acquisition are saved in image files the file name is automatically incremented.

 

Requirements

 Software

  • LabVIEW 2012 Base Development System (or compatible)
  • Vision Development Module 2012 (or compatible)
  • NI-IMAQdx 4.0 (or compatible)

 Hardware

  • 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

  1. Open the attached file
  2. Select the file format to save the images to
  3. Select the path where the file(s) are saved to
  4. Select the file name
  5. Select the camera name
  6. Run the VI

 

Additional Information or References

Acquire Image from Camera and Save to Image or Video - Front Panel.png

 

Acquire Image from Camera and Save to Image or Video - Block Diagram.png

 

 

**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.**

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
easayed
Member
Member
on

Dear All

i just tried this vi it works well

thank you so much

chetouanic
Member
Member
on

hello 

i have labview 2011 it didn't work for me 😕 can you tell me how to fix it ? thank you 

funan89
Member
Member
on

Hi, I used your example VI "Grab and save to jpg".
Everything works fine, but I only see blue images. This happens with both my cameras, a "ZWO ASI290MM", and a "Tuscen IS300". Both of them work fine with their native image viewer software. However in labview it only gives blue image.

Does anyone face this problem too?
Capture.PNG

I have edited the sub VI to test it out, and the image returns a blue screen even when I link the IMAQ temp memory storage straight to the indicator. Below is the edited VI. (I get the blue screen even when using the unedited version), also the blue image and the numbers below fluctuates a little using both the edited and unedited VI, which is strange cause the same data goes into the while loop. 
Capture.PNG

Bylka
Member
Member
on
hey i tray to acquire images and save them but with labwindows and i'm bigginer in using LABWINDOWS searching for help how to process thanks