03 Color 2023
03 Color 2023
Instructor: Xu Zhao
Lecture 3: Color
Contents
❖ Color and color space
๏ Radiometry and photometry
๏ Color constancy
Color
Oxford Dictionary
Color is perceptual
❖ Color is not a primary physical property on an object
❖ Red, Green, Blue, Pink, Orange, Atomic Tangerine,
etcetcBaby Pink, etc. .
❖ These are words we assign to human color sensations
7
White light through a prism
8
Biology of color sensations
9
Cones and rods
❖ We have additional light sensitive cells called rods that
are not responsible for color. Rods are used in low-light
vision.
❖ Cone cells are most concentrated around the fovea of
the eye.
10
11
SPD relation to color is not unique
❖ Due to the accumulation effect of the cones, two different SPDs
can be perceived as the same color (such SPDs are called
"metamers").
12
Tristimulus color theory
❖ Before the biology of cone cells was understood, it was
empirically known that only three distinct colors (primaries)
could be mixed to produce other colors
13
14
Radiometry vs. photometry
❖ Radiometry
❖ Quantitative measurements of radiant energy
❖ Often shown as spectral power distributions (SPD)
❖ Measures either light coming from a source (radiance) or light falling
on a surface (irradiance)
❖ Photometry/ colorimetry
❖ Quantitative measurement of perceived radiant energy based on
human’s sensitivity to light
❖ Perceived in terms of “brightness” (photometry) and color
(colorimetry)
15
Quantifying color
❖ We still need a way to quantify color & brightness
❖ SPDs go through a “black box” (human visual system) and are perceived
as color
❖ The only way to quantify the “black box” is to perform a human study
16
17
Result of the flicker experiments
18
CIE (1924) Photopic luminosity function
19
Radiometric vs. photometric units
20
Colorimetry
❖ Based on tristimulus color theory, colorimetry attempts to
quantify all visible colors in terms of a standard set of primaries
21
CIE RGB color matching
22
CIE RGB color matching
23
CIE RGB results
24
CIE RGB results
25
CIE 1931 XYZ
❖ In 1931, the CIE met and approved defining a new canonical
basis, termed XYZ that would be derived from Wright-Guild’s
CIE RGB data
❖ Properties desired in this conversion:
❖ White point defined at X=1/3, Y=1/3, Z=1/3
26
27
CIE XYZ 3D plot
28
Using CIE 1931 XYZ functions
❖ We now have a canonical color space to describe SPDs
❖ Given an SPD, I(λ), we can compute its mapping to the CIE XYZ
space
❖ Given two SPDs, if their CIE XYZ values are equal, then they are
considered the same perceived color,
❖ i.e. I1 (λ), I2 (λ) → (X1, Y1, Z1) = (X2, Y2, Z2) [ perceived as the same
color ]
So . . we can quantitatively describe color!
29
SPD to CIE XYZ example
30
Usefulness of CIE 1931 XYZ
31
32
33
CIE xy chromaticity diagram
❖ This gives us the familiar
horseshoe shape of
visible colors as a 2D plot. Note
the axis are x & y.
❖ Point “E” represents
where X=Y=Z have equal
energy (X=0.33, Y=0.33,
Z=0.33) CIE XYZ “white point”
34
What is perhaps most amazing?
❖ 90 years of CIE XYZ and it is all based on the
experiments by the “standard observers”
❖ How many standard observers were used? 100, 500,
1000?
35
36
Color constancy
❖ In a real scene, an object’s SPD is a combination of the its
reflectance properties and scene illumination
❖ Our visual system is able to compensate for the
illumination
37
38
39
Color constancy
❖ Color constancy (also called chromatic adaptation) is the
ability of the human visual system to adapt to scene
illumination
❖ This ability is not perfect, but it works fairly well
❖ Image sensors do not have this ability (it must be
performed as a processing step, i.e. “white balance”)
40
White point
41
42
CIE XYZ and RGB
❖ While CIE XYZ is a canonical color space, images/devices
rarely work directly with XYZ
❖ XYZ are not real primaries
❖ RGB primaries dominate the industry
❖ We are all familiar with the RGB color cube
43
44
Trouble with RGB
45
Standard RGB (sRGB) – Rec.709
46
CIE XYZ to sRGB conversion
49
Standardization: NTSC/PAL
51
CIE XYZ ↔ NTSC/sRGB
52
CIE XYZ: The grandmother of color spaces
53
CIE LAB space
❖ CIE LAB space (also written as CIE L*a*b*) was
introduced as a perceptually uniform color space
❖ Why?
❖ CIE XYZ provides a means to map between a physical
SPD (radiometric measurement) to a colorimetric
measurement (perceptual)
❖ However, a uniform change in CIE XYZ space does
result in an uniform change in perceived color
difference (see diagram)
❖ CIE Lab transforms CIE to a new space where color (and
brightness) differences are more uniform.
54
55
CIE 1976 LAB
❖ Considering the MacAdam experiments and the Steven's power-law, CIE LAB
was derived in 1976 by applying various transformations to the CIE XYZ values
that result in the following:
❖ L* represents a perceptual brightness measure between 0-100
❖ L* is a non-linear transformation of the Y component of CIE XYZ.
❖ L is approximately a cube root of Y (directly from Steven's power law)
❖ a* and b* (often range ±100)
❖ Both have similar non-linear transformations applied, and represent
approximately:
❖ a* values lying along colors related to red and green
❖ b* values lying along colors related to yellow and blue
❖ a*=b*=0 represents neutral grey colors
❖ NOTE: CIE LAB requires the white-point to be specified for the
transformation. The default white-point is D65.
56
CIE LAB
57
Y'UV, Y'IQ, Y'CrCb
❖ These spaces are color decompositions that separate the RGB space into a
"brightness-like" component and chrominance (color) components.
❖ The Y in these color spaces are not defined on linear-sRGB or linear- N TSC
❖ They are defined on the gamma encoded sRGB and NTSC color spaces
❖ These Y are referred to as “Luma”, not Luminance
❖ It should be written as Y' but they are typically written as only Y
58
59
Integrated signal processor (ISP)
❖ You will hear the term "ISP" associated with camera pipelines
❖ An ISP is dedicated hardware used to process the sensor image to produce the
final output (JPEG image) that is saved on your device
❖ The ISP is usually integrated as part of a system on a chip (SoC) that has other
modules
❖ Companies such as Qualcomm, HiSilicon, Intel (and more) sell ISP chips
❖ An ISP can be customized by the customer (Samsung, Huawei, LG, Apple,
etc)
❖ Note that it is also possible to perform operations common on an ISP on your
device's CPU and GPU
60
❖ The color filter array (CFA) on the camera filters the light into three sensor-
specific RGB primaries
62
Sensor raw-RGB image
spectral response
63
Sensors are linear to irradiance
❖ Camera sensors are decent light measuring devices
❖ If you double the amount of light hitting a sensor's pixel, the
digital value output of that pixel will double
64
65
Displaying raw-RGB images
❖ Inserting a raw-RGB image in your slides, research paper, etc
will result in strange colors.
❖ Why? Our devices (computers, printers, etc) expect the
image to be in a standard color space like sRGB.
66
68
70
Two step procedure
(1) Apply a white-balance correction to the raw-RGB values
(2) Map the white-balanced raw-RGB values to CIE XYZ
71
72
White balance (computational color constancy)
WB manual settings
74
Examples of manual WB matrices
75
AWB is not easy
76
Color manipulation
❖ This is the stage were a camera applies its "secret sauce" to
make the images look good
❖ This procedure can be called by many names:
❖ Color manipulation
❖ Photo-finishing
❖ Color rendering or selective color rendering
❖ Yuv processing engine
❖ DSLR will often allow the user to select various photo-
finishing styles
❖ Smartphones often compute this per-image
❖ Photo-finishing may also tied to geographical regions!
77
❖ GPS info
❖ More...
80
81