Unformatted text preview:

ECE160Spring 2008Lecture 4Color in Image and Video1ECE160 / CMPS182MultimediaLecture 4: Spring 2008Color in Image and VideoECE160Spring 2008Lecture 4Color in Image and Video2Color ScienceLight and Spectra• Light is an electromagnetic wave. Its color ischaracterized by the wavelength content of the light.(a) Laser light consists of a single wavelength: e.g., a ruby laserproduces a bright, scarlet-red beam.(b) Most light sources produce contributions over manywavelengths.(c) However, humans cannot detect all light, just contributions thatfall in the “visible wavelengths“ in the range 400 nm to 700 nm(where nm stands for nanometer, 10− 9 meters).(d) Short wavelengths produce a blue sensation, long wavelengthsproduce a red one.• Spectrophotometer: device used to measure visiblelight, by reflecting light from a diffraction grating (a ruledsurface) that spreads out the different wavelengths.ECE160Spring 2008Lecture 4Color in Image and Video3Color Science• This shows the relative power in each wavelengthinterval for typical outdoor light on a sunny day. This typeof curve is called a Spectral Power Distribution (SPD) ora spectrum.• The symbol for wavelength is λ. This curve is called E(λ).ECE160Spring 2008Lecture 4Color in Image and Video4Human Vision• The eye works like a camera, with the lens focusing animage onto the retina (upside-down and left-rightreversed).• The retina consists of an array of rods and three kinds ofcones.• The rods come into play when light levels are low andproduce a image in shades of gray (“all cats are gray atnight!").• For higher light levels, the cones each produce a signal.Because of their differing pigments, the three kinds ofcones are most sensitive to red (R), green (G), and blue(B) light.• It seems likely that the brain makes use of differences R-G, G-B, and B-R, as well as combining all of R, G, and Binto a high-light-level achromatic channel.ECE160Spring 2008Lecture 4Color in Image and Video5Spectral Sensitivity of the Eye• The eye is most sensitive to light in the middle of thevisible spectrum.• The sensitivity of our receptors is also a function ofwavelength.ECE160Spring 2008Lecture 4Color in Image and Video6Spectral Sensitivity of the Eye• The Blue receptor sensitivity is not shownto scale because it is much smaller thanthe curves for Red or Green• The overall sensitivity is shown as a dashed line– this important curve is calledthe luminous-efficiency function.It is denoted V(λ) and is the sum of theresponse curves for Red, Green, and Blue.• The rod sensitivity curve looks likethe luminous-efficiency function V(λ)but is shifted to the red end of the spectrum.ECE160Spring 2008Lecture 4Color in Image and Video7Spectral Sensitivity of the Eye• The achromatic channel produced by the conesis approximately proportional to 2R+G+B/20.• These spectral sensitivity functions are usuallydenoted by letters other than “R, G, B"; here let'suse a vector function q(λ), with componentsq(λ) = ( qR(λ), qG(λ), qB(λ) )TECE160Spring 2008Lecture 4Color in Image and Video8Spectral Sensitivity of the Eye• The response in each color channel in the eye isproportional to the number of neurons firing.• A laser light at wavelength would result in acertain number of neurons firing. An SPD is acombination of single-frequency lights (like“lasers"), so we add up the cone responses forall wavelengths, weighted by the eye's relativeresponse at that wavelength.R = ∫ E(λ) qR(λ) dλG = ∫ E(λ) qG(λ) dλB = ∫ E(λ) qB(λ) dλECE160Spring 2008Lecture 4Color in Image and Video9Image Formation• Surfaces reflect different amounts of light at differentwavelengths, and dark surfaces reflect less energy thanlight surfaces.• We show the surface spectral reflectance from orangesneakers and faded blue jeans. The reflectance functionis denoted S(λ).ECE160Spring 2008Lecture 4Color in Image and Video10Color SignalImage formation is thus:• Light from the illuminantwith SPD E(λ) impingeson a surface, withsurface spectralreflectance functionS(λ), is reflected, andthen is filtered by theeye's cone functions q (λ).• The function C(λ) is called thecolor signal and consists of theproduct of E(λ), the illuminant,times S(λ), the reflectance:C(λ) = E(λ)S(λ).Thus:R = ∫ E(λ) S(λ) qR(λ) dλG = ∫ E(λ ) S(λ) qG(λ) dλB = ∫ E(λ) S(λ) qB(λ) dλECE160Spring 2008Lecture 4Color in Image and Video11Camera Systems• Camera systems are made in a similar fashion; a studio-quality camera has three signals produced at each pixellocation (corresponding to a retinal position).• Analog signals are converted to digital, truncated tointegers, and stored. If the precision used is 8-bit, thenthe maximum value for any of R,G,B is 255, and theminimum is 0.• However, the light entering the eye of the computer useris that which is emitted by the screen - the screen isessentially a self-luminous source. Therefore we need toknow the light E(λ) entering the eye.ECE160Spring 2008Lecture 4Color in Image and Video12Gamma Correction• The light emitted is in fact roughly proportional to thevoltage raised to a power; this power is called gamma,with symbol γ.(a) Thus, if the file value in the red channel is R, the screenemits light proportional to Rγ, with SPD equal to that ofthe red phosphor paint on the screen that is the target ofthe red channel electron gun. The value of gamma isaround 2.2.(b) It is customary to append a prime to signals that aregamma-corrected by raising to the power (1/γ) beforetransmission. Thus we arrive at linear signals:R -> R’ = R1/ γ -> (R’)γ -> RECE160Spring 2008Lecture 4Color in Image and Video13Gamma Correction• Top left shows light output with no gamma-correction applied. Wesee that darker values are displayed too dark. This is also shownbottom left which displays a linear ramp from left to right.• Top right shows the effect of pre-correcting signals by applyingpower law R1/γ; it is customary to normalize voltage to [0,1].ECE160Spring 2008Lecture 4Color in Image and Video14Gamma Correction• A more careful definition of gamma recognizesthat a simple power law would result in aninfinite derivative at zero voltage – which makesconstructing a circuit to accomplish gammacorrection difficult to devise in analog.• In practice a more general transform, such asR -> R’ = a x R1/γ + bis used, along with special care at the origin: 4.5 x Vin; Vin < 0.018Vout = 1.099 x (Vin − 0.099);


View Full Document

UCSB ECE 160 - Color in Image and Video

Download Color in Image and Video
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Color in Image and Video and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Color in Image and Video 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?