Continued Introduction to Computer Vision CSE 252a Lecture 11
The appearance of colors Color appearance is strongly affected by (at least): Spectrum of lighting striking the retina other nearby colors (space) adaptation to previous views (time) state of mind
Color Reflectance Measured color spectrum is a function of the spectrum of the illumination and reflectance From Foundations of Vision, Brian Wandell, 1995, via B. Freeman slides
slide from Computer T. Darrel Vision I
The principle of trichromacy Experimental facts: Three primaries will work for most people if we allow subtractive matching Exceptional people can match with two or only one primary. This could be caused by a variety of deficiencies. Most people make the same matches. There are some anomalous trichromats, who use three primaries but make different combinations to match.
Color matching functions Choose primaries, say A(λ), B(λ), C(λ) For monochromatic (single wavelength) energy function, what amounts of primaries will match it? i.e., For each wavelength λ, determine how much of A, of B, and of C is needed to match light of that wavelength alone. a( ) b( λ ) c( λ ) These are color matching functions λ
RGB RGB: primaries are monochromatic, energies are 645.2nm, 526.3nm, 444.4nm. Color matching functions have negative parts -> some colors can be matched only subtractively.
CIE XYZ CIE XYZ: Color matching functions are positive everywhere, but primaries are imaginary. Usually draw x, y, where x=x/(x+y+z) y=y/(x+y+z)
Three types of cones: R,G,B ρ ( λ ) E ( λ ) dλ Response of k th cone = k There are three types of cones S: Short wave lengths (Blue) M: Mid wave lengths (Green) L: Long wave lengths (Red) Three attributes to a color Three numbers to describe a color
Color spaces Linear color spaces describe colors as linear combinations of primaries Choice of primaries=choice of color matching functions=choice of color space Color matching functions, hence color descriptions, are all within linear transformations RGB: primaries are monochromatic, energies are 645.2nm, 526.3nm, 444.4nm. Color matching functions have negative parts -> some colors can be matched only subtractively. CIE XYZ: Color matching functions are positive everywhere, but primaries are imaginary. Usually draw x, y, where x=x/(x+y+z) y=y/(x+y+z)
Color Spaces There are many different color spaces, with each describing a color using three numbers: 1. RGB 2. HLS 3. YCrCb 4. HSV 5. CMY 6. YIQ (NTSC), 7. YUV (PAL), 8. CIExyz, 9. CIELAB 10. SUV In general a color represented in one color space (say HLS) can be converted and represented in a second color space (say RGB), unless the result falls outside of the gamut of the second space.
RGB Color Cube Block of colours for (r, g, b) in the range (0-1). Convenient to have an upper bound on coefficient of each primary. In practice: primaries given by monitor phosphors (phosphors are the materials on the face of the monitor screen that glow when struck by electrons)
YIQ Model Y I Q = 0.299 0.596 0.212 0.587 0.275 0.532 0.114 R 0.321 G 0.311 B Used by NTSC TV standard Separates Hue & Saturation (I,Q) from Luminance (Y)
CIE -XYZ and x-y
CIE xyy (Chromaticity Space)
Hue H H: An angle between 0 and 360 H= 0 : Red H= 135 : Green Color Wheel
Saturation Unsaturated S C S: On color wheel, distance between center and color point C Highly Saturated Color Wheel
HSV Hexcone Hue, Saturation, Value AKA: Hue, Saturatation, Intensity (HIS) Hexagon arises from projection of cube onto plane orthogonal to (R,G,B) = (1,1,1)
Uniform color spaces McAdam ellipses (next slide) demonstrate that differences in x,y are a poor guide to differences in color Construct color spaces so that differences in coordinates are a good guide to differences in color.
Variations in color matches on a CIE x, y space. At the center of the ellipse is the color of a test light; the size of the ellipse represents the scatter of lights that the human observers tested would match to the test color; the boundary shows where the just noticeable difference is. The ellipses on the left have been magnified 10x for clarity; on the right they are plotted to scale. The ellipses are known as MacAdam ellipses after their inventor. The ellipses at the top are larger than those at the bottom of the figure, and that they rotate as they move up. This means that the magnitude of the difference in x, y coordinates is a poor guide to the difference in color.
CIE u v which is a projective transform of x, y. We transform x,y so that ellipses are most like one another. Figure shows the transformed ellipses.
Motivation: Lambertian on NonLambertian Surface, David Kriegman
Dichromatic Reflection Model Diffuse Surface, David Kriegman
Dichromatic Reflection Model Transparent Film, David Kriegman
Dichromatic Reflection Model Dielectric Surface, David Kriegman
Image formation, David Kriegman
Data-dependent SUV Color Space, David Kriegman
Properties of SUV Data-dependent. Rotational (hence, linear) Transformation. The S channel encodes the entire specular component and an unknown amount of diffuse component. Shading information is preserved., David Kriegman
Example RGB S U V, David Kriegman
Multi-channel Photometric Stereo, David Kriegman
Multi-channel Photometric Stereo, David Kriegman
Qualitative Results, David Kriegman
Quantitative Results, David Kriegman
Blob Tracking for Robot Control
Filtering CSE252A Lecture 11
Image Filtering
(From Bill Freeman)
Noise Simplest noise model independent stationary additive Gaussian noise the noise value at each pixel is given by an independent draw from the same normal probability distribution Issues this model allows noise values that could be greater than maximum camera output or less than zero for small standard deviations, this isn t too much of a problem - it s a fairly good model independence may not be justified (e.g. damage to lens) may not be stationary (e.g. thermal gradients in the ccd)
Linear Filters General process: Form new image whose pixels are a weighted sum of original pixel values, using the same set of weights at each point. Properties Output is a linear function of the input Output is a shift-invariant function of the input (i.e. shift the input image two pixels to the left, the output is shifted two pixels to the left) Example: smoothing by averaging form the average of pixels in a neighbourhood Example: smoothing with a Gaussian form a weighted average of pixels in a neighbourhood Example: finding a derivative form a weighted average of pixels in a neighbourhood
(Freeman)
Convolution * 1 2 1-1 -2-1 Kernel (K) Image (I) Note: Typically Kernel is relatively small in vision applications.
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Convolution: R= K*I m=2 I R Kernel size is m+1 by m+1 R( i, j) = m/2 m/2 h= m/2 k= m/2 K( h, k) I( i h, j k)
Impulse Response 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 * = 0 0 0 0 0 0 0 0 0 0 0
(Swiped from Bill Freeman)
(Swiped from Bill Freeman)
(Swiped from Bill Freeman)
(Swiped from Bill Freeman)
(Swiped from Bill Freeman)
(Swiped from Bill Freeman)
(Swiped from Bill Freeman)
(Swiped from Bill Freeman)
(Swiped from Bill Freeman)
Smoothing by Averaging Kernel:
Filters are templates Applying a filter at some point can be seen as taking a dotproduct between the image and some vector Filtering the image is a set of dot products Insight filters look like the effects they are intended to find filters find effects they look like