Announcements Color Reflectance the Principle of Trichromacy
Total Page:16
File Type:pdf, Size:1020Kb
Announcements • HW2 due date extended to Tuesday Continued Introduction to Computer Vision CSE 252a Lecture 10 CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer Vision I The appearance of colors Color Reflectance • Color appearance is strongly affected by (at least): Measured color spectrum is – Spectrum of lighting striking the retina a function of the spectrum – other nearby colors (space) of the illumination and – adaptation to previous views (time) reflectance – “state of mind” From Foundations of Vision, Brian Wandell, 1995, via B. Freeman slides CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer 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. CSE252a, Winter 06 slide fromComputer T. DarrelVision I CSE252a, Winter 06 Computer Vision I 1 Color matching functions RGB • Choose primaries, say A(λ), B(λ), C(λ) • For monochromatic (single wavelength) energy RGB: primaries are monochromatic, energies are function, what amounts of primaries will match it? 645.2nm, 526.3nm, 444.4nm. Color matching functions have • i.e., For each wavelength λ, determine how much negative parts -> some colors of A, of B, and of C is needed to match light of that can be matched only wavelength alone. subtractively. a(λ ) b(λ ) c(λ ) • These are color matching functions CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer Vision I CIE XYZ Three types of cones: R,G,B ρ (λ )E (λ )dλ Response of k’th cone = ∫ k 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) There are three types of cones S: Short wave lengths (Blue) • Three attributes to a color M: Mid wave lengths (Green) • Three numbers to describe a color L: Long wave lengths (Red) CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer Vision I Color Spaces Color spaces There are many different color spaces, with each • Linear color spaces describe • RGB: primaries are describing a color using three numbers: colors as linear combinations monochromatic, energies are of primaries 645.2nm, 526.3nm, 444.4nm. 6. YIQ (NTSC), Color matching functions have 1. RGB • Choice of primaries=choice of negative parts -> some colors 2. HLS 7. YUV (PAL), color matching can be matched only 3. YCrCb 8. CIExyz, functions=choice of color subtractively. 4. HSV 9. CIELAB space • CIE XYZ: Color matching 5. CMY 10. SUV • Color matching functions, functions are positive hence color descriptions, are everywhere, but primaries are In general a color represented in one color space (say all within linear imaginary. Usually draw x, y, HLS) can be converted and represented in a transformations where x=X/(X+Y+Z) second color space (say RGB), unless the result y=Y/(X+Y+Z) falls outside of the gamut of the second space. CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer Vision I 2 RGB Color Cube YIQ Model • Block of colours for (r, g, b) in the range (0-1). • Convenient to have an ⎡Y ⎤ ⎡0.299 0.587 0.114 ⎤⎡R⎤ upper bound on coefficient of each ⎢ I ⎥ = ⎢0.596 − 0.275 − 0.321⎥⎢G⎥ primary. ⎢ ⎥ ⎢ ⎥⎢ ⎥ • In practice: ⎣⎢Q⎦⎥ ⎣⎢0.212 − 0.532 0.311 ⎦⎥⎣⎢B⎦⎥ – primaries given by monitor phosphors – (phosphors are the materials on the face of the monitor • Used by NTSC TV standard screen that glow when • Separates Hue & Saturation (I,Q) from struck by electrons) Luminance (Y) CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer Vision I CIE -XYZ and x-y CIE xyY (Chromaticity Space) CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer Vision I Hue Saturation S: On color wheel, H: An angle between 0° Unsaturated C distance between and 360° S H center and color point C H= 0° : Red H= 135° : Green Highly Saturated Color Wheel Color Wheel 3 Motivation: Lambertian on NonLambertian Surface HSV Hexcone Motivation: Lambertian on NonLambertian Surface Hue, Saturation, Value AKA: Hue, Saturatation, Intensity (HIS) Hexagon arises from projection of cube onto plane orthogonal to (R,G,B) = (1,1,1) CSE252a, Winter 06 Computer Vision I ,© David Kriegman Dichromatic Reflection Model Dichromatic Reflection Model Diffuse Surface Transparent Film ,© David Kriegman ,© David Kriegman Dichromatic Reflection Model Image formation Dielectric Surface + ,© David Kriegman ,© David Kriegman 4 Data-dependent SUV Color Space Properties of SUV z Data-dependent. z Rotational (hence, linear) Transformation. z The S channel encodes the entire specular component and an unknown amount of diffuse component. z Shading information is preserved. ,© David Kriegman ,© David Kriegman Example Multi-channel Photometric Stereo S RGB U V ,© David Kriegman ,© David Kriegman Multi-channel Photometric Stereo Qualitative Results ,© David Kriegman ,© David Kriegman 5 Quantitative Results Metameric Lights (Metamers) ,© David Kriegman CSE252a, Winter 06 Computer Vision I 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. CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer Vision I Blob Tracking for Robot Control 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. CSE252a, Winter 06 Computer Vision I CSE252a, Winter 06 Computer Vision I 6.