COLOR FOR IMAGE PROCESSING 1/27 Václav Hlaváč, Jan Kybic Czech Technical University, Faculty of Electrical Engineering Center for Machine Perception, Prague, Czech Republic hlavac@cmp.felk.cvut.cz http://cmp.felk.cvut.cz/∼hlavac Courtesy to K. Ikeuchi, T. Darrell for inspiration and some pictures found in their teaching presentations. COLOR IN SEVERAL DOMAINS Physics. Human vision, physiology. Psychophysics, perception. Computer vision. 2/27 Painting, photography, movies. COLOR IN COMPUTER VISION Color in image formation, reflection physics. 3/27 Color for segmentation. LIGHT AND COLOR Light = electromagnetic radiation. Spectrum visible to humans h400nm, 700nmi. Sensors do not have direct access to color, i.e., wavelength λ. Exception: spectrometer. 4/27 Response of i-th sensor Zλ2 si = s(λ)ri dλ , λ1 ri is spectral density of i-th sensor, s(λ) is spectral density of light. where BUNSEN PRISM MONOCHROMATOR 5/27 DIFFRACTION (GRATING) MONOCHROMATOR 6/27 SPECTRAL REFLECTANCE OF FLOWERS 7/27 VISIBLE SPECTRUM Retina – 4 types of receptors. R, G, B cones, color vision. 8/27 Rods, monochromatic vision with higher sensitivity. RADIOMETRY FOR COLOR All definitions are now “per unit wavelength”. All units are now per unit wavelength. All terms are now “spectral”. Radiance becomes spectral radiance [watts per square meter per steradian per unit wavelength]. 9/27 Irradiance becomes spectral irradiance [watts per square meter per unit wavelength]. RADIOMETRY FOR COLOR 2 Dependence on wavelength λ is introduced into BRDF. L becomes spectral radiance. 10/27 E becomes spectral irradiance. L(Θi, Φi, λ) BRDF = f (Θi, Φi, Θe, Φe, λ) = E(Θe, Φe, λ) In computer vision, simplified models are often used which use relative measures instead of absolute absolute measures. ILLUMINATION SPECTRUM 11/27 RELATIVE REFLECTANCE 12/27 RELATIVE TRANSMITTANCE 13/27 HUMANS AND TRICHROMACY 14/27 The eye reduces all the wavelengths at a given ‘pixel’ to just the total amount of red, green, and blue. RGB COMPONENTS OF A COLOR IMAGE 15/27 MIXTURE OF COLORS 16/27 ADDITIVE COLOR MIXING 400 nm 500 nm + 600 nm 500 nm 600 nm 700 nm = YELLOW 400 nm 500 nm 600 nm Red plus yellow. Additive mixing model holds for CRT phosphors, multiple projectors aimed at a screen, Polachromeslide film, human eye cones. 700 nm GREEN 400 nm RED 17/27 700 nm green makes SUBTRACTIVE COLOR MIXING Applies when colors mix by multiplying the color spectra. Cyan (called blue in crayons) minus (actually multiply) yellow makes green. 18/27 Subtractive mixing model holds for most photographic films, paint, crayons, printing, cascaded optical filters. CYAN 400 nm 500 nm 600 nm - 700 nm YELLOW 400 nm 500 nm 600 nm 700 nm = GREEN 400 nm 500 nm 600 nm 700 nm COLOR CAMERAS 19/27 1 chip camera + filter 3 chip camera HUE, SATURATION, VALUE COLOR SPACE 20/27 COLOR CONSTANCY, MOTIVATION 21/27 Colorimetry versus color perception. FAILURES IN COLOR CONSTANCY 22/27 FAILURES IN COLOR CONSTANCY (2) 23/27 FAILURES IN COLOR CONSTANCY (3) 24/27 INFLUENCE OF ILLUMINATION 25/27 INFLUENCE OF ILLUMINATION (2) 26/27 INFLUENCE OF OUTLINE 27/27 Bezold effect