light and color
COS 351 - Computer Vision
building a camera
Let's design a camera!
What do you need to make a camera from scratch?
image formation
Idea 1: put a piece of film in front of an object
- Do we get a reasonable image?
image formation
Idea 1: put a piece of film in front of an object
- Do we get a reasonable image?
image formation
Idea 1: put a piece of film in front of an object
- Do we get a reasonable image?
image formation
Idea 2: add a barrier to block off most of the rays
- this reduces blurring
- the opening known as the aperture
image formation
Idea 2: add a barrier to block off most of the rays
- this reduces blurring
- the opening known as the aperture
pinhole camera
f = focal length
c = center of the camera
camera obscura: the pre-camera
- Known during classical period in China and Greece (e.g., Mo-Ti, China, 470BC to 390BC)
[ Photo by Seth Ilys ]
camera obscura used for tracing
Lens Based Camera Obscura, 1568
accidental cameras
Accidental pinhole and pinspeck cameras revealing the scene outside the picture
[ Antonio Torralba, William T. Freeman ]
accidental cameras
Accidental pinhole and pinspeck cameras revealing the scene outside the picture
[ Antonio Torralba, William T. Freeman ]
pinhole camera apartment
first photograph
Oldest surviving photograph
- took 8 hours on pewter plate
Joseph Niepce, 1826Photograph of the first photograph, stored at UT Austin
first photograph
Niepce later teamed up with Daguerre, who eventually created Daguerrotypes
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- **reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
a photon's life choices
- absorption
- diffusion
- reflection
- transparency
- refraction
- fluorescence
- subsurface scattering
- phosphorescence
- interreflection
|
|
lambertion reflection
In computer vision, surfaces are often assumed to be ideal diffuse reflectors with no dependence on viewing direction
digital camera
A digital camera replaces film with a sensor array
- each cell in the array is light-sensitive diode that converts photons to electrons
- two common types
- Charge Coupled Device (CCD)
- Complementary Metal-Oxide Semiconductor (CMOS)
- see link for details
sensor array
CMOS sensor
sampling and quantization
interlace vs progressive scan
motion: progressive scan
motion: interlace
rolling shutter
CMOS captures row at a time
the eye
The human eye is a camera!
- Iris: colored annulus with radial muscles
- Pupil: the hole (aperture) whose size is controlled by the iris
- What's the "film"?
- Photoreceptor cells (rods and cones) in the retina
the retina
what human's don't have: tapetum lucidum
two types of light-sensitive receptors
CONES
- cone-shaped
- less sensitive
- operate in high light
- color vision
RODS
- rod-shaped
- highly sensitive
- operate at night
- gray-scale vision
|
|
rod/cone sensitivity
distribution of rods and cones
Night Sky: Why are there more stars off-center?
eye movements
Saccades
- can be consciously controlled, related to perceptual attention
- 200ms to initiation, 20–200ms to carry out. large amplitude
Microsaccades
- involuntary, smaller amplitude, especially evident during prolonged fixation. function debated
Ocular microtremor (OMT)
- Involuntary, high frequency (up to 80Hz), small amplitude
electromagnetic spectrum
human luminance sensitivity function
visible light
Why do we see light of these wavelengths?
... because that's where the Sun radiates EM energy
[ Stephen E. Palmer, 2002 ]
the physics of light
Any patch of light can be completely described physically by its spectrum: the number of photons (per time unit) at each wavelength 400–700nm.
[ Stephen E. Palmer, 2002 ]
the physics of light
Some examples of the spectra of light sources
[ Stephen E. Palmer, 2002 ]
the physics of light
Some examples of the reflectance spectra of surfaces
[ Stephen E. Palmer, 2002 ]
the physics of light
There is no simple function description for the perceived color of all lights under all viewing conditions, but...
A helpful constraint: consider only physical spectra with normal distributions
[ Stephen E. Palmer, 2002 ]
the psychophysical correspondence
[ Stephen E. Palmer, 2002 ]
the psychophysical correspondence
[ Stephen E. Palmer, 2002 ]
the psychophysical correspondence
[ Stephen E. Palmer, 2002 ]
physiology of color vision
Three kinds of cones
- Why are M and L cones so close?
- Why are there 3?
impossible colors
Can you make the cones respond in ways that typical light spectra never would?
tetrachromatism
- Most birds and many other animals have cones for ultraviolet light
- some humans, mostly female, seem to have slight tetrachromatism
more spectra, metamers
Metamers: a color that appears to the eye to be identical to another color but which in fact has a different spectral composition
more spectra, metamers
practical color sensing: bayer grid
Estimate RGB at 'G' cells from neighboring values
images in Matlab
- Images represented as a matrix
- Suppose we have an NxM RGB image called
im
im(1,1,1)
= top-left pixel value in R-channel
im(y,x,b)
= y pixels down, x pixels right in the bth channel
im(N,M,3)
= bottom-right pixel in the B-channel
imread(filename)
returns a uint8 image (values 0–255)
- convert to double format (values 0–1) with
im2double
color spaces
How can we represent color?
if you had to choose, would you rather go without luminance or chrominance?
only color shown, constant intensity
only intensity shown, constant color
original image
most information in intensity
back to grayscale intensity