BID (Bruteforce Isoluminants Decrease) a RGB-to-gray conver sion technique for automatic photogrammetry
2. Color-to-gray conversion problem and existing techniques
Many color-to-gray conversion methods have been proposed in recent years, but they mainly focus on quality of grayscale printer reproduction and other human-related tasks. These conversions can be done in Color Space (linear or nonlinear) or in Im-
age Space converting pixels (RGB) using colors in the image and assigning different gray for different color.
Between the conversions in Color Space the CIE Y method is a widely used conver- sion that is based on the CIE 1931 XYZ color space. It takes the XYZ representation of the image and uses Y as the gray value. For images having isoluminant regions, the luminance channel will fail to represent structures or features in the color image. Image Space color-to-grey conversions are image-independent local functions of every color, e.g., for every pixel of the color image a gray value is computed using a function whose only parameters are the values of the corresponding color pixel. Following [6] Image Space conversions can be subdivided into three subfamilies:
- trivial methods - direct methods
- chrominance direct methods.
Trivial methods are the most basic and simple ones. They do not take into account the power distribution of the color channels; for example, only the mean of the RGB channels is taken. They lose a lot of image information because for every pixel they discard two of the three color values, or discard one value averaging the remaining ones, not taking into account any color properties. Despite the loss of information these color to grayscale conversions are commonly used for their simplicity.
Typical example of trivial method is the RGB Channel Filter that selects a channel between R, G or B and uses this channel as the grayscale value. The green filter gives the best results, due to the sensors Bayer pattern configurations and because the green channel is typically very similar to the luminance channel, and the blue filter gives the worst results in terms of lightness resemblance. For images having many colors in the green field we have a lot of information missed.
Direct methods are standard methods where the conversion is a linear function of the pixel’s color values. The simplest solution is obviously the Naive Mean that takes the mean of the color channels; but the true advantage of direct methods compared to the trivial ones is that, because they take information from every channel, it’s pos- sible to have different weights for different colors means. This allows taking into account factors such as the relative spectral distribution of the color channels and the human perception. Many of the most used grayscale conversion are based on a method of this family.
The most popular of direct methods is the MATLAB RGBtoGrey that converts from RGB to grayscale, using the NTSC CCIR 601 luma weights, with the formula
Y 0.2989R 0.5870G 0.1140B
Another solution embedded inside Adobe Photoshop use as specific weights to channels R, G, and B: 0.4, 0.4, 0.2.
RGB channel filters are not at all affected by gamma compression problems, since they do not manipulate color values but only choose one of them; this is one of rea- son of its attractiveness also in our field.
Chrominance direct methods are based on more advanced color spaces and are able to mitigate the problem related to isoluminant colors. These conversions are still lo- cal functions of the image pixels, but they assign different grayscale values to
‘isoluminant’ colors. To achieve this result, the luminance information is slightly al- tered using the chrominance information. In order to increase or decrease the ‘cor- rect’ luminance to differentiate isoluminant colors, these methods exploit a result from studies on human color perception as the Helmholtz-Kohlrausch (H-K) effect [7]. The H-K effect states that the perceived lightness of a stimulus changes as a function of the chroma. This phenomenon is predicted by a chromatic lightness term that corrects the luminance based on the color’s chromatic component and on starting color space.
In general, chrominance direct methods can be performed either locally or globally. Local chrominance direct methods [8] make pixels in the color image not processed in the same way and usually rely on the local chrominance edges for enhancement. Smith et al. [9], e.g., employ a local sharpening step after obtaining the grayscale image by global mapping: an adaptively weighted multiscale unsharp masking en- hances chrominance edges. In our field the use of local methods presents many problems: could appear local changes, contradictions, and they have high computa- tional costs. Mainly these techniques might distort the appearance of constant color regions (e.g. same color may output different gray value) and, using color contrast map to enhance gray image, may produce haloing artifacts, as discussed in [10]. These are consistent problems in our case because SIFT blob features will be altered in differently in different images with different point of view and exposure, prevent- ing the correct matching.
Global methods strive to produce one mapping function for the whole image. In this way you will have same luminance for the same RGB triplets and high-speed con- version. Mostly, color order is strictly satisfied, also it might be ambiguous for the human perception. E.g. Grundland and Dodgson [11] proposed a fast linear mapping algorithm that adds a fixed amount of chrominance to the lightness, where the origi- nal lightness and color order can be better preserved by restraining the added chro- minance. Benedetti et al. [6] demonstrated the best results using this method, but our studies demonstrated that it fail when you have different luminance for the same chrominance (i.e. different exposure of images).