Example Code

Convert IMAQ Image into LabVIEW Image data type

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

Code and Documents

Attachment

Overview

The example demonstrates how to convert a IMAQ Image to a LabVIEW Picture and vice versa.

 

Description

In LabVIEW there are two different types of images: The LabVIEW Picture data type and the IMAQ Image data type. The LabVIEW Picture data type is part of LabVIEW whereas the IMAQ image data type is provided by the Vision Development Module (VDM).

There are functions to help convert both formats in both directions, though there are different functions for the handling of grayscale and color images.

 

Requirements

 Software

  • LabVIEW 2012 Base Development System (or compatible)
  • Vision Development Module 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Open the attached file
  2. Select the grayscale or color mode by switching the button
  3. Run the VI

 

Additional Information or References

Convert IMAQ Image and LabVIEW Picture - Front Panel live.png

 

Convert IMAQ Image and LabVIEW Picture - 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.**

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

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

Comments
D60
Active Participant
Active Participant
on

Hi,

Could you save your vi to LV2009?

Thanks in advance!

---
+++ In God we believe, in Trance we Trust +++
[Hungary]