1 / 26

Lecture 02

Lecture 02. Colour Models in Images and Video. Light and Spectra. Light is an electromagnetic wave. Its colour is characterized by the wavelength content of the light. Laser light consists of a single wavelength: e.g., a ruby laser produces a bright, scarlet-red beam.

faunia
Télécharger la présentation

Lecture 02

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 02 Colour Models in Images and Video

  2. Light and Spectra • Light is an electromagnetic wave. Its colour is characterized by the wavelength content of the light. • Laser light consists of a single wavelength: e.g., a ruby laser produces a bright, scarlet-red beam. • Most light sources produce contributions over many wavelengths. • However, humans cannot detect all light, just contributions that fall in the ”visible wavelengths”. • Short wavelengths produce a blue sensation, long wavelengths produce a red one. • Visible light is an electromagnetic wave in the range 400 nm to 700 nm wavelength (where nm stands for nanometres, 10-9 meters).

  3. Spectral Power Distribution (SPD) • SPD for for typical outdoor light. The symbol for wavelength is λ. This curve is called E(λ).

  4. Human Vision • The eye works like a camera, with the lens focusing an image onto the retina (upside-down and left-right reversed). • The retina consists of an array of rods and three kinds of cones. • The rods come into play when light levels are low and produce a image in shades of grey (”all cats are grey at night!”). • For higher light levels, the cones each produce a signal. Because of their differing pigments, the three kinds of cones 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 B into a high-light-level achromatic channel.

  5. Spectral Sensitivity of the Eye • R,G, and B cones, and Luminous Efficiency curve V(λ). • These spectral sensitivity functions are usually denoted by letters other than ”R, G, B”; here let’s use a vector function q(λ), with components • q(λ) = (qR(λ), qG(λ), qB(λ))T

  6. Spectral Sensitivity of the Eye • The eye is most sensitive to light in the middle of the visible spectrum. • The sensitivity of our receptors is also a function of wavelength λ. • The Blue receptor sensitivity is not shown to scale because it is much smaller than the curves for Red or Green – Blue is a late addition, in evolution. • Statistically, Blue is the favourite colour of humans, regardless of nationality.

  7. The response in each colour channel for daylight • The response in each colour channel in the eye is proportional to the number of neurons firing. • A laser light at wavelength would result in a certain number of neurons firing. An SPD is a combination of single-frequency lights (like ”lasers”), so we add up the cone responses for all wavelengths, weighted by the eye’s relative response at that wavelength. • We can succinctly write down this idea in the form of an integral: • R = ∫ E(λ)qR(λ)dλ • G = ∫ E(λ)qG(λ)dλ • B = ∫ E(λ)qB(λ)dλ

  8. Luminous Efficiency curve • The rod sensitivity curve looks like the luminous-efficiency function V(λ) but is shifted to the red end of the spectrum. • The achromatic channel produced by the cones is approximately proportional to 2R+G+B/20.

  9. The Image Formation Model

  10. Surface reflectance • Surfaces reflect different amounts of light at different wavelengths, and dark surfaces reflect less energy than light surfaces. • The reflectance function is denoted S(λ). • Image formation is thus: • Light from the illuminant with SPD E(λ) impinges on a surface, with surface spectral reflectance function S(λ), is reflected, and then is filtered by the eye’s cone functions q(λ). • The function C(λ) is called the colour signal and consists of the product of E(λ), the illuminant, times S(λ), the reflectance: • C(λ) = E(λ)S(λ)

  11. The Image Formation R = ∫ E(λ)S(λ)qR(λ)dλ G = ∫ E(λ)S(λ)qG(λ)dλ B = ∫ E(λ)S(λ)qB(λ)dλ

  12. Camera Systems and Monitors • Camera systems are made in a similar fashion; a studio-quality camera has three signals produced at each pixel location (corresponding to a retinal position). • Analog signals are converted to digital, truncated to integers, and stored. If the precision used is 8-bit, then the maximum value for any of R; G;B is 255, and the minimum is 0. • However, the light entering the eye of the computer user is that which is emitted by the screen—the screen is essentially a self-luminous source. Therefore we need to know the light E(λ) entering the eye.

  13. Gamma Correction • The RGB numbers in an image file are converted back to analog and drive the electron guns in the cathode ray tube (CRT). The light emitted is in fact roughly proportional to the voltage raised to a power; this power is called gamma, with symbol γ. • Thus, if the file value in the red channel is R, the screen emits light proportional to R, with SPD equal to that of the red phosphor paint on the screen that is the target of the red channel electron gun. The value of gamma is around 2.2. • It is customary to append a prime to signals that are gamma-corrected by raising to the power (1/γ) before transmission. Thus we arrive at linear signals: • R ⇒ R’ = R1/ γ⇒ (R’)γ = R

  14. Colour-Matching Functions • Many colour applications involve specifying and re-creating a particular desired colour. • A technique evolved in psychology for matching a combination of basic R, G, and B lights to a given shade. • A particular set of three basic lights was available, called the set of colour primaries. • To match a given shade, a set of observers was asked to separately adjust the brightness of the three primaries using a set of controls, until the resulting spot of light most closely matched the desired colour.

  15. Colourrimeter

  16. CIE RGB colour-matching functions • The colour primaries can be used to match monochromatic (single wavelength) light. Doing this for the range of visible wavelengths leads to CIE (Commission Internationale de L’Eclairage) colour-matching functions.

  17. CIE RGB colour-matching functions • The negative parts in the CIE RGB colour matching functions indicates that some colours cannot be reproduced by a linear combination of the primaries. • For such colours one or more of the primaries has to be shifted to the other side thus resulting in negative colours!

  18. CIE XYZ colour-matching functions • A set of fictitious primaries was devised that led to colour-matching functions with only positive values. • These result from a linear (3x3 matrix) transform from CIE RGB colour-matching functions.

  19. CIE XYZ colour-matching functions Note that ӯ(λ) is exactly equal to the luminous-efficiency curve we have seen before.

  20. CIE XYZ values for light with SPD E(λ)

  21. RGB based Colour Models • These are device dependent colour models unlike CIEXYZ which is a device independent colour model. • variants: • ICC RGB: defined by International colour Consortium. Complex and has extra unnecessary overhead information to be used in formats for certain applications such as internet. • sRGB: Simpler standard for internet applications. • Other device based RGB colour models exist. • Gamma correction may be handled differently among different RGB colour models. • They are additive colour models. i.e. ”white” is the addition of Red, Green, and Blue while ”black” means there is no light.

  22. Subtractive Colour: CMY Colour Model • So far, we have effectively been dealing only with additive colour. Namely, when two light beams impinge on a target, their colours add; when two phosphors on a CRT screen are turned on, their colours add. • But for ink deposited on paper, the opposite situation holds: e.g. To form black we need to add some kind ink primaries. These ink primaries have absorption (subtraction) properties. • Instead of red, green, and blue primaries, we need primaries that amount to -red, -green, and -blue. i.e., we need to subtract R, or G, or B. • These subtractive colour primaries are Cyan (C), Magenta (M) and Yellow (Y) inks.

  23. Transformation from RGB to CMY

  24. Under-colour Removal: CMYK System • For Sharper and cheaper printer colours: calculate that part of the CMY mix that would be black, remove it from the colour proportions, and add it back as real black.

  25. Colour Models in Video • Largely derive from older analog methods of coding colour for TV. Luminance is separated from colour information. • For example, a matrix transform method called YIQ is used to transmit TV signals in North America and Japan. • This coding also makes its way into VHS video tape coding in these countries since video tape technologies also use YIQ. • In Europe, video tape uses the PAL or SECAM coding, which are based on TV that uses a matrix transform called YUV. • Finally, digital video mostly uses a matrix transform called YCbCr that is closely related to YUV

  26. YUV Colour Model • Let gamma-corrected non-linear R, G, and B are represented by R’ , G’ , and B’ respectively. • There are termed non-linear since colours cannot be formed by a linear combination of R’ , G’ , and B’ unlike R, G, and B. • It codes a luminance signal (sometimes called luma) equal to Y’ (gamma-corrected). • This luma is very much the brightness of the signal. • Apart from brightness, we need colourfulness scale: To this end we have chrominance which refers to the difference between a colour and a reference white at the same luminance. U, and V code this information: • U = B’ − Y’ • V = R’ − Y’ • For a grey-image (black-white), the chrominance values U, V are zero and hence Colour TV can be displayed on black-white television by just using Y’.

More Related