Session 6
Session 6
IDIG4321
Fundamentals
Fundamentals
Hue: The dominant wavelength in the light waves mixture that is perceived by the observer
Saturation: The purity or the amount of white light mixed with the hue.
In theory black can be reproduced by the same amount of cyan, magenta, and yellow.
In real life the black does not really look black.
To solve this issue in printing a black is added to the CMY color space resulting in the CMYK
color space.
C 1 R
M = 1 − G
Y 1 B
CMY vs CMYK
Hue: The dominant wavelength in the light waves mixture that is perceived by the observer
Saturation: The purity or the amount of white light mixed with the hue.
Intensity: Similar to brightness it represents the achromatic notion of intensity.
Hue:
(
θ if B ≤ G
H=
360 − θ if B > G
1
n o
2 [(R−G )+(R−B)]
θ = cos−1 [(R−G )2 +(R−B)(G −B)]1/2
Saturation:
3
S =1− (R+G +B) min(RGB)
Intensity:
I = 13 (R + G + B)
◦ ◦
RG sector (0 ≤ H ≤ 120 ):
h i
S cos H
R =I 1+ cos(60◦ −H)
B = I (1 − S)
G = 3I − (R + B)
◦ ◦
RG sector (120 ≤ H ≤ 240 ):
◦
H = H − 120
R = I (1 − S)
h i
S cos H
G =I 1+ cos(60◦ −H)
B = 3I − (R + G )
◦ ◦
RG sector (140 ≤ H ≤ 360 ):
◦
H = H − 240
G = I (1 − S)
h i
S cos H
B =I 1+ cos(60◦ −H)
R = 3I − (R + G )
cR R
Assume that c = cG = G represents a vector in the RGB color space.
cB B
For a given image C at pixel coordinate (x, y ) we have:
CR (x, y ) R(x, y )
C(x, y ) = CG (x, y ) = G (x, y )
CB (x, y ) B(x, y )
Color transformation
Similar to the case of greyscale images local and global transforms can also be applied to the
color images.
g (x, y ) = T [f (x, y )]
si = Ti (r1 , r2 , · · · , rn ), i = 1, 2, · · · , n
Color transformation
Color transformation
g (x, y ) = kf (x, y )
RGB: si , i = 1, 2, 3.
CMY: si = kri + (1 − k), i = 1, 2, 3.
HSI: s3 = kr3
Color transformation
Color slicing
Similar to the case of greyscale images slicing in color images highlights a specific range of colors
in an image.
If the specified colors are enclosed by a cube of width W and centered at a protypical color with
components (a1 , a2 , · · · , an ), the set of transformations is:
(
0.5 if [| rj − aj |> W /2]any 1≤j≤n
si =
ri otherwise
Color slicing
Similar to the case of greyscale images slicing in color images highlights a specific range of colors
in an image.
If the specified colors are enclosed by a sphere with a radius of R0 and centered at a protypical
color the set of transformations is:
n
(rj − aj )2 > R02
0.5 P
if
si = j=1
ri otherwise
Color slicing
Color management
Color management
Color management
Color management
Color management
Color management
Color management
Color management
Color management
Color management
Color management
Camera calibration
Camera calibration
The difference or distance between two colors are called the color difference equation.
Color difference equations are normally represented by ∆E .
p
For example: ∆E = (R1 − R2 )2 + (G1 − G2 )2 + (B1 − B2 )2
∗
In 1976 ∆Eab was
p introduced which is based on using the CIELAB color
∗
space:∆E76 = (L∗1 − L∗2 )2 + (a1∗ − a2∗ )2 + (b1∗ − b2∗ )2
∗
A ∆E76 ≈ 2.3 corresponds to Just Noticeable Differences (JND).
Histogram processing
Histogram processing
Color Image Smoothing: Assum Sx,y represents the neighborhood centered at (x, y ) in the
RGB color space. The average of the RGB component vector in the neighborhood is then:
1 P
K R(s, t)
(s,t)ϵSxy
1 P G (s, t)
¯ y) = 1
P
C(x, K C(s, t) = K
(s,t)ϵSxy
(s,t)ϵSxy 1 P
K B(s, t)
(s,t)ϵSxy
Histogram processing
Histogram processing
Histogram processing
Histogram processing
∂R ∂G ∂B
v= ∂y r + ∂y g + ∂y b
∂R 2 ∂G 2 ∂B 2
gxx = u T u = ∂x + ∂x + ∂x
2 2 2
∂R ∂G ∂B
gyy = v T v = ∂y + ∂y + ∂y
∂R ∂R ∂G ∂G ∂B ∂B
gxy = u T u = ∂x ∂y + ∂x ∂y + ∂x ∂y
h i
2gxy
θ= 1
2 tan−1 gxx −gyy
Final notes
Acknowledgment
Some of the slides, figures and images are inspired and/or used from slides created by:
Professor Azeddine Beghdadi, University of Paris 13.
Dr. Onur G. Guleryuz, Google Daydream R&D team
Professor Gordon Wetzstein, Stanford University
Dr. Frank (Qingzhong) Liu, New Mexico Tech
Dr. Farah Torkamaniazar, Shahid Beheshti University