Example Code

Convert Color Image to Intensity Chart

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 extract color planes from an image.

 

Description

This VI illustrates how to use the IMAQ ExtractSingleColorPane and the IMAQ ImageToArray VIs in order to create an intensity profile of an image. First a color plane from the color image is extracted in order to create a grayscale U8 image. With the 'IMAQ ImageToArray' function the color plane is converted to a 2D Image Pixels array that can be used as an input for the intensity chart.

 

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. (Optional) Select which color plane to extract
  2. Run the VI

 

Additional Information or References

IMAQ Image to Intensity Chart LV2012 NIVerified.vi - Front Panel.png

 

IMAQ Image to Intensity Chart 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.**

Paolo F.
National Instruments
Applications Engineer

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