Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ: Color Image to Grayscale

Overview

This VI demonstrates how to convert an image from color (RGB) to a grayscale image.

Description

This simple program converts a color image to grayscale by two methods:  1) Converting the RGB image to a HSL image and extracting the luminance plane  2) Extracting the red color plane from the RGB image. The attached image can be saved and used to demonstrate the functionality of this VI.  The file path of the saved image should be in the File Path control on the front panel.

Steps to Implement or Execute Code

  1. Specify the File Path on the front panel to your desired image
  2. Run the VI

Requirements

Software

LabVIEW 8.0 "or compatible"

IMAQ (part of Vision Acquisition Software 8.0 "or compatible") - Compatibility Link

Vision Development Module "or compatible" - Compatibility Link

VI Snippet

Grayscale.png

Additional Information or References

Additional Images

grayy.jpg


**This document has been updated to meet the current required format for the NI Code Exchange. For more details visit this discussion thread**

Comments
Member alex33530
Member

Hi,

I would like do the oposite.. grayscale to color image. How can i do this?

thanks

alex

Contributors