Lecture 1 Image Formation peimt@bit.edu.cn 1
Part 3 Color 2
Color v The light coming out of sources or reflected from surfaces has more or less energy at different wavelengths v The visual system responds to light in a range of wavelengths from approximately 400nm to approximately 700nm v Light containing energy at just one wavelength looks deeply colored v If the intensity is relatively uniform across the wavelengths, the light will look white 3
Color Spectrum of light 4
Color v Most cameras and most eyes have several different types of receptor, whose sensitivity to different wavelengths varies v The light receptors in cameras and in the eye respond more or less strongly to different wavelengths of light v Comparing the response of several types of sensor yields information about the distribution of energy with wavelength for the incoming light; this is color information 5
Color matching The observer sees a test light T and can adjust the amount of each of three primaries in a mixture displayed next to the test light. The observer is asked to adjust the amounts so that the mixture looks the same as the test light.
Color matching v Most observers require only three primaries to match a test light. This phenomenon is known as the principle of trichromacy v There is now clear evidence that trichromacy occurs because there are three distinct types of color transducer in the eye v Given the same primaries and test light, most observers select the same mixture of primaries to match that test light, because most people have the same types of color receptor 7
Trichromatic Theory v Light, no matter how complex its composition of wavelengths, is reduced to three color components by the eye v For each location in the visual field, the three types of cones yield three signals based on the extent to which each is stimulated. These amounts of stimulation are sometimes called tristimulus values v The set of all possible tristimulus values determines the human color space. It has been estimated that humans can distinguish roughly 10 million different colors 8
Color Receptors Human receptor sensitivities Cameras try to be similar in form so that they report similar colors 9
Color Receptors v There are two kinds of cells in the retina, cone cells and rod cells. Cone cells: photoreceptor cells in the retina of the eye that are responsible for color vision, they function best in relatively bright light. Rod cells: photoreceptor cells in the retina of the eye that can function in less intense light. In dim light, the cones are understimulated leaving only the signal from the rods, resulting in a colorless response. 10
The Physics of Color v Light sources can produce different amounts of light at different wavelengths. v For most diffuse surfaces, albedo depends on wavelength, so that some wavelengths may be largely absorbed and others largely reflected. v The light reflected from a colored surface is affected by both the color of the light falling on the surface, and by the surface. 11
Light Sources v Natural light sources Sun and Sky v Artificial Illumination Incandescent light Fluorescent light v Black Body Radiators 12
Color Representation v Each Color representation (color model) corresponds to a color space, and each color is a point in the space. v There are a large number of color spaces in use in the world today RGB, CMY, XYZ, YIQ, YUV NRGB, NXYZ, L*a*b*, L*u*v* HSI(HSV,HSL) 13
Linear color spaces v Linear color spaces Describe colors as linear combinations of primaries Choice of primaries = choice of color space v RGB: Primaries are monochromatic, 645.2nm (R), 526.3nm (G) and 444.4nm (B). v CIE XYZ: Primaries are imaginary.
RGB v The RGB color model is an additive color model in which red, green and blue light are added together in various ways to reproduce a broad array of colors. v The name of the model comes from the initials of the three additive primary colors, red, green and blue. 15
RGB In RGB, different lights are added to produce color used in color display 16
RGB The RGB cube 17
Normalized RGB r = R G, g = b R + G + B R + G + B, = R B + G + B r, g and b are the chromaticity coordinate and only two chromaticity values are needed. v Less sensitive to lighting changes than the original RGB color space 18
CIE-XYZ v Colors are specified by the relative amount of the CIE primaries X,Y, and Z. v The Y value is luminance, a measure of the amount of light at all wavelengths that corresponds to the perceived brightness. v Z is quasi-equal to blue stimulation, and X is a mix (a linear combination) of cone response curves chosen to be nonnegative. 19
CIE-XYZ 20 X Y Z! " # # # $ % & & & = 2.7689 1.7517 1.1302 1.0000 4.5907 0.0601 0.0000 0.0565 5.5943! " # # # $ % & & & R G B! " # # # $ % & & &
Normalized XYZ x y z = = = X X X X + Y Y + Y Z + Y + Z + Z + Z,, Only two chromaticity values are needed 21 The diagram of CIE chromaticities.
Non-linear colour spaces v HSV: Hue, Saturation, Value Hue, the property of a color that varies in passing from red to green Saturation, the property of a color that varies in passing from red to pink Brightness (sometimes called lightness or value), the property that varies in passing from black to white
Three Attributes of Color v Hue: determined by the dominant wavelength in the spectral distribution of light wavelengths. v Saturation: the magnitude of the hue relative the other wavelengths. S = s 1 s 2 s 1 is the amount of light at the dominant wavelength and s 2 is the amount of light at all wavelengths. v Brightness: a measure of the overall amount of light that passes through all of the spectral response functions. 23
Inconsistency of non-uniform color space In each ellipse region, it is unable for human to discriminate the color of center pixel from those of other pixels. Notice that the sizes and directions of ellipses vary with the positions of center pixels. 24
Non-Uniform color spaces v This means that the size of a difference in (x, y ) coordinates, given by ((Δx ) 2 +(Δy ) 2 ) (1/2), is a poor indicator of the significance of a difference in color v If it were a good indicator, the ellipses representing indistinguishable colors would be circles
Uniform color spaces v In non-uniform color spaces, the same perceived color change can correspond to small or large differences in coordinates v In uniform spaces, equal (small!) steps in coordinates give the same perceived color changes
Uniform color spaces This figure shows the CIE 1976 u, v space, which is obtained by a projective transformation of CIE x, y space. The intention is to make the MacAdam ellipses uniformly circles
Color Constancy v People are able to correctly perceive the colors of objects in the scene independent, for the most part, from the color of the ambient illumination v Objects can be said to have the color of the light leaving their surfaces, which normally depends on the spectrum of the incident illumination and the reflectance properties of the surface, as well as potentially on the angles of illumination and viewing 28
A MODEL OF IMAGE COLOR v Assume that an image pixel is the image of some surface patch. v Many phenomena affect the color of this pixel: the camera response to illumination the choice of camera receptors the amount of light that arrives at the surface the color of light arriving at the surface the dependence of the diffuse albedo on wavelength and specular components. 29
A MODEL OF IMAGE COLOR 30
Inference from Color v Finding Specularities using Color v Shadow Removal using Color v Surface Color from Image Color 31
Shadow Removal using Color v Lightness methods make the assumption that fast edges in images are due to changes in albedo v This assumption fails badly at shadows, particularly shadows in sunlight outdoors. v People usually are not fooled into believing that a shadow is a patch of dark surface, so must have some method to identify shadow edges. 32
Shadow Removal using Color v One might assume that, at a shadow edge, there was a change in brightness but not in color. v It turns out that this is not the case for outdoor shadows, because the lit region is illuminated by yellowish sunlight, and the shadowed region is illuminated by bluish light from the sky. v A useful cue can be obtained by modeling the different light sources. 33
Shadow Removal using Color Black Body Radiators The response of the j th receptor will be 34
Shadow Removal using Color Form a color space by taking c1 = log(r1/r3 ) c2 = log(r2/r3 ) 35
Shadow Removal using Color v When one changes the color temperature of the source, the (c1, c2 ) coordinates move along a straight line. v The direction of the line depends on the sensor, but not on the surface. v Call this direction the color temperature direction. v The intercept of the line depends on the surface. 36
Shadow Removal using Color Changing the color temperature of the light under which a surface is viewed moves the (c1, c2) coordinates of that surface along the color temperature direction 37
peimt@bit.edu.cn 38