Name
RGB2Gray — converts RGB image to gray level image
Calling Sequence
Image = RGB2Gray(RGB);
Parameters
- RGB
3D matrix of type uint8, uint16, uint32 or double
- Image
2D matrix of the same type as RGB
Description
This function converts a color image to a gray level image.
Examples
RGB = ReadImage('contrib\IPD-3.3\demos\teaset.png');
Image = RGB2Gray(RGB);
figure(); ShowImage(Image, 'Gray Level Image');