Chapter 4. Color in image and video
Download
Report
Transcript Chapter 4. Color in image and video
Fundamentals of Multimedia
Chapter 4
Color in Image and Video
Ze-Nian Li and Mark S. Drew
건국대학교 인터넷미디어공학부
임창훈
Outline
4.1 Color Science (skip)
4.2 Color Models in Images
4.3 Color Models in Video
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
2
4.1 Color Models in Images
Fig. 4.15: RGB and CMY color cubes
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
3
Additive and Subtractive Color
Additive color:
When two light beams impinge on a target,
their colors add.
When two phosphors on a CRT screen are turned on,
their colors add. (red + green = yellow)
Subtractive color:
For ink on paper, the opposite situation holds:
yellow ink subtracts blue from white illumination,
but reflects red and green; it appears yellow.
(white – blue = yellow)
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
4
Subtractive Color: CMY Color Model
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 from White (W).
These subtractive color primaries are
Cyan (C), Magenta (M) and Yellow (Y ) inks.
C = W – R, (0, 1, 1) = (1, 1, 1) – (1, 0, 0)
M = W – G, (1, 0, 1) = (1, 1, 1) – (0, 1, 0)
Y = W – B, (1, 1, 0) = (1, 1, 1) – (0, 0, 1)
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
5
Transformation from RGB to CMY
Simplest model we can invent to specify what ink
density to lay down on paper, to make a certain desired
RGB color:
Then the inverse transform is:
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
6
Fig. 4.16: Additive and subtractive color.
(a): RGB is used to specify additive color.
(b): CMY is used to specify subtractive color
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
7
Undercolor Removal: CMYK System
Undercolor removal
• Sharper and cheaper printer colors:
• Calculate that part of the CMY mix that would be
black, remove it from the color proportions, and add
it back as real black (K).
The new specification of inks is thus:
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
8
4.2 Color Models in Video
Largely derive from older analog methods of coding
color for TV.
Luminance is separated from color information.
YIQ is used to transmit TV signals in North America
and Japan (NTSC).
In Europe, video tape uses the PAL or SECAM,
which are based on TV that uses a matrix transform
called YUV.
Digital video mostly uses a matrix transform called
YCbCr that is closely related to YUV
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
9
YUV Color Model
YUV codes a luminance (luma) signal equal to Y’
(for gamma-corrected signals)
Chrominance (chroma) refers to the difference
between color and luminance.
color differences U, V
U = B’ – Y’, V = R’ – Y’
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
10
YUV Color Model
For composite video,
Chrominance signal C in composite video
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
11
YUV Color Model
original color image
Y’
Chap 4 Color in Image and Video
U
Li & Drew; 인터넷미디어공학부 임창훈
V
12
YIQ Color Model
YIQ is used in analog NTSC color TV broadcasting
I and Q are rotated version of U and V
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
13
YCbCr Color Model
Digital video uses YCbCr model – closely related to YUV
YUV is changed to YCbCr by scaling.
Cb and Cr are shifted between 0 and 1.
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
14
YCbCr Color Model
In practice, in 8-bit coding, with a maximum Y’ value of
only 219, and a minimum of +16.
Cb and Cr have a range of 112 and offset of +128.
If R’, G’, B’ are floats in [0, 1], then we obtain
Y’, Cb, Cr in [0, 255] via the transform:
The YCbCr transform is used in JPEG image
compression and MPEG video compression.
Chap 4 Color in Image and Video
Li & Drew; 인터넷미디어공학부 임창훈
15