rgb1_to_gray — Transform an RGB image into a gray scale image.
rgb1_to_gray transforms an RGB image into a gray scale image. The three channels of the RGB image are passed as the first three channels of the input image. The image is transformed according to the following formula:
gray = 0.299 * red + 0.587 * green + 0.114 * blue .
If one of the input images in RGBImage is a single-channel image its reference will be simply copied to the output GrayImage.
Three-channel RBG image.
Gray scale image.
* Transformation from rgb to gray read_image(Image,'patras') disp_color(Image,WindowHandle) rgb1_to_gray(Image,GrayImage) disp_image(GrayImage,WindowHandle)