From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Convert Three Grayscale Images to an IMAQ Color Image with different methods

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 combine different IMAQ grayscale images to one IMAQ color image.

 

Description

To combine grayscale images to a a color image there are several methods available in the Vision Development Module:

  1. Use the 'IMAQ ReplaceColorPlane' function and directly combine 3 color planes to a color image
  2. Use the 'IMAQ ArrayToColorImage' function with the U32 Image Pixels array input
  3. Use the 'IMAQ ArrayToColorImage' function with the U64 Image Pixels array input

 

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. Select the method
  2. Run the VI

 

Additional Information or References

Grayscale to Color 16bit LV2012 NIVerified.vi - Front Panel_2.png

 

 

Grayscale to Color 16bit LV2012 NIVerified.vi - 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.**

Zach C.
Field Engineer
Greater Los Angeles

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

Comments
MAILFERTSeb
Member
Member
on

Hi,

Is it possible to do the same thing without the vision module?

Thanks for your help!


Sébastien