How Do I Convert 32-bit Color Images to 8-bit Grayscale Images in Vision Assistant? Primary Software: Vision AssistantPrimary Software Version: 7.1 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I want to use some IMAQ Vision processing functions on a color image, but they require a grayscale image. How do I convert the color image to an 8-bit grayscale image in Vision Assistant? Solution: A 32-bit color image is encoded in memory as either an RGB (red-green-blue) or an HSL (hue-saturation-luminance) image. RGB images store color information using 8 bits each for the red, green, and blue planes. HSL images store color information using 8 bits each for hue, saturation, and luminance. In both cases, the alpha plane is not used. To convert the color image to a grayscale image, you can simply extract the desired 8-bit plane from the color image. To extract a color plane from an image in Vision Assistant, follow these steps:
Related Links: Developer Zone Example: Convert Image to 8-bits Product Manuals: NI Vision Assistant Tutorial (8.2.1) Attachments:
Report Date: 01/30/2001 Last Updated: 04/18/2008 Document ID: 25TBKAOA |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
