This example demonstrates how to use the IMAQ Color Threshold function to produce a binary image from a color image.
The Color Threshold example shows you how to produce a binary image from a color image using either the RGB or HSL color threshold mode. With either threshold mode, you can set the minimum and maximum thresholding for each of the respective components via controls on the front panel. There are two example images provided in the example.
Vision Development Module
IMAQ Color Threshold VI Help Documentation:
http://zone.ni.com/reference/en-XX/help/370281AC-01/imaqvision/imaq_colorthreshold/
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.