Specifications

Intel
®
Image Processing Library Reference Manual
9-8
9
Conversion from Color to Gray Scale
This section describes the function that performs the conversion of absolute
color images to gray scale.
ColorToGray
Converts a color image
to gray scale.
void iplColorToGray(IplImage*
srcImage
, IplImage*
dstImage
);
srcImage
The source image. See Table 9-3 for a list of valid
source and resultant image combinations.
dstImage
The resultant image. See Table 9-3 for a list of
valid source and resultant image combinations.
Discussion
The function iplColorToGray() converts a color source image
srcImage
to a gray scale resultant image
dstImage
.
Table 9-3 lists the valid combinations of source and resultant image bit
data types for conversion from color to gray scale.
Table 9-3 Source and Resultant Image Data Types for Conversion from
Color to Gray Scale
Source Image (data type) Resultant image (data type)
32 bit per channel Gray scale; 1, 8, or 16 bits per pixel
16 bit per channel Gray scale; 1, 8, or 16 bits per pixel
8 bit per channel Gray scale; 1, 8, or 16 bits per pixel