Image Types
- Updated2025-11-25
- 4 minute(s) read
The Vision libraries can manipulate three types of images: grayscale, color, and complex images. Although Vision supports all three image types, certain operations on specific image types are not possible. For example, you cannot apply the logic operator AND to a complex image.
The following table shows how many bytes per pixel grayscale, color, and complex images use. For an identical spatial resolution, a color image occupies four times the memory space of an 8-bit grayscale image, and a complex image occupies eight times the memory of an 8-bit grayscale image.
| Image Type | Number of Bytes per Pixel Data |
|---|---|
| 8-bit (Unsigned) Integer Grayscale (1 byte or 8-bit) |
![]() 8-bit for the grayscale intensity |
| 16-bit (Unsigned) Integer Grayscale (2 bytes or 16-bit) |
![]() 16-bit for the grayscale intensity |
| 16-bit (Signed) Integer Grayscale (2 bytes or 16-bit) |
![]() 16-bit for the grayscale intensity |
| 32-bit Floating-Point Grayscale (4 bytes or 32-bit) |
![]() 32-bit for the grayscale intensity |
| 32-bit RGB Color (4 bytes or 32-bit) |
8-bit for the alpha value (not used), 8-bit for the red intensity, 8-bit for the green intensity, 8-bit for the blue intensity |
| 64-bit (Unsigned) RGB Color (8 bytes or 64-bit) |
16-bit for the alpha value (not used), 16-bit for the green intensity, 16-bit for the red intensity, 16-bit for the blue intensity |
| 64-bit Complex Color (8 bytes or 64-bit) |
![]() 32-bit floating for the real part, 32-bit for the imaginary part |
Grayscale Images
A grayscale image is composed of a single plane of pixels. Each pixel is encoded using one of the following single numbers:
- An 8-bit unsigned integer representing grayscale values between 0 and 255
- A 16-bit unsigned integer representing grayscale values between 0 and 65,535
- A 16-bit signed integer representing grayscale values between –32,768 and 32,767
- A single-precision floating point number, encoded using four bytes, representing grayscale values ranging from –∞ to ∞
Color Images
A color image is encoded in memory as either a red, green, and blue (RGB) image or a hue, saturation, and luminance (HSL) image. Color image pixels are a composite of four values. 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. RGB U64 images store color information using 16 bits each for the red, green, and blue planes. In the RGB and HSL color models, an additional 8-bit value goes unused. This representation is known as 4 ∞ 8-bit or 32-bit encoding. In the RGB U64 color model, an additional 16-bit value goes unused. This representation is known as 4 ∞ 16-bit or 64-bit encoding.
| Alpha plane (not used) |
|
| Red or hue plane |
|
| Green or saturation plane |
|
| Blue or luminance plane |
|
Complex Images
A complex image contains the frequency information of a grayscale image. You can create a complex image by applying a Fast Fourier transform (FFT) to a grayscale image. After you transform a grayscale image into a complex image, you can perform frequency domain operations on the image.
Each pixel in a complex image is encoded as two single-precision floating-point values, which represent the real and imaginary components of the complex pixel. You can extract the following four components from a complex image: the real part, imaginary part, magnitude, and phase.



