程序代写 CS4551

Multimedia Software Systems CS4551
Color Spaces and Models for Image and Video Systems
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Why Do We Study Color?

Copyright By PowCoder代写 加微信 powcoder

• Example: sell an object on the web. Object images may come from photographic film (via a scanner), digital still camera, camcorders. Images for customer may be printed on catalog or downloaded at user’s home and printed on user’s local printer.
• The Color Problem – How do you ensure that the object color will look the same after processing, transmission and visualization/printing? => we need to understand the physics of color and human’s color perception.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Color Science – Light and Spectra
• Light is an electromagnetic wave.
• Its color is characterized by the wavelength of the wave.
– Measure unit of wavelength: nm (nano-meter, 10-9 meter).
– Note : Wavelength = Speed of light in vacuum / Frequency, nm (nano meter) = 1.0×10−9 meters
– Laser light consists of a single wavelength.
– Most light consists of many wavelengths.
– Spectrophotometer : a device that measures light.
• The wavelengths range of visible light by humans is limited: 400~700nm.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Spectral Power Distribution (SPD) = Spectrum
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Human Vision
• Lens focusing an image onto the retina (It is comparable to the film in a camera).
• In the retina, there are two types of photoreceptors, rods (~120 millions) and cones (6~7 millions).
– Rods responds to brightness. Not sensitive to colors. “At night, all cats are gray”
– Cones are sensitive to colors. 3 types of cones with different spectral sensitivity.
• Brain uses signal from optic nerves makes use combination of RGB or difference of RGB
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

• Cone sensitivities – each cone has a different spectral absorption.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Different Colors on Different Objects • r() is the surface reflectance function
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Different Colors on Different Objects r() is the surface reflectance function.
R= f()r()s1()d
G= f()r()s2()d
B= f()r()s3()d min
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Tri-stimulus Vector
• s1(), s2(), s3() along with f() are continuous function. In practice we have to use sample version of these.
s()f(),i=R,G,B
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Tri-stimulus Vector (2) • Tri-stimulus vector = [c1, c2, c3]T =STf
– represents the sensation of color for the spectrum defined by f.
• If we have two spectrum f1 and f2, and f1=f2, then STf1 = STf2 or f1
and f2 give the same color sensation.
• Even though f1≠f2, it is possible to have STf1 = STf2 . It suggests that two different color spectral distribution could create the same color sensation.
• This makes color problem simple.
– Assume that the recording instrument is recording a spectral energy distribution f and the rendering device is generating a spectral distribution g, we do not have to make f=g, but make g has to be generated such that STf = STg .
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Color Matching Functions • CIE XYZ Color-Matching Functions
• CIE XYZ led to color-matching functions with only positive values. Also, the middle matching function y() exactly equals the luminous-efficiency curve V(), which gives the relative sensitivity of the eye to each wavelength.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
CIE Chromaticity Diagrams
• Now, using CIE XYZ values, we can specify a color as the set of XYZ values given below
X =  f ()x()d
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Y= f()y()d
f ()z()d

CIE Chromaticity Diagrams
• CIE XYZ diagram – volume of all visible colors.
• CIE XYZ space is a 3D data and it is hard to visualize. So CIE devised a 2D diagram called CIE xy Chromaticity diagram, based on the values of (X,Y,Z).
• CIE xy diagram
– compute the normalized values
• x=X/(X+Y+Z)
• y=Y/(X+Y+Z)
• z=Z/(X+Y+Z), z = 1-x-y
– Then, plot only the colors corresponding to 2 chromaticity coordinates (x, y)
– It is effectively projecting each (X,Y,Z) onto the plane connecting points (1,0,0), (0,1,0), and (0,0,1)
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
CIE xy Chromaticity Diagrams Example
• Spectrum locus = plot of curve corresponding to visible monochromatic spectra
• Chromaticity coordinates (cc) of the additive combination of two colors lie on the segment joining the cc of the two colors
• cc of the additive combinations of 3 colors lies in the triangle whose vertices are the cc of the 3 colors
• Central point = standard white
• Complementary colors are those
that mixed produce white.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Color Gamut
• Color gamut of a color synthesis device = set of obtainable colors. Represented by
a polygonal on the chromaticity diagram, example shown here
•Out of gamut : While humans are able to perceive the color, it is not representable on the device being used.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Color Gamut Comparison R.709 (HDTV) and R.2020 (UHDTV)
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Color Spaces (Coordinate Systems)
• CMY/CMYK • YIQ
• HSL/HSV •…
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Color Models in Images – RGB
• RGBcolormodelforCRTdisplays
– stores color information in directly in RGB form – device-dependent
– additive color model
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Color Models in Images – RGB
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Color Models in Images – CMY
• CMYforprinting
– primary colors : Cyan, Magenta, Yellow – subtractive model
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Color Models in Images – CMYK
• Using truly black ink for black is cheaper than mixing C, M, and Y to produce black.
• CMYK: like CMY, uses black (K) as fourth color. – Given (C, M, Y),
– K=min(C, M, Y)
– M=M-K – Y=Y-K
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Color Models in TV/Video – YUV
• YUV color model was used for PAL and SECAM video.
• PAL, short for Phase Alternating Line, is a color video signal format used in broadcast television systems in Europe.
Y’  0.299 U  = − 0.299
0.587 − 0.587 −0.587
0.144 R’
0.886 G’ −0.114B’
V  0.701   
Y ‘ is called “luma”.
U = B’-Y’is “chrominace”
V = R’-Y’ is also “chrominance”
• Color TV signal can be displayed on a black-and-white television by using Y’ signal.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
R’, G’, B’ : gamma corrected R, G, B

Color Models in TV/Video – YUV
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Color Models in TV/Video – YIQ
• YIQ color model is used in NTSC (short for the National Television Standards Committee) color TV broadcasting in North America and Japan.
Y’  0.299
 I  = 0.595879
Q 0.211205   
− 0.274133 − 0.523083
0.144 R’
− 0.321746G’
− 0.311878B’  
Y ‘ is called ” luma”.
I is for ” in – phase chrominace”
Q is for ” quadrature chrominance”
• UV of YUV are more simply defined. But they do not capture the most-to- least hierarchy of human perceptual color sensitivities compared to IQ of YIQ.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
R’, G’, B’ : gamma corrected R, G, B

Color Models in TV/Video – YIQ
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Color Models in TV/Video – YCbCr
• YCbCr is the international standard for component(three-signal) digital video recommended by ITU (International Telecommunication Union). Used for JPEG and MPEG standards.
Y’  0.299 Cb = − 0.168736
Cr  0.5   
0.587 0.144 R’  0 
− 0.331264 0.5 G’ + 0.5
−0.418588 −0.081312B’ 0.5    
Y ‘ is called ” luma”.
Cb is blue chrominance Cr is red chrominance
• YCbCr is closely related to YUV. However, YUV is an analog system with scale factors different than the digital YCbCr system
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
R’, G’, B’ : gamma corrected R, G, B

Color Models in TV/Video – YCbCr
https://en.wikipedia.org/wiki/YCbCr CSULA CS451 Multimedia Software Systems by Eun-Young Kang
Why RGB is not used for Video?
• Human visual system is more sensitive to luminance than chrominance.
• YUV, YIQ and YCbCr represent color with luminance (Y) and chrominance (the other 2 channels).
• Advantages:
– We can subsample the chrominance channels (e.g., 4:2:2, 4:2:0 subsampling schemes)
– We can quantize the chrominance channels more coarsely (with fewer bits)
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Schemes • channels than to Luminance channel
• Wecansubsamplethechrominancechannelswithout
noticeable loss of detail
• Colorsubsamplingschemes:
– 4:1:1: 1 sample of each chrominance channel every 4 samples of luminance
– 4:2:0: 1 sample of each chrominance channel every 4 samples of luminance
– 4:2:2: 1 sample of each chrominance channel every 2 samples of luminance
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Schemes • 4:4:4 : Cb/Cr Same as SULA CS4551 Multimedia Software Systems by Eun-Young Kang

Schemes • 4:2:2 (1/2 the )
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Schemes • 4:1:1 (1/4 the )
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

• 4:2:0 (1/4 the , The zero in 4:2:0 means that Cb and Cr are sampled at half the vertical resolution of Y. )
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Sample Questions
• What are the advantages of using a different color space than RGB (e.g., YCbCr) for the sampling and compression of color images and video?
• Consider a video format with 325 lines/frame, 490 pixels/line, 30 frames/s, color subsampling scheme 4:2:2, image aspect ratio: 4:3. Compute the bit-rate of the system (assuming each luminance and chrominance sample is quantized with 8 bits).
Ans: 76.44 Mbits
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

Gamma Correction
• The RGB number in an image file are converted back to analog and drive the electron guns. For each gun, the power of the emitted light is a function of the control voltage. Ideally, the emitted light is would be linearly proportional to the voltage. In practice, the relation is not linear and the emitted light is roughly linearly proportional to the voltage raised to the  (gamma) power.
• So if the file value in the red channel is R, the screen emits light proportionally to R𝛾 (unwanted distortion). We need to correct the output by raising to the power (1/𝛾) so that the given input R will be displayed as it is by going through R1/𝛾 𝛾 → R. This transformation is called gamma correction.
• TV systems pre-correct for this situation by applying inverse transformation before transmitting TV signals. So it transmits R1/𝛾.
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Gamma Correction
Original Signal Value
Generated/Perceived Signal
Gamma Corrected Signal
Generated/Perceived Signal
Change the signal by raising to the power (1/ )
CSULA CS451 Multimedia Software Systems by Eun-Young Kang

Gamma Correction
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang
Gamma Correction
CSULA CS4551 Multimedia Software Systems by Eun-Young Kang

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com