Example Code

Extract Color Plane of an image without using the NI Vision Development Module

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

  • LabVIEW

Code and Documents

Attachment

Overview

This example demonstrates how to filter colors of an image without using the NI Vision Development Module.

 

Description

The VI loads a JPEG image from file and converts the image to a 2D array. The RGB values of the pixels are splitten and filtered according to the color selection in the Front Panel. The original image and the filtered image are displayed in the Front Panel.

If the NI Vision Development Module is availible, the VI ExtractSingleColorPlane can be used.

Example: How to extract color planes and grayscale images using LabVIEW and VDM

 

Requirements

 Software

  • LabVIEW Base Development System 2012 (or compatible)

 Hardware

  • No hardware is necessary to use this example VI

 

Steps to Implement or Execute Code

  1. Download and open the attached ZIP-file
  2. Open the VI and follow the instructions inside

 

Additional Information or References

 

Extract Color Plane without VDM LV2012 NIVerified.vi - Front Panel.pngExtract Color Plane without VDM 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.**

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

Comments
A_Patel
NI Employee (retired)
on

That is really cool. Great job Hunter. Best LabVIEW progammer ever.

National Instruments
Applications Engineer