Transform an RGB image into a gray scale image.
rgb1_to_grey 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:
grey = 0.299 * red + 0.587 * green + 0.144 * blue .
RGBImage (input_object) |
image(-array) -> object : byte |
Three-channel RBG image. |
GreyImage (output_object) |
image(-array) -> object : byte |
Gray scale image. |
/* Tranformation from rgb to grey */ read_picture(:Image:'tiff',0,0,'patras':Channels) > disp_color(Image:::) > rgb1_to_grey(Image:GreyImage::) > disp_image(GreyImage:::).