+ All Categories
Home > Documents > Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave....

Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave....

Date post: 21-Dec-2015
Category:
View: 233 times
Download: 4 times
Share this document with a friend
Popular Tags:
26
Lecture 02 Lecture 02 Colour Models in Images Colour Models in Images and Video and Video
Transcript
Page 1: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

Lecture 02Lecture 02

Colour Models in Images and Colour Models in Images and VideoVideo

Page 2: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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).

Page 3: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

Spectral Power Distribution (SPD)

SPD for for typical outdoor light. The symbol for wavelength is λ. This curve is called E(λ).

Page 4: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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.

Page 5: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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

Page 6: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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.

Page 7: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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λ

Page 8: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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.

Page 9: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

The Image Formation Model

Page 10: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

Surface reflectanceSurface 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(λ)

Page 11: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

The Image FormationThe Image Formation

R = ∫ E(λ)S(λ)qR(λ)dλ

G = ∫ E(λ)S(λ)qG(λ)dλ

B = ∫ E(λ)S(λ)qB(λ)dλ

Page 12: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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.

Page 13: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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

Page 14: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

Colour-Matching FunctionsColour-Matching Functions Many colour applications involve specifying and Many colour applications involve specifying and

re-creating a particular desired colour.re-creating a particular desired colour. A technique evolved in psychology for matching a A technique evolved in psychology for matching a

combination of basic R, G, and B lights to a given combination of basic R, G, and B lights to a given shade. shade.

A particular set of three basic lights was A particular set of three basic lights was available, called the set of available, called the set of colour primariescolour primaries. .

To match a given shade, a set of observers was To match a given shade, a set of observers was asked to separately adjust the brightness of the asked to separately adjust the brightness of the three primaries using a set of controls, until the three primaries using a set of controls, until the resulting spot of light most closely matched the resulting spot of light most closely matched the desired colour.desired colour.

Page 15: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

ColourrimeterColourrimeter

Page 16: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

CIE RGB colour-matching functionsCIE RGB colour-matching functions The colour primaries can be used to match monochromatic The colour primaries can be used to match monochromatic

(single wavelength) light. Doing this for the range of visible (single wavelength) light. Doing this for the range of visible wavelengths leads to CIE (Commission Internationale de wavelengths leads to CIE (Commission Internationale de L’Eclairage) colour-matching functions.L’Eclairage) colour-matching functions.

Page 17: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

CIE RGB colour-matching functionsCIE RGB colour-matching functions

The negative parts in the CIE RGB The negative parts in the CIE RGB colour matching functions indicates colour matching functions indicates that some colours cannot be that some colours cannot be reproduced by a linear combination reproduced by a linear combination of the primaries.of the primaries.

For such colours one or more of the For such colours one or more of the primaries has to be shifted to the primaries has to be shifted to the other side thus resulting in negative other side thus resulting in negative colours!colours!

Page 18: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

CIE XYZ colour-matching functionsCIE XYZ colour-matching functions

A set of fictitious primaries was A set of fictitious primaries was devised that led to colour-matching devised that led to colour-matching functions with only positive values.functions with only positive values.

These result from a linear (3x3 These result from a linear (3x3 matrix) transform from CIE RGB matrix) transform from CIE RGB colour-matching functions.colour-matching functions.

Page 19: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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

Page 20: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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

dxEX )()(

dyEY )()(

dzEZ )()(

Page 21: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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.

Page 22: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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.

Page 23: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

Transformation from RGB to CMY

Page 24: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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.

Page 25: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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

Page 26: Lecture 02 Colour Models in Images and Video. Light and Spectra Light is an electromagnetic wave. Its colour is characterized by the wavelength content.

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’.


Recommended