Post on 17-Feb-2022
Color Representation
Electromagnetic Radiation -Spectrum
Gamma X rays Infrared Radar FM TV AMUltra-violet
10-12
10-8
10-4
104
1 108
electricityACShort-
wave
400 nm 500 nm 600 nm 700 nmWavelength in nanometers (1nm=10-9 m)
Wavelength in meters (m)
Visible light
The Spectral Power Distribution (SPD) of a light is a function f(λ) which defines the energy at each wavelength.
Wavelength (λ)400 500 600 700
0
0.5
1
Rel
ativ
e P
ower
Spectral Power Distribution
Examples of Spectral power Distributions
Blue Skylight Tungsten bulb
Red monitor phosphor Monochromatic light
400 500 600 7000
0.5
1
400 500 600 7000
0.5
1
400 500 600 7000
0.5
1
400 500 600 7000
0.5
1
+ -
+ -
+ -
test match
Color Matching ExperimentThree primary lights are set to match a test light.
=~
Test light Match light
400 500 600 7000400 500 600 7000
Pow
er
Metamer - two lights that appear the same visually. They might have different SPDs (spectral power distributions).
Trichromatic Color Theory
Thomas Young (1773-1829) -A few different retinal receptors operating with different wavelength sensitivities will allow humans to perceivethe number of colors that they do.Suggested 3 receptors.
Helmholtz & Maxwell (1850) -Color matching with 3 primaries.
“tri”=three “chroma”=colorcolor vision is based on three primaries
(i.e., it is 3 dimensional).
The Human Eye
Optic NerveFovea
Vitreous
Optic Disc
Lens
Pupil
Cornea
Ocular MuscleRetina
Humor
Iris
The Human Retina
light
rods cones
horizontal
amacrine
bipolar
ganglion
Cones -
Wavelength (nm)
Rel
ativ
e se
nsiti
vity
Retinal Photoreceptors
Cone Spectral Sensitivity
400 500 600 7000
0.25
0.5
0.75
1
• High illumination levels (Photopic vision)• Less sensitive than rods.• 5 million cones in each eye.• Only cones in fovea (aprox. 50,000).• Density decreases with distance from fovea.• 3 cone types differing in their spectral
sensitivity: L , M, and S cones.
LMS
Linear Color Spaces
Colors in 3D color space can be described as linear combinations of 3 basis colors:
primaries
a• + b• + c•=
The representation of :
is then given by: (a, b, c)
12614111
3636 111
36
111
36 12
12 17
17 111
14
126
17
36
12
111
3636200 12
14
126 17
36 36
111
12
14
3636200 12
14
126 17
36 36
111
36200
200
12
14111
14
126
126
17
36
36
36
36
12
14
111
111
36
12617
36
36200
111
72
72
12
12 17
10 128
3617
200 11112
14
126
126
126
126
17 17
17
17
36
36
36
36
36
200
200
200
12
12
12
14
14
111
111
72
72
72 106 15510 128
3617
200 11112
14
126
126
126
126
17 17
17
17
36
36
36
36
36
200
200
200
12
12
12
14
14
111
111
72
72
72 106 155
14
126 17
36 36
111
36200
200
12
14111
14
126
126
17
36
36
36
36
12
14
111
111
36
12617
36
36200
111
72
72
12
12 17
12614111
3636 111
36
111
36 12
12 17
17 111
14
126
17
36
12
111
3636200 12
14
126 17
36 36
111
12
14
3636200 12
Rgb Image
black
redgreen
blue
white
The RGB Cube
Color Edge Detection
Original
R - Edges G - Edges
B - Edges All - Edges
Color Edge Detection
Original
R - Edges G - Edges
B - Edges All - Edges
RGB Color Cube
R
G
B
Brightness
HueSaturation
Brightness
Black
White
RG
B
Color Description
Hue (red, green, yelow, blue ...)
Saturation (pink,bright red, ....)
Lightness (black, grey, white ....)
MayuraDraw
PowerPoint
PhotoShop
YIQ - Color Space
NTSC = National Television Systems Committee
Y = luminanceI = red-greenQ = blue-yellow
RGB
=YIQ
0.177 0.813 0.0110.540 -0.263 -0.1740.246 -0.675 0.404
R G B are the CIE-RGB
RGB To Monochrome
RGB
Y
Original Y - Blur
I - Blur Q - Blur
Subtractive Color System - CMYK
Cyan
Magenta
Yellow
blacK
= removes red
= removes green
= removes blue
= removes all
Printer Dyes:
cyan magenta yellow
B G R B G R B G R
trans
mit
Ideal block dyes:
Opponent Color Wheel
Additive primariesSubtractive Primaries
yellow
B G R
Multiplicative (Subtractive) Color System
red = magenta + yellow
magenta
B G R
red
R
B G R*
=
B G R
= magenta + yellow= cyan + yellow= magenta + cyan
redgreenblue
Cyan - controls amount of red in print:
cyan
B G R
low C = high R (also high G and B)high C = low R (high G and B)
R G BR G BR G BHigh density
cyanMedium density
cyanLow density
cyan
CMY + Black
C + M + Y = K (black)
• Using three inks for black is expensive• C+M+Y = dark brown not black• Black instead of C+M+Y is crisper with more
contrast.
100 50 70
Undercolor removal -(gray component replacement)
=
50 0 2050
+
C M Y C M YK
R G R G R G R GG B G B G B G BR G R G R G R GG B G B G B G BR G R G R G R GG B G B G B G BR G R G R G R GG B G B G B G B
R R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R R
G G G G G G G GG G G G G G G GG G G G G G G GG G G G G G G GG G G G G G G GG G G G G G G GG G G G G G G GG G G G G G G G
B B B B B B B BB B B B B B B BB B B B B B B BB B B B B B B BB B B B B B B BB B B B B B B BB B B B B B B BB B B B B B B B
demosaic
Demosaicing
Digital camera (Kodak DS40)
Demosaicing - Linear interpolation
R R R R
R R R R
R R R R
R R R R
R R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R RR R R R R R R R
R G R G R G R G B G B G B GR G R G R G R G B G B G B GR G R G R G R G B G B G B G
R image
G G G G G G G
G G G G G G G
G G GG G G G
R R R R
R R R R
R R R R
B B B
B B B
B B B
G image B image
G G G G G G GG G G G G G GG G G G G G GG G G G G G GG G G G G G GG G G G G G G
R R R R R R RR R R R R R RR R R R R R R R R R R R R R R R R R R R R R R R R R R R
B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B B
interpolate interpolate
Demosaic Aliasing
Demosaicing - Example (Kodak)
Demosaicing - Various Approaches
Regularization
Minimize over a functional with a data fit termand an inter-channel color correlation term.
Minimal Surface
Minimize over a functional with a data fit termand a 5D surface area term. (Beltrami Flow)
100 50
Grayscale Image
RGB Image
x
y
B
GR
5D
3D
(Gamer & Keren)
(Kimmel)
Learning SchemesLearn linear and non linear optimal filtersfor classes of images (ANN).
(Kapah & Hel-Or)
Demosaicing - Various Approaches
Quadratic - Learned on Image
Channel independent Perceptron (Linear)
Demosaicing - Learning Schemes
Quadratic - Learned on Class
12614111
3636 111
36
111
36 12
12 17
17 111
14
126
17
36
12
111
3636200 12
14
126 17
36 36
111
12
14
3636200 12
14
126 17
36 36
111
36200
200
12
14111
14
126
126
17
36
36
36
36
12
14
111
111
36
12617
36
36200
111
72
72
12
12 17
10 128
3617
200 11112
14
126
126
126
126
17 17
17
17
36
36
36
36
36
200
200
200
12
12
12
14
14
111
111
72
72
72 106 15510 128
3617
200 11112
14
126
126
126
126
17 17
17
17
36
36
36
36
36
200
200
200
12
12
12
14
14
111
111
72
72
72 106 155
14
126 17
36 36
111
36200
200
12
14111
14
126
126
17
36
36
36
36
12
14
111
111
36
12617
36
36200
111
72
72
12
12 17
12614111
3636 111
36
111
36 12
12 17
17 111
14
126
17
36
12
111
3636200 12
14
126 17
36 36
111
12
14
3636200 12
Color Quantization
Indexed Image
12614111
3636 111
36
111
5 12
12 17
17 111
14
126
17
36
12
111
3636200 12
14
126 17
36 36
111
12
14
3636200 12
Image Independent Quantization
original gray value
quantizedgray value
0 64 128 192 255
32 96 160 224
original gray value
quantizedgray value
0 64 128 192 255
32 96 160 224
original gray value
quantizedgray value
0 64 128 192 255
32 96 160 224
Image Independent Quantization
050
100150
200250
0
100
200
3000
50
100
150
200
250
Original 125 Colors
64 Colors 27 Colors
Image Independent Quantization
050
100150
200 250
0100
200300
0
50
100
150
200
250
10 180
3617
200
14
126
12617 17
36
36200 12
12
14
126
36117200
200
12
14111
126
3636
12617
36 111
72
126172111
3636 111
36
12
17 111
14 36
36200
3612
RGB Space
RGB Image
050
100150
200250
0
100
200
3000
50
100
150
200
250
RGB Space
Image Dependent Quantization
050
100150
200250
0
100
200
3000
50
100
150
200
250
Clustering using Iso Data
Input: C={ci}, i=1..n - color points.Output: S={sj}, j=1..k - color indices.
• Distribute sj, j=1..k, uniformly in color space.
• Divide C into k classes based of distances to S.
• For each class j, calculate the mean Mj.
• Set Sj=Mj.• Iterate until convergence.
Original
Image Dependent Quantization
Independent Dependent
Albers (1975)