Lecture Color Image Processing by Shahid Farid
What is color? Why colors? How we see objects? Photometry, Radiometry and Colorimetry Color measurement Chromaticity diagram Shahid Farid, PUCIT 2
Color or colour is the visual perceptual property corresponding in humans to the categories called red, yellow, blue and others. Visual perception is the ability to interpret information and surroundings from visible light reaching the eye. The resulting perception is also known as eyesight, sight or vision. Shahid Farid, PUCIT 3
Color plays a vitally important role in the world in which we live. Color can sway thinking, change actions, and cause reactions. It can irritate or soothe your eyes, raise your blood pressure or suppress your appetite. Shahid Farid, PUCIT 4
Shahid Farid, PUCIT 5
Shahid Farid, PUCIT 6
Shahid Farid, PUCIT 7
Shahid Farid, PUCIT 8
The color of an object depends on what happens as light hits it. Objects absorb some colors and reflect others. The colors you see are the colors reflected by the object. A green leaf absorbs all colors except green. It reflects green, so green is the color you see. Shahid Farid, PUCIT 9
The way we see objects around us depends on three factors. 1. Light. We cannot see if there is no light. Most of us have experienced different perception under different lighting conditions (remember ladies checking the clothes colors in front of the shop in the daylight). 2. Object characteristics Some objects are red, some are blue, etc. 3. Human observer It is impossible to describe the color sensation in our mind. Shahid Farid, PUCIT 10
Light measuring (Radiometry and Photometry) Color measuring (Colorimetry) Shahid Farid, PUCIT 11
Radiometry is the science of measuring light in any portion of the spectrum. Therefore, the color is not important to the radiometry. Light is radiant energy. Electromagnetic radiation transports energy through space. A broadband source, like the Sun, emits the energy throughout most of the spectrum, while, on the other hand, single-wavelength laser emits radiation only at one specific wavelength. Shahid Farid, PUCIT 12
Photometry measures visible light in units that are weighted according to the sensitivity of the human eye. Our eye is a complex, nonlinear, detector of electromagnetic radiation with wavelengths between 380 and 770 nm. The sensitivity of the human eye varies with the wavelength. Shahid Farid, PUCIT 13
Shahid Farid, PUCIT 14
Colorimetry is the science of measuring colors. Although each of us can perceive colors slightly differently, the CIE (Commission Internationale d'eclairage) has defined a standard observer. A set of standard conditions for performing color measuring experiments has also been proposed by CIE. Shahid Farid, PUCIT 15
Shahid Farid, PUCIT 16
Let us denote the spectral sensitivity of R, G, B cones as a vector q(λ) q(λ)=[q R (λ), q G (λ), q B (λ)] T Shahid Farid, PUCIT 17
The sensitivity of each cones can be specified as R= E(λ) q R (λ) d λ ---------- (1) G= E(λ) q G (λ) d λ ---------- (2) B= E(λ) q B (λ) d λ ---------- (3) Shahid Farid, PUCIT 18
Equations 1,2 & 3 applies for self luminous objects, but we mostly image light reflected from an objects The reflectance S(λ) varies from objects to objects The formations would be as follows Light from illuminant with SPD E(λ) falls on the object with reflectance S(λ) and is reflected, then filtered by the eyes sensitivity functions q(λ) & the image formation model is now R= E(λ) S(λ) q R (λ) d λ ---------- (4) G= E(λ) S(λ) q G (λ) d λ ---------- (5) B= E(λ) S(λ) q B (λ) d λ ---------- (6) Shahid Farid, PUCIT 19
The formula for the CIE tristimulus values (X, Y, Z) is X= E(λ) x(λ) d λ----- (7) Y= E(λ) y(λ) d λ----- (8) Z= E(λ) z(λ) d λ----- (9) CIE standard color matching functions Shahid Farid, PUCIT 20
Factoring out luminance to concentrate on color, we get x= X /(X+Y+Z) y= Y /(X+Y+Z) z= Z /(X+Y+Z) Now z=1-x-y, means z is redundant Plotting x vs. y for colors in the visible spectrum we get CIE Chromaticity diagram Shahid Farid, PUCIT 21
What is the x, y value of Day Light in chromaticity diagram? Also find the corresponding R, G and B value(s).? Shahid Farid, PUCIT 22
Session 7
Color models CMY (Cyan-Magenta-Yellow) CMYK (Cyan-Magenta-Yellow-Black) HSI(Hue-Saturation-Intensity) YUV (Y Cr Cb) Shahid Farid, PUCIT 24
A color model is an abstract mathematical model describing the way colors can be represented as tuples of numbers, typically as three or four values or color components. When this model is associated with a precise description of how the components are to be interpreted (viewing conditions, etc.), the resulting set of colors is called color space. Shahid Farid, PUCIT 25
An additive color model involves light emitted directly from a source or illuminant of some sort. The additive reproduction process usually uses red, green and blue light to produce the other colors. Combining one of these additive primary colors with another in equal amounts produces the additive secondary colors cyan, magenta, and yellow. Combining all three primary lights (colors) in equal intensities produces white. Shahid Farid, PUCIT 26
Shahid Farid, PUCIT 27
A subtractive color model explains the mixing of paints, dyes, inks, and natural colorants to create a full range of colors, each caused by subtracting (that is, absorbing) some wavelengths of light and reflecting the others. The color that a surface displays depends on which colors of the electromagnetic spectrum are reflected by it and therefore made visible. Shahid Farid, PUCIT 28
Shahid Farid, PUCIT 29
Shahid Farid, PUCIT 30
Shahid Farid, PUCIT 31
Shahid Farid, PUCIT 32
Original Red Band Green Band Blue Band Shahid Farid, PUCIT 33
Shahid Farid, PUCIT 34
RGB to CMY CMY to RGB Shahid Farid, PUCIT 35
For printing and graphics art industry, CMY is not enough; a fourth primary, K which stands for key or black, is added. + + + = Shahid Farid, PUCIT 36
HUE A subjective measure of color Average human eye can perceive ~200 different colors Saturation Relative purity of the color. Mixing more white with a color reduces its saturation. Pink has the same hue as red but less saturation Intensity The brightness or darkness of an object Shahid Farid, PUCIT 37
H dominant wavelength S purity % white I Intensity Shahid Farid, PUCIT 38
Hue is defined as an angle 0 degrees is RED 120 degrees is GREEN 240 degrees is BLUE Saturation is defined as the percentage of distance from the center of the HSI triangle to the pyramid surface. Values range from 0 to 1. Intensity is denoted as the distance up the axis from black. Values range from 0 to 1 Shahid Farid, PUCIT 39
Shahid Farid, PUCIT 40
Shahid Farid, PUCIT 41
Shahid Farid, PUCIT 42
Shahid Farid, PUCIT 43
The YUV standard known before as YCrCb (Y Cr Cb), is a colour representation model dedicated to analogue video. It is based on a video transmission mode with separate components using three different cables to carry information regarding luminance (luminosity) and the two chrominance (colour) components. It is the format used in the PAL (Phase Alternation Line) and SECAM (Séquentiel Couleur avec Mémoire) standards. Shahid Farid, PUCIT 44
The Y parameter represents the luminance (i.e. information in black and white), U and V make it possible to represent the chrominance (i.e. information regarding the colour). Developed in order to allow colour information to be transmitted to colour television sets, while making sure that the existing black and white television sets continue to display an image in tones of grey. Shahid Farid, PUCIT 45
Y = 0.299R + 0.587 G + 0.114 B U = -0.147R - 0.289 G + 0.436B = 0.492(B - Y) V = 0.615R -0.515G -0.100B = 0.877(R-Y) U is sometimes written as Cr and V is sometimes written as Cb, hence the notation YCrCb. Shahid Farid, PUCIT 46
B = 1.164(Y - 16) + 2.018(U - 128) G = 1.164(Y - 16) - 0.813(V - 128) - 0.391(U - 128) R = 1.164(Y - 16) + 1.596(V - 128) Shahid Farid, PUCIT 47
Digital Image Processing, Gonzalez http://en.kioskea.net/contents/video/yuvycrcb.php3 http://en.wikipedia.org/wiki/color_models http://en.wikipedia.org/wiki/color http://www.surfnetkids.com/colors.htm http://www.cg.tuwien.ac.at/research/theses/ matkovic/node9.html http://www.dirjournal.com/businessjournal/how-colors-may-effect-yourproductivity-and-success/ Shahid Farid, PUCIT 48
Lecture Color Image Processing By: Dr. Shahid Farid Assistant Professor, PUCIT Email: shahid@pucit.edu.pk