Page 99 -
P. 99

78                                                                        2 Image formation


                                   Unfortunately, for both computer vision and computer graphics, the presence of gamma
                                in images is often problematic. For example, the proper simulation of radiometric phenomena
                                such as shading (see Section 2.2 and Equation (2.87)) occurs in a linear radiance space. Once
                                all of the computations have been performed, the appropriate gamma should be applied before
                                display. Unfortunately, many computer graphics systems (such as shading models) operate
                                directly on RGB values and display these values directly. (Fortunately, newer color imaging
                                standards such as the 16-bit scRGB use a linear space, which makes this less of a problem
                                (Glassner 1995).)
                                   In computer vision, the situation can be even more daunting. The accurate determination
                                of surface normals, using a technique such as photometric stereo (Section 12.1.1)orevena
                                simpler operation such as accurate image deblurring, require that the measurements be in a
                                linear space of intensities. Therefore, it is imperative when performing detailed quantitative
                                computations such as these to first undo the gamma and the per-image color re-balancing
                                in the sensed color values. Chakrabarti, Scharstein, and Zickler (2009) develop a sophisti-
                                cated 24-parameter model that is a good match to the processing performed by today’s digital
                                cameras; they also provide a database of color images you can use for your own testing. 23
                                   For other vision applications, however, such as feature detection or the matching of sig-
                                nals in stereo and motion estimation, this linearization step is often not necessary. In fact,
                                determining whether it is necessary to undo gamma can take some careful thinking, e.g., in
                                the case of compensating for exposure variations in image stitching (see Exercise 2.7).
                                   If all of these processing steps sound confusing to model, they are. Exercise 2.10 has you
                                try to tease apart some of these phenomena using empirical investigation, i.e., taking pictures
                                of color charts and comparing the RAW and JPEG compressed color values.


                                Other color spaces
                                While RGB and XYZ are the primary color spaces used to describe the spectral content (and
                                hence tri-stimulus response) of color signals, a variety of other representations have been
                                developed both in video and still image coding and in computer graphics.
                                   The earliest color representation developed for video transmission was the YIQ standard
                                developed for NTSC video in North America and the closely related YUV standard developed
                                for PAL in Europe. In both of these cases, it was desired to have a luma channel Y (so called
                                since it only roughly mimics true luminance) that would be comparable to the regular black-
                                and-white TV signal, along with two lower frequency chroma channels.
                                   In both systems, the Y signal (or more appropriately, the Y’ luma signal since it is gamma
                                compressed) is obtained from
                                                    Y     =0.299R +0.587G +0.114B ,                 (2.112)



                                                      601
                                where R’G’B’ is the triplet of gamma-compressed color components. When using the newer
                                color definitions for HDTV in BT.709, the formula is



                                                   Y     =0.2125R +0.7154G +0.0721B .               (2.113)
                                                    709



                                   The UV components are derived from scaled versions of (B −Y ) and (R −Y ), namely,



                                              U =0.492111(B − Y ) and V =0.877283(R − Y ),          (2.114)


                                 23  http://vision.middlebury.edu/color/.
   94   95   96   97   98   99   100   101   102   103   104