Library‎ > ‎LabNotes‎ > ‎

Conversion from RBG to greyscale images.

posted Mar 10, 2011, 3:11 PM by Abel Mendez   [ updated Mar 10, 2011, 3:46 PM ]
The following images show the result of converting an RGB image to greyscales using the rgb2grey IDL function (code below). This function is being used to calculate light curves and visual albedo of synthetic planetary images as part of the Visible Paleo-Earth and the Simulations of Light Curves from Earth-like Exoplanets projects. The rgb2grey can be optionally have a method (default method = 1) and a gamma correction (default gamma = 1). There is not much apparent differences between the first four greyscale methods.


Figure 1. Original RGB image (24-bit).
 

Figure 2. Luminance, CCIR601 (Y component of YUV)  [Method = 1]


Figure 3. Luminance, ITU-R BT.709  [Method = 2]


Figure 4. Mean RGB  [Method = 3]


Figure 5. CIE RGB (Y component of XYZ) [Method = 4]


Figure 6. Brigthness (V component of HSV) [Method = 5]
ċ
rgb2grey.pro
(2k)
Abel Mendez,
Mar 10, 2011, 5:10 PM
Comments