introduction to color and vision

52
1 Vision and COLOR Jouko Kurki, 6.1.2014 [email protected] DVF_1_Color_and_Vision.ppt Copyright © Jouko Kurki, 2004-2014

Upload: eanwahm

Post on 06-May-2017

228 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to Color and Vision

1

Vision and COLOR

Jouko Kurki, 6.1.2014 [email protected]

DVF_1_Color_and_Vision.ppt Copyright © Jouko Kurki, 2004-2014

Page 2: Introduction to Color and Vision

2

Human vision (1) • Light hits photoreceptors in our retina

– The rods are extremely sensitive to light and provide achromatic vision (”Black and White TV vision) in low light condition

– The cones are less sensitive, but provide color vision • The signal travels by neural units to the brain where an image is formed

Page 3: Introduction to Color and Vision

3

Human vision (2) •Human eye (below) senses electromagnetic radiation in 400-700 nm band. With the help of the vision system man forms a color image of his/her surroundings.

•In the eye there are about 120 million rods (Fi sauva) used to sense the surroundings as a black and white TV-camera and about 6-7 million cones (in Finnish tappi) used to sense colors.

Page 4: Introduction to Color and Vision

4

Low light and color sensitivity •The human visual system has much greater sensitivity in low ambient illumination. Imaging is primarily accomplished by the rods when illumination levels are very low. The spectral sensitivity of the rods is attached. Rods sense only in grayscale so our perception is black and white image (B&W)

•The amount of rods is far greater than that of cones. Correspondingly the resolution of human is less for colors especially for moving pictures (video).

•This can be used by having the color resolution less for colors that for intensity. Acceptable factors are 1:2 (studio video applications) or 1:4 (consumer video applications)

Page 5: Introduction to Color and Vision

5

Simplified diagram of the eye-brain mechanism

From: M. Robin, M. Poulin, Digital Television Fundamentals

Page 6: Introduction to Color and Vision

6

Visual aquity

• Visual aquity is the angle subtended by the smallest visible detail in the object. It is about 1 arc min for the eye *).

• The quantity presenting a picture systems capability to present fine detail is called resolution. Television resolution is the number of alternating black and white lines that can be resolved over the full height of the screen, and is expressed as lines per height (LPH). It depends on the rod and cone structure of the eye and brightness and contras levels.

• The current 525 (NTSC) and 625 (PAL) line TV-systems were developed by assuming the visual aquity of 1 arc min and viewing distance = 6 x picture height .

*) M. Robin, M. Poulin, Digital Television Fundamentals

The relationship for the maximum number of vertical lines Nv that can resolved is: Nv = 1 / ( α * n ) α = minimum resolvable angle of the eye (in rad) = 1 arc min = 2.91*10-4 rad n = D/H = viewing distance / picture height For n = 6 = 3 m/ 0.5 m; Nv = 572 lines. This matches with the vertical resolution of TV: NTSC 480 active lines, PAL 576 active lines. For HD: Nv = 1080 lines => n = D/H ~3.1

Page 7: Introduction to Color and Vision

7

Reducing number of pixels (lower resolution)

Original picture

Enlargement 1

Enlargement 1

Enlargement 1 (pixels are clearly visible)

Page 8: Introduction to Color and Vision

8

Effect of compression (same amount of pixels)

Best quality, 551 kB Low quality, 41 kB Medium quality, 125 kB

Page 9: Introduction to Color and Vision

9

Contrast resolution

One cycle corresponds to 2 TV-lines

Page 10: Introduction to Color and Vision

Viewing distance • Visual acuity express how much detail one's eye can perceive and separate

– Given in cycles/degree (cycles as 2 lines) degrees. – Influenced by background, picture contrast...

• Display for SD resolution (576 lines): – Assuming acuity of ~30 cycles/degree for full detail perception – Height H imposes max viewing distance of D = H / (2* tan a/2) = 6H – Due to successful implementations of scaling circuitry digital content

when presented to a DH display via HDMI interface makes the SD quality viewable even for shorter distances !

• For HD display (1080 lines): – Assuming same acuity and height H – 1080/2 = 540 cycles -> min angle of 540 /30 = 18° -> max distance of

3.1H = ~3H

Page 11: Introduction to Color and Vision

11

Page 12: Introduction to Color and Vision

Problem. CIF Display Height ?

• What is height for CIF display? – Resolution of 352x288 (CIF) – Viewing distance of 1m (imposed)

• Design: – 288 lines -> 144 cycles – assume acuity of ~30 cycles/degree -> min angle of 144/30 = 4.8° – 4.8° angle, 1m distance -> height = 8.4cm. – For 0.5 m viewing distance height 4.2 cm = roughly size of a mobile phone

display. I.e. the phone display resolution needs to be around CIF = 352x288.

Page 13: Introduction to Color and Vision

13

Eye Contrast sensitivity vs. picture rate

Conclusion: In video contrast sensitivity drops very quickly after 15-25 pictures /sec. => in video resolution can be reduced From: M. Robin, M. Poulin, Digital Television Fundamentals

Cycles / 1 degree

Page 14: Introduction to Color and Vision

14

Human eye persistence and sensitivity for Luma and Croma in moving picture (video)

•The impression of light persist for about 0.1 s and 10 still pictures / sec gives an illusion of motion. Picture rate of more that 10 pictures /s is needed to avoid jerky movement and flicker (Fi välkkyminen).

•Eye resolution for colors is much less than for Luma signal at increasing picture rate. As a result colors can be coded at half resolution when picture rate is 25 Hz or above without loss of visual quality.

From: M. Robin, M. Poulin, Digital Television Fundamentals

Page 15: Introduction to Color and Vision

15

Persistence of vision and flicker

• Flicker is dependent on illumination (luminosity) of the picture. Increase of picture rate by 12.6 Hz increases flicker threshold by 10 times *). In motion pictures there are 24 pictures /s, but every frame is presented twice using a mechanical shutter, so flicker frequency is 48 Hz.

• In Television the applicable flicker frequency is the field (consisting of even or odd lines of the picture) frequency being 50 Hz for PAL- and 60 Hz for the NTSC systems.

• Table below *) present the picture luminosity values for the flicker threshold. Note that surroundings and other factors affect this value, e.g. movie theaters are darkened to lower the risk of flicker.

Flicker threshold values for common frequencies

*) M. Robin, M. Poulin, Digital Television Fundamentals

Page 16: Introduction to Color and Vision

16

Critical picture refresh rate

From: M. Robin, M. Poulin, Digital Television Fundamentals

Depends on: •Picture size /viewing •Distance •Picture brightness

Page 17: Introduction to Color and Vision

17

COLOR •Color is a function of the human visual system, and is not an intrinsic property. Objects don't "have" color, they give off light (at particular wavelenght(s)) that appears to be a color. Spectral power distributions (SPD) exist in the physical world, but color exists only in the mind of the beholder.

•White light includes all wavelengths in roughly equal portions (there are several standards for white light). The visible spectrum ranges from roughly 400 to 700 nm.

Page 18: Introduction to Color and Vision

18

Introduction to color spaces: The additive color wheel and RGB

The basic rules of additive color mixing: red + green = yellow green + blue = cyan blue + red = magenta red + green + blue = white

The RGB system is easy to understand and widely used Television, PC-monitors etc. •Used to express the color: The colors can be presented on the color circle. Colors (or hue or tint) are expressed as degrees on the color wheel: 0 o = red, 120 o = Green , 240 o = Blue. These are primary colors (in Finnish päävärit), the colors between the main colors are complementary colors (Fi välivärit). •At the edges the color is most saturated (clean color), moving towards center means more wash-out colors. •The intensity of light would be a perpendicular axis to the color wheel •the absence of light is darkness, add light to it to create desired color. •Color are super positioned (lamp overlap) •small elements (TV pixels, halftones) •Usually 8 bits / color (24 bits total), thus 224 ~ 16.7 million colors

Page 19: Introduction to Color and Vision

19

HSL Color space (hue, saturation, and luminance)

The acronym stands for hue, saturation, and luminance. This method of describing colors is also known as HSB (hue, saturation, and brightness), HSI (hue, saturation, and intensity), or HSV (hue, saturation, and value). The hue describes the position on the spectrum where the color is located (angle on color wheel), with red at the low end of the spectrum and violet at the high end of the spectrum. This number can be either an 8-bit value (a number between 0-255), a percentage (0-100 percent), or a number between 0-359 (representing the degrees on a color wheel). The saturation describes how bright the color is, between gray at the low end and very bright at the high end. This number can be either an 8-bit value or a percentage. The luminance (intensity or brightness) describes where on the scale between black and white the color falls. This method of describing color is easy for many artists to use, and it is usually used only in the interface of a graphics program. Once the graphic is saved, it is converted to RGB, Palletized, or CMYK color. The only time this color definition method is used natively is by color television, where it is referred to as YUV (Y-signal, U-signal, and V-signal.) The Y-signal represents the intensity, and is the only part of the signal a black-and-white television set uses. The U- and V-signals define a color spectrum that a color television uses to choose which color to display each pixel.

Page 20: Introduction to Color and Vision

20

Subtractive color mixing

The basic rules of subtractive color mixing: cyan + magenta = blue magenta + yellow = red yellow + cyan = green cyan + magenta + yellow = black the

subtractive color wheel

• Used in printing while adding inks • The applied inks reflect certain wavelengths to give appearance of a desired color • In most cases, each of the four channels is a value between 0 and 255. While this provides up to 4,294,967,296 different color combinations (32-bit), you actually only get the same number (16,777,216) of discrete colors as if you are using 24-bit colors, because many of the possible color combinations duplicate each other. E. g grey can presented as: Cyan=128, Magenta=128, Yellow=128, Black=0 or Cyan=0, Magenta=0, Yellow=0, Black=128.

• CMYK is not able to present as many colors as RGB. • When most computer programs display a graphic that uses CMYK, they first convert the image to CMY by adding the value of the black channel to each of the other three and then removing the black channel. This CMY can easily be converted to RGB.

Page 21: Introduction to Color and Vision

21

Color systems and Color Spaces Color space is the system under which colors are defined, e.g. RGB-system is used in TV and

PC-monitor to define the color. Two regions in our visual field that appear to have the same color need not have the same

spectrum.

Color reproduction schemes rely on the fact that any color visible by humans can be approximated by the combination of a limited subset of visible light frequencies.

The main color spaces have at least three dimensions: • RGB (red, green, blue) • CMY (cyan, magenta, yellow) • HSB (hue, saturation, brightness) • HLV (hue, lightness, value) • XYZ (tristimulus)

Some printing schemes use more than three colors of ink: •CMYK (cyan, magenta, yellow, key) •CMYK+spot (cyan, magenta, yellow, key, special color) •Hexachrome™ (cyan, magenta, yellow, black, green, orange)

Page 22: Introduction to Color and Vision

22

Color theory: (1) Human eye color sensitivities

There are three types of cones sensitive to: • Red (R, greek Rho) • Green (G, Gamma) and • Blue (B, Beta) light.

• Wavelength sensitivities of cones R, G and B. The overall sensitivity is V = sum of all sensitivities over wavelength

• Sensitivity curves are normally denoted by qk (k = R, G, or B)

• Human vision has 3 channels R, G and B; light striking to any cone adds to this channel over the sensitivity range. The system calculates the response to these channels according to;

Page 23: Introduction to Color and Vision

23

Image formation

Light source with spectral power distribution E(λ) strikes and object with reflectivity S(λ), so light hitting the eye is: C(λ) = E(λ)*S(λ) In this case the signals to the R, G and B channels of the eye are:

Page 24: Introduction to Color and Vision

24

Gamma correction • In CRT displays the output light intensity is I = Rγ (down left), i.e

nonlinear by exponent value around 2-2.5. • To compensate for this the RGB values need to be gamma

corrected according to R -> R’ = R1/γ (down right). As a result we arrive in “linear” signal. The value of gamma is around 2.2, but can vary in different systems / equipment.

Page 25: Introduction to Color and Vision

25

Gamma value sRGB

• Typical value of Gamma = γ = 2.2. • However vale differs in various systems, e.g. Apple computer has gamma correction of 1.8 in

display card whereas PC does not. • One attempt is “Standard” RGB, sRGB (γ = 2.4). This is to be included in all future HTML

standards. • Anyway: precaution is needed with color definitions. Certain RGB values might not give what is

desired.

Page 26: Introduction to Color and Vision

26

Color matching International Standards body for color Commission Internationale de L’Eclairage (abbreviated CIE) has defined ”color matching functions” based on 3 basic colors. These were defined in 1931 as lights with wavelengths 435.8 nm (blue), 546.1 nm (green) and 700 nm (red) *). In 1965 careful experiments were made to define Tri-Stimulus values for colors a human can see *). The color matching curves are the basis for Tri-stimulus values (X, Y, Z) that can be used to define all colors humans can (see Li & Drew, **).

Ref: *) R. Gonzalez, R. Woods, Digital image processing, 3rd ed. 2008, ISBN 0-13-168728-x **)Ze-Nian Li, Mark S. Drew, Fundamentals of Multimedia, Prentice Hall, NJ (USA), 2004. ISBN 0-013-061872-1

X refers to red, Y green and Z blue.

Page 27: Introduction to Color and Vision

27

CIE chromaticity diagram • From the eye’s color sensitivity curves we define TRI-STIMULUS VALUES

X, Y, Z. • The equations below mean that we sum all light from light source and then

divided it to “red green and blue channels”. Then light is weighted by human vision “sensitivity” curves and integrated to the channels. it by the sensitivity curves of the eye for Red, green and blue. The brain then process this data to produce all visible colors a human can see.

• These colors can be demonstrated on the CIE chromaticity diagram

• All color systems can be tied to these values.

• These TRI-STIMULUS VALUES X, Y, Z are adequate to present all possible colors a human can see, whereas e.g. RGB system cannot. This is because RGB has only three fixed nearly monochromatic colors. X, Y, Z is tied to the human eye’s sensitivity curves.

Simplified CIE diagram

Page 28: Introduction to Color and Vision

28

CIE cont. The magnitude of X, Y, and Z mean intensity of light. Thus there is some maximum value. In CIE system the X, Y, and Z values are normalized to values x, y, z as below

Now adding above x+y+z we get x+y+z=1 and thus we can calculate z = 1 – (x+y), Thus we need only 2 values to specify a color. These are x and y. Roughly x corresponds to red, y green and z blue. The result is plotted to a xy-curve showing the different colors *). For white light x=y=z, so we need to have x=1/3 and y=1/3. This is the white point (black dot in the picture). All colors need to be below the dotted line because x+y+z is max 1.

*) See details for mapping the graph from Ze-Nian Li, Mark S. Drew, Fundamentals of Multimedia, Prentice Hall, NJ (USA), 2004. ISBN 0-013-061872-1

Page 29: Introduction to Color and Vision

29

CIE chromaticity

diagram • CIE = Commission

Internationale de l'Eclairage The relative response of the red and green cones to different colors of light are plotted on the horizontal and vertical axes, respectively.

• Values on the tongue shaped perimeter (edges) are for light of a single wavelength (in nanometers).

• Values within the curve are for light of mixed frequency. The point in the center labeled D65 corresponds to light from a blackbody radiator at 6500 K -- the effective temperature of daylight at midday, a generally accepted standard value of white light.

Page 30: Introduction to Color and Vision

30

Monitor color, GAMUT

•The phosphor colors (nearly fixed wavelength Red, Green, Blue) are defined using CIE diagram by their x and y chromaticity values above. •The resulting color space of the RGB monitor is shown at right with a TRIANGLE. •Notise that not all colors can be shown on RGB monitor. •For out of GAMUT cased (e.g the small triangle, the nearest color in the gamut is shown.

Standard bodies: • NTSC, National Television System Committee

(TV-system in North America) • SMPTE, Society of Motion Picture and

Television Engineers (USA) • EBU, European Broadcasting Union

Page 31: Introduction to Color and Vision

31

X, Y, Z to RGB transform The actual tri-stimulus values are X, Y, Z containing also the magnitude of the color Setting R=1, G=1 and B =1 should give white but from monitor specification this is not quite true; a white point correction is needed. After math and after doing gamma correction (See Li & Drew fro details *)) we get using NTSC system x, y coefficients (validity in Europe need to be checked):

In real case we need gamma correction. This is accomplished by first doing gamma correction to R,GB vales. Y is calculated from the gamma corrected RGB values

*) Ref: Ze-Nian Li, Mark S. Drew, Fundamentals of Multimedia, Prentice Hall, NJ (USA), 2004. ISBN 0-013-061872-1

Page 32: Introduction to Color and Vision

32

LAB Color space • Lab-Color system is mathematical model to represent colors as reliably as possible to

avoid the dependend on the perceived color on the monitor or inks etc. • Not much used in normal work, but Adobe Photoshop uses Lab as its in internal color

system. • Lab is not dependent on adjustments of the PC monitor or printing colors behavior on

paper • The Lab color space is much wider than that of RGB or CMYK • Lab color space includes three channels: • L for Luminance (or brightness). L is measured in %: 0 % = black, 100 % = full brightness

(white) • a and b are complementary color channels:

• Channel a includes colors from green via grey (in the middle of the color wheel) to magenta; Channel b includes colors from blue via grey to yellow. The values range between –128…127. E.g positive value on channel a means greenish.

• then the color channel value is 0, the complementary color cancel each other and the color is grey, the brightness of which is determined by the L-channel.

• Working in Lab space is as fast as in RGB. Sometimes the separation of luminance and color is useful; e.g. sharpening only L-channel in Lab space can give better results than sharpening all colors in RGB-space.

Page 33: Introduction to Color and Vision

33

The L* a* b* (CIELAB) Color model, theory • Many high-end products, e.g. Adobe Photoshop

use CIELAB color model that can present more colors than RGB.

• Weber’s law from psychology states that the eye is most sensitive to differences in color .

• This leads to that in human vision system the changes in intensity or color are equally perceived if the RATIO of the changes are the same. This leads to logarithmic relationship between equally perceived units. *)

• In CIELAB space the units that are quantified are differences perceived in COLOR and BRIGHTNESS.

• CIELAB uses 1/3 power instead of logarithm and uses three values L*, a*, and b* where L* roughly corresponds to luminance and a*, b* specify together specify colorfulness and hue.

• L is specified as the middle bar in the middle. The “color wheel” moves up with increasing luminance

*) Again see Li & Drew for reference

Page 34: Introduction to Color and Vision

34

The L* a* b* (CIELAB) Color model

• IN L*a*b* the color difference is defined as

• Where

• Here Xn, Yn, Zn are values of the white point

Page 35: Introduction to Color and Vision

35

The L* a* b* Color model Auxiliary definitions are; Chroma is is a

scale for colorfulness, and hue is tone:

•The L*a*b* colors cane be presented according to the diagram attached

•Roughly maximum a corresponds to red and minimum to green; maximum b corresponds to yellow and minimum b blue.

•The chroma is a scale of colorfulness with more saturated colors at the outside of the CIELAB wheel at each brightness L* level, and more washed-out (desaturated) colors near the central of the achromatic axis. The HUE angle cab be said to express color

Page 36: Introduction to Color and Vision

36

CMY and CMYK

• CMY is the subtractive color system used in printers. The model is mathematically:

• Black color is obtained by adding all C, M, Y in full amount. However it is difficult to obtain full black and doing it from black ink would be cheaper. In printers black is then removed from CMY proportions and replaced by black ink. This is called undercolor removal. The new color definitions including this method are below. K is called key

• The reverse transform is as follows

Page 37: Introduction to Color and Vision

37

HSL Color space (hue, saturation, and luminance)

The acronym stands for hue, saturation, and luminance. This method of describing colors is also known as HSB (hue, saturation, and brightness), HSI (hue, saturation, and intensity), or HSV (hue, saturation, and value). The hue describes the position on the spectrum where the color is located (angle on color wheel), with red at the low end of the spectrum and violet at the high end of the spectrum. This number can be either an 8-bit value (a number between 0-255), a percentage (0-100 percent), or a number between 0-359 (representing the degrees on a color wheel). The saturation describes how bright the color is, between gray at the low end and very bright at the high end. This number can be either an 8-bit value or a percentage. The luminance (intensity or brightness) describes where on the scale between black and white the color falls. This method of describing color is easy for many artists to use, and it is usually used only in the interface of a graphics program. Once the graphic is saved, it is converted to RGB, Palletized, or CMYK color. The only time this color definition method is used natively is by color television, where it is referred to as YUV (Y-signal, U-signal, and V-signal.) The Y-signal represents the intensity, and is the only part of the signal a black-and-white television set uses. The U- and V-signals define a color spectrum that a color television uses to choose which color to display each pixel.

Page 38: Introduction to Color and Vision

38

xvYCC or Extended-gamut YCC (also called x.v.Color); modified from Wikipedia *)

xvYCC or Extended-gamut YCC (also x.v.Color) is a color space that can be used in the video electronics of television sets to support a gamut 1.8 times as large as that of the sRGB color space.[1] xvYCC was specified by the IEC in October 2005 and published in January 2006 as IEC 61966-2-4. xvYCC was motivated by the fact that modern display and capture technologies often have underlying RGB primaries with significantly higher saturation than the traditional CRT displays, so could display/capture a wider color gamut. But these devices have been unable to do this without upsetting basic calibration, as all existing video storage and transmission systems are based on CRT primaries, and are hence limited to the CRT gamut. xvYCC-encoded video retains the same color primaries and white point as the basic BT.709, and uses either a BT.601 or BT.709 RGB-to-YCC conversion matrix and encoding. This allows it to travel through existing digital YCC data paths, and any colors within the normal gamut will be compatible. *) http://en.wikipedia.org/wiki/XvYCC, 21.9.2009

Page 39: Introduction to Color and Vision

39

x.v.Color, continued • But xvYCC permits YCC values that, while within the encoding range of YCC, have

chroma values outside the range 16–240, or that correspond to negative RGB values, and hence would not have previously been valid. These are used to encode more saturated colors. For example, a cyan that lies outside the basic gamut of the primaries can be encoded as "green plus blue minus red".[3]

• These extra-gamut colors can then be displayed by a device whose underlying technology is not limited by the standard primaries.

• In a paper published by Society for Information Display in 2006, the authors mapped the 769 colors in the Munsell Color Cascade to the BT.709 space and to the xvYCC space. 55% of the Munsell colors could be mapped to the sRGB gamut, but 100% of those colors could map to the xvYCC gamut.[4] Deeper hues can be created - for example a deeper red by giving the opposing color (cyan) a negative coefficient.

• A mechanism for signaling xvYCC support and transmitting the gamut boundary definition for xvYCC has been defined in the HDMI 1.3 Specification. No new mechanism is required for transmitting the xvYCC data itself, as it is compatible with HDMI's existing YCbCr formats, but the display needs to signal its readiness to accept the extra-gamut xvYCC values, and the source needs to signal the actual gamut in use to help the display to intelligently adapt extreme colors to its own gamut limitations.

• This should not be confused with HDMI 1.3's other new color feature, Deep Color. This is a separate feature that increases the precision of brightness and color information, and is independent of xvYCC.

• xvYCC is not supported by DVD-Video or Blu-ray, but is supported by the high-definition recording format AVCHD.

Page 40: Introduction to Color and Vision

40

Summary of colors Additive color mixing: The primary colors of the human visual system are red, green, and blue. No combination of two primary colors can reproduce a third primary color. Combinations of the primary colors will reproduce a wider range of colors than can be reproduced using any other three colors. Combinations of primary colors follow the rules of additive color mixing.

red + green = yellow green + blue = cyan blue + red = magenta red + green + blue = white no light = black

Systems that work by additive color mixing include: movie film, photographic prints & slides, television and computer displays The secondary colors of the human visual system are cyan, magenta, and yellow. A complementary color is formed by subtracting a primary color from white light. Every secondary color is the complement of a primary color.

white - red = cyan white - green = magenta white - blue = yellow

Subtractive color mixing: Combinations of the secondary colors (pigments) follow the rules of subtractive color mixing.

cyan + magenta = blue magenta + yellow = red yellow + cyan = green cyan + magenta + yellow = black (though the quality of this black is poor) no pigment = white

Systems that work by subtractive color mixing include:

three-color printing pigment mixing (as in custom paints)

Every primary color is the complement of a secondary color.

white - cyan = red white - magenta = green white - yellow = blue

Combining complementary colors of light produces light that looks white. As a result, complementary colors are sometimes called opposite colors.

red + cyan = white green + magenta = white blue + yellow = white

Mathematical equations exist fro converting between color spaces, see e.g. *) R. Gonzalez, R. Woods, Digital image processing, 3rd ed. 2008, ISBN 0-13-168728-x **)Ze-Nian Li, Mark S. Drew, Fundamentals of Multimedia, Prentice Hall, NJ (USA), 2004. ISBN 0-013-061872-1

Page 41: Introduction to Color and Vision

41

Colors in Digital Video

Page 42: Introduction to Color and Vision

42

CAMERA PICTURE / TV PICTURE FORMATION AND INTERFACES

• In digital cameras and color TV system the picture is broken to RGB-components in the still / video camera. This can be done by filters or prisms. The number of imaging cells (CMOS or CCD) can also vary: There can be 3 for high quality / professional video cameras. In digital still cameras and lower cost video cameras there is one CMOS cell or CCD device and a colour filter in front of it for different color components of the picture.

Page 43: Introduction to Color and Vision

43

Color models in video Color definitons in digital video are laregly bsed on concepts of analogue TV. Commonly separately defined Luminance (corroesponding to black and white TV signal) data is associated with Chroma carrying color information.

YUV color model •Initially used in PAL analog video •A version now also used in internatilallly standardised CCIR 601 digital video

•The signal is composed of Luminance (Y’) being nearl the CIE luminace value. Y’ for gamma corrected RGB signals is:

Page 44: Introduction to Color and Vision

44

Chroma in YUV model Chroma is the colorfulness signal = Difference between color and reference white signal at the same luminance level. Chroma is presented by color differences is U and V as follows:

Substituting Y from normal definition we get all components as follows from gamma corrected RGB signal:

R’G’B’ can be obtained by inverting the matrix. Now for grey signal R’,G’ and B’ are the same, say e.g. k. Thus R’=G’=B’=k. Now because Y’ is:

The Y’ value is also k (e.g. for R’=G’=B=1 Y’ is 1 (sum of the coefficients is the =1). Thus, with the grey signal U=V=0. This was (is) useful for making B&W TV compatible for color TV-signal. Ref: Ze-Nian Li, Mark S. Drew, Fundamentals of Multimedia, Prentice Hall, NJ (USA), 2004. ISBN 0-013-061872-1

Page 45: Introduction to Color and Vision

45

Scaling in YUV model, YPbPr

• For actual implementation U an V are rescaled to get a more convenient maximum and minimum.

• For analog video U and V are limited to +/-0.5 * maximum of Y’ • YPbPr: Actual voltages are in another non-normalized range, e.g. of

the Y’ = 0..700 mV. The rescaled U and V called Pb and Pr are in the range +/-350 mV. This is called (analog) COMPONENT VIDEO (3 signals), In this context YUV is called YPbPr.

• COMPOSITE VIDEO (analog): – U and V are QAM modulated to one chroma signal (at fc=4.43

color sub-carrier in PAL):

Page 46: Introduction to Color and Vision

46

YCbCr Color model The international standard for component DIGITAL video is ITU-R BT.601-4 (known as “rec. 601”) This standard uses yet another color space: Y Cb Cr, often simply written as YCbCr YCbCr is used in JPEG, and MPEG standards and is closely related to YUV In some software systems the values are shifted by 0.5 to make them 0..1. Then:

Summing these, the definition for rec. 601 digital video is:

Ref: Ze-Nian Li, Mark S. Drew, Fundamentals of Multimedia, Prentice Hall, NJ (USA), 2004. ISBN 0-013-061872-1

Page 47: Introduction to Color and Vision

47

RGB - YCbCb signal processing

The Matrix converts the RGB signal to Luminance (brightness) Y: Y = 0.299R+ 0.587G + 0.114B Gamma corrected signal is: Y’ = 0.299R’ + 0.587G’ + 0.114B’ And two color difference signals (Cr, Cb) : Cr = 0.713 (R-Y) = 0.701R–0.587G – 0.114B (corresponds to V-signal) Cb = 0.564 (B-Y) = -0.169R – 0.331G – 0.500B

(corresponds to U-signal)

The Y, Cr, and Cb signals are carried by the TV system to the TV receiver, that converts them back to RGB signals for display in TV. (No scaling by adding 0.5 done here)

• Human vision system (HVS) says that human eye is less sensitive lacking detail in colors (Chrominance = Chroma) than for brightness (Luminance = Luma). To take advantage of this picture signal is divided to luminance and Chrominance signals for separate treatment in compression, storage and transport.

• The conversion RGB < - > YUV is linear and works to both directions. Display uses RGB.

Page 48: Introduction to Color and Vision

48

R

G

B B-Y

R-Y

Y

Stereo Audio

L

R

C

Y

Y/C, S-Video Matrix

Composite video

R

G

B B-Y, Cb

R-Y, Cr

Y’

Stereo Audio

L

R

C

Y

Component video:

Y, Cr, Cb signal (or YUV-signal) Matrix

QAM Modulation and Modulation to IF-carrier at 4.43 MHz

Luminance and Chroma combined in one cable

Y Cr Cb / Y/C / S-video Interface

Chroma

Luma

Page 49: Introduction to Color and Vision

49

Footroom, headroom

• Rec. 601 specifies in practise 8-bit video with Y’ value only between 16-235. Values below 16 are called footroom (sometimes used for blacker than black or other processing) and headroom above 235.

• Cr and Cb have bit values are in range 16..240. They are scaled by the +128 offset to have a range of +/-112.

• Values 0 and 255 are used for sync purposes. • Precaution: In different systems and in different areas, USA, Japan,

Europe and systems footroom and headroom may vary. Could cause problems / change of video.

• See x.v. Color also for exceptions

Page 50: Introduction to Color and Vision

50

Extra slides, not part of course

Page 51: Introduction to Color and Vision

51

The painter's color wheel.

The painter's color wheel is promoted by painters and art teachers. The misidentification of these colors as "primary" is an historical artifact. A greater range of colors can be reproduced using cyan, magenta, and yellow than can be reproduced using red, yellow, and blue. The primary colors are not red, yellow, and blue. It is a convenient way to understand how to mimic one color by mixing red, yellow, and blue. But these colors do not satisfy the definition of primary colors in that they can't reproduce the widest variety of colors when combined. Cyan, magenta, and yellow have a greater chromatic range as evidenced by their ability to produce a reasonable black. No combination of red, yellow, and blue pigments will approach black as closely as do cyan, magenta, and yellow. Johann Wolfgang von Goethe (1749-1832), student of the arts, theatrical director, and author (Iphigenia at Taurus, Egmont, Faust). Lots of interesting descriptive information on the subjective nature of color, which many physicists of his day ignored, but does not propose a physical model of color. The theory of colors, in particular, has suffered much, and its progress has been incalculably retarded by having been mixed up with optics generally, a science which cannot dispense with mathematics; whereas the theory of colors, in strictness, may be investigated quite independently of optics.

Color mixing rules from the English translation of Goethe's Theory of Colors (1810).

The painter's color wheel.

Page 52: Introduction to Color and Vision

52

Painters color wheel, continued Color is a law of nature in relation with the sense of sight. It is an elementary phenomenon in nature adapted to the sense of vision. It is not light, in an abstract sense, but a luminous image that we have to consider. Yellow, blue, and red, may be assumed as pure elementary colors, already existing; from these, violet, orange, and green, are the simplest combined results. That all the colors mixed together produce white, is an absurdity which people have credulously been accustomed to repeat for a century, in opposition to the evidence of their senses. Rules with the painters color wheel: The "primary colors" of the painter's color wheel are red, yellow, and blue When combining paints (or other similar pigment carriers) in equal quantities:

red + yellow = orange yellow + blue = green blue + red = purple (which is not the same as violet) red + yellow + blue = brown no paint = white