Академический Документы
Профессиональный Документы
Культура Документы
Processing
CCU, Taiwan
Wen-Nung Lie
Color Fundamentals
CCU, Taiwan
Wen-Nung Lie
6-1
CCU, Taiwan
Wen-Nung Lie
6-2
CCU, Taiwan
Wen-Nung Lie
6-3
Chromaticity
trichromatic coefficients :
x = X /( X + Y + Z )
CCU, Taiwan
Wen-Nung Lie
y = Y /( X + Y + Z )
z = Z /( X + Y + Z )
6-4
Chromaticity diagram
CCU, Taiwan
Wen-Nung Lie
CCU, Taiwan
Wen-Nung Lie
CCU, Taiwan
Wen-Nung Lie
6-7
CCU, Taiwan
Wen-Nung Lie
6-8
CCU, Taiwan
Wen-Nung Lie
CCU, Taiwan
Wen-Nung Lie
6-10
CCU, Taiwan
Wen-Nung Lie
6-11
H =
360
if B G
2 [( R G ) + ( R B )]
=
cos
2
1/ 2
if B > G
[( R G ) + ( R B)(G B)]
3
1
[min( R, G, B)]
s = 1
I = ( R + G + B)
( R + G + B)
3
RG sector (0<H<120)
B = I (1 S )
G = 3I ( R + B )
CCU, Taiwan
Wen-Nung Lie
S cos H
R = I [1 +
]
o
cos(60 H )
6-12
GB sector (120<H<240)
R = I (1 S )
H = H 120o
S cos H
G = I [1 +
] B = 3I ( R + G )
o
cos(60 H )
BR sector (240<H<360)
H = H 240o
G = I (1 S )
S cos H
B = I [1 +
] R = 3 I (G + B )
o
cos(60 H )
CCU, Taiwan
Wen-Nung Lie
6-13
HSI RGB
RGB
HSI
CCU, Taiwan
Wen-Nung Lie
6-14
U = 0.493( B Y )
CCU, Taiwan
Wen-Nung Lie
V = 0.877( R Y )
6-15
CCU, Taiwan
Wen-Nung Lie
Reference:
B.G. Haskell, A. Puri, A.N. Netravali, Digital Video: An introduction to MPEG-2, Chapman & Hail, 1997
Y.Q. Shi, H. Sun, Image and Video compression for multimedia engineering, CRC press, 1999
6-16
CCU, Taiwan
Wen-Nung Lie
6-17
CCU, Taiwan
Wen-Nung Lie
6-18
CCU, Taiwan
Wen-Nung Lie
6-19
6-20
Method 2
CCU, Taiwan
Wen-Nung Lie
6-21
There is a discontinuity in
HSI model where 0 and 360
of hue meet
Hue is undefined for 0
saturation
CCU, Taiwan
Wen-Nung Lie
6-22
Color transformation
i = 1,2,..., n
CCU, Taiwan
Wen-Nung Lie
i = 1,2,..., n
Color complements
Saturation should be
altered to implement
complement
Color circle
CCU, Taiwan
Wen-Nung Lie
Approximation only
6-24
Color slicing
0.5,
si =
if rj a j >
2 any 1 j n
ri
otherwise
0.5, if
si =
ri
(r
j=1
a j ) 2 > R02
i = 1,2,...n
otherwise
6-25
Device-independent color
model (CIE L*a*b* model)
CCU, Taiwan
Wen-Nung Lie
L = 116 h
16
X Y
h
a* = 500 h
X W YW
Y Z
*
b = 200 h h
YW ZW
3 q ,
q > 0.008856
h( q ) =
7.787 q + 16 / 116 q 0.008856
CCU, Taiwan
Wen-Nung Lie
6-27
CCU, Taiwan
Wen-Nung Lie
6-28
CCU, Taiwan
Wen-Nung Lie
Tonal correction
6-29
CCU, Taiwan
Wen-Nung Lie
6-30
CCU, Taiwan
Wen-Nung Lie
Histogram equalization
6-31
Color balancing
correction
CCU, Taiwan
Wen-Nung Lie
To reduce magenta
remove both red and
blue or add green
The color ring is useful
as a reference tool for
identifying color
printing problem
6-32
CCU, Taiwan
Wen-Nung Lie
6-33
CCU, Taiwan
Wen-Nung Lie
6-34
6-35
D ( z, a) = z a or [( z a) C ( z a)]
T
1
2
C : covariance matrix
result
CCU, Taiwan
Wen-Nung Lie
6-36
v
=
+
+
+
g xx = u u =
+
yy
y
y
y
x
x
x
u=
R R G G B B
+
+
x y x y x y
r,g,b : Unit vectors along R, G, and B axes
2 g xy
1
1
= tan
(
g
g
)
2
: direction of maximum change
xx
yy
g xy = u v =
F ( ) = ( g xx + g yy ) + ( g xx g yy ) cos 2 + 2 g xy sin 2
2
CCU, Taiwan
Wen-Nung Lie
1
2
6-37
CCU, Taiwan
Wen-Nung Lie
6-38
Vector gradient
Individual gradients
CCU, Taiwan
Wen-Nung Lie
difference
6-39
CCU, Taiwan
Wen-Nung Lie
6-40
Less visually
noticeable
HSI model
CCU, Taiwan
Wen-Nung Lie
6-41
Noise on green
channel
CCU, Taiwan
Wen-Nung Lie
6-42