Color Image Representations

NI IMAQ

Color Image Representations

Color images can be represented in different formats. These formats can contain all color information from the image, or they can consist of just one aspect of the color information, such as hue or luminance. The following image representations can be produced using NI-IMAQ or color image acquisition devices.

32-Bit RGB

The most common image representation is 32-bit RGB format. In this representation, the three 8-bit color planes—red, green, and blue—are packed into an array of 32-bit integers. This representation is useful for displaying the image on the monitor. The 32-bit integer is organized as

0 RED GREEN BLUE

where the high-order byte is not used, and the low-order byte is blue.

Each color plane can be returned individually. The red, green, or blue plane is extracted from the RGB image and represented as an array of 8-bit integers.

64-Bit RGB

In the 64-bit RGB representation, the three 16-bit color planes are packed into an array of 64-bit integers, where the high-order byte is not used. This representation allows for more distinct colors per plane.

32-Bit HSL

In the 32-bit HSL representation, the three 8-bit color planes—hue, saturation, and luminance—are packed into an array of 32-bit integers in the same manner as the 32-bit RGB representation.

The hue, saturation, and luminance planes also can be returned individually if you want to analyze the image. You can retrieve the data in 8-bit format to reduce the amount of data to be processed.