Вы находитесь на странице: 1из 22

XYZ to RGB

• Given an XYZ color whose components are in the nominal


range [0.0, 1.0] and whose reference white is the same as that
of the RGB system, the conversion to RGB is done in two
steps.
• RGB to XYZ
– Given the chromaticity coordinates of an RGB system (xr, yr), (xg, yg)
and (xb, yb) and its reference white (XW, YW, ZW), here is the method
to compute the 3 × 3 matrix for converting RGB to XYZ
• XYZ to Linear RGB

• Now the 3 × 3 transform matrix from X Y Z t o RGB is taken t o


be
M( w h i t e p o i n t c o r r e c t i o n ) = MD (4.15)
(d 1 , d2, d 3 ) = (0.6247, 1.1783, 1.2364)

• For the S M P T E specification, we arrive at:

M(white point corrected)


Color models
• Schemes include:

a) C M Y — Cyan ( C ) , Magenta ( M ) and Yellow (Y ) color model;

b) HSL — Hue, Saturation and Lightness;

c) HSV — Hue, Saturation and Value;

d) HSI — Hue, Saturation and Intensity;

e) HCI — C = C h r o m a ;

f ) HVC — V = Va l ue ;

g ) HSD — D=Darkness.
Color model
• 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. [Wikipedia]

• Any method for explaining the properties or


behavior of color within some particular
context is called a Color Model
4.2 color models in images
• RGB color model for CRT display
– Additive color
Uses light to display color. we have effectively been dealing only with
additive color. Namely, when two light beams impinge on a target, their
colors add; when two phosphors on a CRT screen are turned on, their colors
add Used for computer displays
Example: The RGB colors are light primaries and colors are created with light.
CMYK Color Model

• Subtractive color
Uses ink to display color. But for ink deposited on paper, the
opposite situation holds: yellow ink subtracts blue from white
illumination, but reflects red and green; it appears yellow.
It is called 'subtractive' because its wavelength is less than sum of
the wavelengths of its constituting colors.
Example: The CMYK color system is the color system used for
printing.
Fundamentals of Multimedia, Chapter 4

1. Instead of red, green, and blue primaries, we need pri-


maries t h a t a m o u n t t o -red, -green, and -blue. I.e., we need
t o subtract R, or G, or B .
2. These subtractive color primaries are Cyan ( C ) ,
Magenta ( M ) and Yellow (Y ) inks.
Blue Cyan Yellow Red

Magenta Green

Green Magenta

Red Yellow Cyan Blue

Black (0, 0, 0) White (1, 1, 1) White (0, 0, 0) Black (1, 1, 1)

The RGB Cube The CMY


Cube

Fig. 4.15: R G B and C M Y color cubes.


8 Li & Drew §cPrentice Hall 2003
T ransformati on from R G B to C M Y

• Simplest model we can invent t o specify w h a t ink density t o


lay down on paper, t o make a certain desired R G B color:

( 4 .2 4 )

T h e n the inverse transform is:

( 4 .2 5 )

9 Li & Drew §cPrentice Hall 2003


Under color R emoval: C M Y K System
• Undercolor removal:
• In printing, under color removal  (UCR) is a process of
eliminating overlapping yellow, magenta, and cyan that would
have added to a dark neutral (black) and replacing them with
black ink only, called a Full Black, during the color separation
process.
• Sharper and cheaper printer colors: calculate t h a t part o f the
C M Y m i x t h a t would be black, remove i t f r o m the color
proportions, and add i t back as real black.
• T h e new specification o f inks is thus:
( 4 .2 6 )
C C−K
M ⇒ M −K
Y Y− K

10 Li & Drew §cPrentice Hall 2003


Color model in videos
• YUV
– The YUV color model is the basic color model used in
analogue color TV broadcasting. The YUV color space
is “derived” from the RGB space.
– The Y′UV model defines a color space in terms of one 
luma component (Y′) and two chrominance
 components, called U (blue projection) and V (red
projection) respectively. 
– Y′ stands for the luma component (the brightness)
and U and V are the chrominance (color) components.
• Chrominance refers t o the difference between a color and a reference
white at the same luminance.  use color differences U , V :

U= B−Y , V = R− Y
Y 0.299 0.587 0.144 R
U= − 0.299 −0.587 0.886 * G
V B
0.701 −0.587 −0.114
Fundamentals of Multimedia, Chapter 4

Fig. 4.18: Y j UV decomposition of color image. To p image ( a )


is original color image; ( b ) is Y j ; ( c , d ) are (U, V )
13 Li & Drew §cPrentice Hall 2003
YIQ model
•YIQ model is used for US TV broadcast.
•This model was designed to separate chrominance (I
and Q) from luminance (Y).
•This was a requirement in the early days of color
television when black-and-white sets still were expected
to pick up and display what were originally color pictures
•The Y-channel contains luminance information
(sufficient for black-and-white television sets) while the I
and Q channels carried the color information.
4.3 C olor M o dels in Video

• Vi d e o Color Transforms

(a) Largely derive fr om older analog methods of coding color for T V.


Luminance is separated fr om color information.

(b) Y I Q is used t o transmit T V signals in North America and Japan.

(c) In Europe, video tape uses the PAL or S E C A M coding, which are
based on T V t h a t uses a matrix transform called Y U V.

(d) Finally, digital video mostly uses a matrix transform called


YCbCr t h a t is closely related t o Y U V

Вам также может понравиться