Title: Light and Color
1Light and Color
2Topics
- The Human Visual System
- Displaying Intensity and Luminance
- Display Using Fixed Intensities
- Understanding Color
- Display of Color
- Color Models
3Structure of the Human Eye
- Image taken from http//hyperphysics.phy-astr.gsu.
edu/hbase/vision/eye.html
4Main Parts of the Eye
5Main Parts of the Eye
- Cornea
- Provides most refraction
6Main Parts of the Eye
- Cornea
- Provides most refraction
- Reshaped in refractive surgery
- Corrects nearsightedness caused by elongation of
the eyeball
7Main Parts of the Eye
8Main Parts of the Eye
- Cornea
- Iris
- Opens and Closes to let in more/less light
9Main Parts of the Eye
- Cornea
- Iris
- Opens and Closes to let in more/less light
- Hole is the pupil
10Main Parts of the Eye
11Main Parts of the Eye
- Cornea
- Iris
- Lens
- Flexible - muscles adjust shape
12Main Parts of the Eye
- Cornea
- Iris
- Lens
- Flexible - muscles adjust shape
- Allows fine-detail focus
13Main Parts of the Eye
- Cornea
- Iris
- Lens
- Flexible - muscles adjust shape
- Allows fine-detail focus
- Toughens with age, leading to reading glasses
- Cataracts form here
14Main Parts of the Eye
15Main Parts of the Eye
- Cornea
- Iris
- Lens
- Retina
- Layer of receptor cells at back of eye
-
-
-
16Main Parts of the Eye
- Cornea
- Iris
- Lens
- Retina
- Layer of receptor cells at back of eye
- Center of focus is the fovea
-
-
17Main Parts of the Eye
- Cornea
- Iris
- Lens
- Retina
- Layer of receptor cells at back of eye
- Center of focus is the fovea
- Optic nerve collects information from retina, and
brings to the back of the brain - Causes a blind spot!
18Focusing Light
- For a point in focal plane, all light emitting
from that point goes to same point on retina
19Focusing Light
- For a point not in focal plane, light gets spread
across retina - Also happens in
- nearsightedness
- Our brain is good
- at eliminating
- these signals
20Display Screens and Focus
- For the usual (current) display systems, we
maintain one focus plane - Even for stereo displays
- Even if the image tries to simulate differing
focus - This is different than nature
21Rods
- Distinguish brightness only
- Best response to blue-green light
- Prevalent except at fovea (more peripheral)
- About 100x more sensitive than cones
- About 100 million in retina
22Cones
- Color response
- Centered around fovea
- About 147,000 cones/mm2 at fovea
- 2mm away from fovea 9,500 cones/mm2
- 6.3 - 6.8 million in retina
23How We See
- Individual receptors give response
- Vision is limited by density of cells in part of
brain - High detail, good color at center of vision
- Peripheral vision can see dimmer light, but
mainly black white, and low resolution
24Vision in the Brain
- Signals are carried by optic nerve to brain
- Brain processes to reconstruct image
- Best understood part of brain function, but still
many ill-understood parts - Many aspects of vision are hard-wired
- Can lead to optical effects with significant
graphics impact - Mach banding.
- Filling in of blind spot
25Topics
- The Human Visual System
- Displaying Intensity and Luminance
- Display Using Fixed Intensities
- Understanding Color
- Display of Color
- Color Models
26Intensity and Luminance
- Intensity/Luminance How much light energy there
is - The amount of energy carried by photons
27Intensity and Luminance
- Intensity/Luminance How much light energy there
is - The amount of energy carried by photons
- Brightness the perceived intensity
- Eye does not respond to equal intensity changes
equally - Eye notices the ratio of intensities
28Brightness Levels
- Intensity changes of 1-gt2, 2-gt4, 4-gt8 appear the
same - Example 3-way lightbulb
- 50-gt100 seems like bigger change than 100 -gt 150
- Display devices might limit the number of
discrete intensity levels available
29Brightness in Display Devices
- Assume
- The maximum intensity of a display is 1.0
- The minimum is I0
- It can display n1 intensity levels
- Then, to get equal brightness increments, it
should display levels - I0, rI0, r2I0, , rnI01.0
30Brightness Levels
- Human eye generally can notice rgt1.01
- So, to have a smooth display, we need to make
sure that rlt1.01 - i.e. we need enough levels of display
- For a given display, we need
- 1.01nI01.0
- 1.01n 1.0/I0
- n log 1.01 - log I0
- n -log I0 / log 1.01
- n -log1.01I0
31Dynamic Range
- 1/I0 is called dynamic range
- The ratio of maximum to minimum intensity
(remember, we set 1.0 max) - Varies by display device
- This is the maximum a device can possibly display
vs. the minimum it can display. -
-
-
32Dynamic Range
- 1/I0 is called dynamic range
- The ratio of maximum to minimum intensity
(remember, we set 1.0 max) - Varies by display device
- This is the maximum a device can possibly display
vs. the minimum it can display. - Contrast the maximum vs. minimum it can display
at the same time. - i.e. for one image on screen, maximum vs.
minimum.
33Topics
- The Human Visual System
- Displaying Intensity and Luminance
- Display Using Fixed Intensities
- Understanding Color
- Display of Color
- Color Models
34Limited Display Levels
- We cant always get a continuous range of display
levels - Printing either ink is there or not there
- We can adjust amount of ink (i.e. how much space
it takes), but not its intensity - Other display might limit the number of levels
e.g. 256 levels of intensity. - We need ways to mimic continuous colors with
discrete levels
35Example
36Example
37Halftoning/Dithering
- Idea Eyes integrate over an area
- All light hitting one receptor cell is combined.
- Eye only cares about the integrated information
from an entire area - So, we can get varying intensity by filling in
fractions of areas
vs.
38Halftoning
- Subdivide image into blocks of pixels.
- You will lose resolution!
- e.g. a 100x100 region divided into 4x4 blocks of
pixels can only display a 25x25 image. - The number of intensity levels is related to the
number of pixels in a block - 2x2 5 intensity levels
- 3x3 10 intensity levels
- nxn n21 intensity levels
39Example 2x2 block
- Level 0 Intensities 0.0 0.2
- Level 1 Intensities 0.2 0.4
- Level 2 Intensities 0.4 0.6
- Level 3 Intensities 0.6 0.8
- Level 4 Intensities 0.8 1.0
40Example Image
412x2 Halftone Example
422x2 Halftone Example
433x3 Halftone Example
44Halftoning Patterns
- The pattern you use to fill makes a difference.
- Want a random pattern, so that artificial
artifacts dont appear - Brain is very good at recognizing some things,
like lines
45Example 3x3 block
- Bad pattern
- Better pattern
463x3 Bad Halftone Example
473x3 Good Halftone Example
48Dithering
- Halftoning loses resolution this is bad.
- Dithering
- Keep same resolution
- Change halftoning pattern into a
probability/threshold function (dither pattern) - Overlay dither pattern on entire image
- Fill in a pixel iff it is of higher intensity
than the dither value
49Dither Pattern Example
- Intensities 0.0 0.2
- Intensities 0.2 0.4
- Intensities 0.4 0.6
- Intensities 0.6 0.8
- Intensities 0.8 1.0
Halftoning Patterns
50Dither Pattern Example
- Intensities 0.0 0.2
- Intensities 0.2 0.4
- Intensities 0.4 0.6
- Intensities 0.6 0.8
- Intensities 0.8 1.0
Cells are filled in only when intensity is
larger than the given value
51Dither Pattern Example
Overlay dither pattern
52Dither Pattern Example
Fill those cells larger than dither value
53Dither Pattern Example
Fill those cells larger than dither value
54Dither Pattern Example
Fill those cells larger than dither value
55Dither Pattern Example
Fill those cells larger than dither value
56Dither Pattern Example
Fill those cells larger than dither value
57Dither Pattern Example
Repeat for rest of image
583x3 Halftone Example
593x3 Dither Example
60Error Diffusion
- Another way to set levels without changing
resolution - Assume pixels being visited in some order
- Left to right, top to bottom
- Roundoff error (from filling/not filling) gets
diffused to adjacent pixels not visited yet - Can be combined with halftoning/dithering
61Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
Given
62Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
Round to 50
63Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
Round to 50 Error of 16
64Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
Round to 50 Error of 16
65Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
66Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
Round to 100
67Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
Round to 100 Error of -16
68Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
Round to 100 Error of -16
69Error Diffusion
- Pattern
- Example Assume we can display levels in
increments of 50.
703x3 Dither Example
71Error Diffusion Example
72Topics
- The Human Visual System
- Displaying Intensity and Luminance
- Display Using Fixed Intensities
- Understanding Color
- Display of Color
- Color Models
73Light
- Light is carried by photons, traveling with
different wavelengths/frequencies - cln
- Speed of light c (assume constant)
- Wavelength l
- Frequency n
- So, Wavelength Frequency are interchangable,
and inverse of each other
74Visible Light
- Image taken from http//www.andor.com/image_lib/lo
res/introduction/introduction20(light)/intlight2
0120small.jpg
75Visible Light
- The response of the cells in our eye let us see
from 400nm (violet) to 700nm (red). - If all light arriving is one wavelength, we see
it as one color. -
76Visible Light
- The response of the cells in our eye let us see
from 400nm (violet) to 700nm (red). - If all light arriving is one wavelength, we see
it as one color. - But, Light usually comes in as a spectrum
different intensities at all the various
wavelengths.
Images taken from http//www.newport.com/Informati
on-on-Oriel-Spectral-Irradiance-Data/383232/1033/c
atalog.aspx
77Seeing Color
- So, how is it that we look at a spectrum of
light, and see it as a single color?
78Tristimulus Theory
- There are 3 kinds of cones in the eye that
respond differently to different wavelengths of
light. -
79Tristimulus Theory
- There are 3 kinds of cones in the eye that
respond differently to different wavelengths of
light. - Anything that stimulates these cones in the same
way appears as the same color. - This is fundamental to our ability to reproduce
different colors! - A monitor can stimulate the cones to make it
appear that a particular color is being generated.
80Response of Cones
- 3 Cones, Rods respond to light differently
Image taken from http//www.unm.edu/toolson/human
_cone_response.htm
81Receptor Response
- Though cones often called red, green, blue, the
peak responses are actually in the yellow,
yellow-green, and violet. - Altogether, overall response is Gaussian-like,
centered on yellow/green - Sun and plants
Image taken from http//www.unm.edu/toolson/human
_cone_response.htm
82Tristimulus
- Since 3 different cones, the space of colors is
3-dimensional. - We need a way to describe color within this 3
dimensional space. - We want something that will let us describe any
visible color
83Topics
- The Human Visual System
- Displaying Intensity and Luminance
- Display Using Fixed Intensities
- Understanding Color
- Display of Color
- Color Models
84The CIE XYZ system
- CIE Comission Internationale de lEclairage
- International Commission on Illumination
- Sets international standards related to light
- Defined the XYZ color system as an international
standard in 1931 - X, Y, and Z are three Primary colors. All
visible colors can be defined as a combination of
these three colors. - Defines the 3 dimensional color space
85Color Matching Functions
- Given an input spectrum, , we want to find
the X, Y, Z coordinates for that color. - Color matching functions, , , and
- tell how to
weight - the spectrum
when - integrating
Image taken from http//upload.wikimedia.org/wikip
edia/commons/8/87/CIE1931_XYZCMF.png
86XYZ space
- The visible colors form a cone in XYZ space.
- For visible colors, X, Y, Z are all positive.
- But, X, Y, and Z themselves are not visible
colors!
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
87Luminance and Chromaticity
- The intensity (luminance) is just XYZ.
- Scaling X, Y, Z just increases intensity.
- We can separate this from the remaining part,
chromaticity. - Color Luminance Chromaticity
- Chromaticity is 2D, Luminance is 1D
- To help us understand chromaticity, well fix
intensity to the XYZ1 plane.
88Chromaticity Diagram
- Project the XYZ1 slice along the Z-axis
- Chromaticity is given by the x, y coordinates
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
89White Point
- White at the center of the diagram.
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
90Spectral Colors
- Visible Spectrum along outside curve
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
91Saturation
- As you move on line from white to edge, you
increase the saturation of that color. - Royal blue, red high saturation
- Carolina blue, pink low saturation
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
92Hue
- Hue is the direction from white.
- Combined with saturation, it gives another way to
describe color - Also called dominant wavelength
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
93Non-Spectral Colors
- Non-spectral colors do not correspond to any
wavelength of light. - i.e. not seen in rainbow
- e.g. maroon, purple, magenta
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
94Combining Two Colors
- If we have two colors, A and B, by varying the
relative intensity, we can generate any color on
the line between A and B.
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
95Complementary Colors
- Complementary colors are those that will sum to
white. - That is, white is halfway between them.
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
96Combining Three Colors
- If we have three colors, A, B, and C, by varying
the relative intensity, we can generate any color
in the triangle between them.
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
97Gamut
- Display devices generally have 3 colors (a few
have more). - e.g. RGB in monitor
- The display can therefore display any color
created from a combination of those 3. - This range of displayable colors is called the
gamut of the device.
98Differing Gamuts
- Different devices have different gamuts
- e.g. differing phosphors
- So, RGB on one monitor is not the same as RGB on
another
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
99Device Gamuts
- For monitors, typically have colors in the Red,
Green, Blue areas - Helps cover lots of visible spectrum
- But, not all (in fact, nowhere close to all) of
the visible spectrum is ever represented - Since all 3 colors are visible, cant possibly
encompass full visible spectrum!
100Gamuts
- Red typical monitor gamut
- Blue maximum gamut with 3 phosphors
Image taken from http//fourier.eng.hmc.edu/e180/h
andouts/color1/node27.html
101Topics
- The Human Visual System
- Displaying Intensity and Luminance
- Display Using Fixed Intensities
- Understanding Color
- Display of Color
- Color Models
102Color Models
- CIEs XYZ system is a standard, but not very
intuitive. - As we saw with saturation and hue, theres more
than one way to specify a color. - A variety of color models have been developed to
help with some specifications.
103RGB
- Red, Green, Blue
- Common specifications for most monitors
- Tells how much intensity to use for pixels
- Note Not standard RGB means different things
for different monitors - Generally used in an additive system
- Each adds additional light (e.g. phosphor)
- Combine all three colors to get white
104CMY
- Cyan, Magenta, Yellow
- Commonly used in printing
- Generally used in a subtractive system
- Each removes color from reflected light
- Combine all three colors to get black
- Conceptually, C M Y 1 1 1 R G B
- Complimentary colors to RGB
105CMYK
- Cyan, Magenta, Yellow, Black
- Comes from printing process since CMY combine
to form black, can replace equal amounts of CMY
with Black, saving ink. - K min(C, M, Y)
- C C-K
- M M-K
- Y Y-K
106YIQ / YUV
- NTSC, PAL standards for broadcast TV
- Backward compatible to Black and White TV
- Y is luminance only part picked up by Black and
White Televisions - Y is given most bandwith in signal
- I, Q channels (or U,V) contain chromaticity
information
107HSV
- Hue, Saturation, Value
- Used as a user-friendly way to specify color.
- Hue angle around cone
- Saturation how far from center
- Value (luminance) how high up cone (black at
bottom, white at top center).
Image taken from http//www.mandelbrot-dazibao.com
/HSV/HSV.htm
108HLS
- Hue, Lightness, Saturation
- A variation on HSV, but with a double cone
- Lightness black at base (0), white at top (1)
Image taken from http//en.wikipedia.org/wiki/Imag
eColor_cones.png
109Lab and Luv
- Perceptually-based color spaces (CIE standards)
- Idea want the distance between colors in the
color space to correspond to intuitive notion of
how similar colors are - Not perfect, but much better than XYZ or RGB
color spaces.
110Representing Color
- Generally, store 3 color channels in equal bits
- Not necessary, though, e.g. YIQ
- Can sometimes get better mapping of color space
for an application by adjusting bits - e.g. 10 bits R, 8 bits G, 6 bits B
- Color indexing give each color a numerical
identifier, then use that as reference - Good for specifying with a limited palette
- Note you can use dithering/halftoning with color
channels, similar to how you would for achromatic
light.
111(No Transcript)
112The Retina
- Retina is made up of many receptor cells
- Two main types, rods and cones
- About 6.3-6.8 million cones
- Highest concentration of cones is at the fovea
(center of focus) - About 147,000 cones/mm2
- 2mm away from fovea 9,500 cones/mm2
113Rods and Cones
- Rods
- Distinguish brightness only
- Best response to blue-green light
- Prevalent except at fovea (more peripheral)
- About 100x more sensitive than cones
- About 100 million in retina
- Cones
- Color response
- Centered around fovea
- About 147,000 cones/mm2 at fovea
- 2mm away from fovea 9,500 cones/mm2
- 6.3 - 6.8 million in retina
114Gamma Correction
- A correction term used to relate the intensity of
light output to the the voltage of the CRT
electron gun (i.e. between the cathode and the
grid (anode)). - Not just a way to adjust game brightness!
- I k Ng
- I intensity, N of electrons
- k, g are device-specific terms
- Typically, g 2.0 to 2.5 for most CRTs
115Gamma and non-CRT Displays
- Gamma is meant to model CRTs only
- Other displays (e.g. LCD) may have very different
response curves between intensity and value sent - They do not match the gamma curve
- Often manufacturers adjust responses to try to
mimic CRT behavior - Rarely is any devices response curve exactly
what is desired/modeled - This can get much more complicated
- Major effort just to compensate for gamma
116Dynamic Range and Contrast of Various Display
Mediums