Converts an RGB image to a gray scale image, or a color map to a gray map.
If the input is an RGB image, the conversion to a gray image is computed as the mean value of the color channels.
If the input is a color map it is converted into the YIQ space of ntsc. The luminance value (Y) is taken to create a gray color map. R = G = B = Y