View
217
Download
1
Embed Size (px)
Citation preview
BPC: Art and Computation – Fall 2006BPC: Art and Computation – Fall 2006
Digital Media II:Digital Media II:Light, Vision & Digital ImagesLight, Vision & Digital Images
Glenn Bresnahan
BPC: Art and Computation – Fall 2006 2
OutlineOutline
What is light?Properties of lightHow do we see?Digital representation of imagesComputer displayDigital image formats
BPC: Art and Computation – Fall 2006 3
How Do We See?How Do We See?
BPC: Art and Computation – Fall 2006 4
How Do We Hear?How Do We Hear?
Sound waves move through the air Waves interact (e.g. reflect) w/ environment Sounds wave reach our ear
BPC: Art and Computation – Fall 2006 5
How Do We See?How Do We See?
Light is emitted from a source Waves interact (e.g. reflect) w/ environment Light reaches our eyes
BPC: Art and Computation – Fall 2006 6
What is LightWhat is Light
Light is a
wave
Packets of light energy are called photons
BPC: Art and Computation – Fall 2006 7
Waves RevisitedWaves Revisited
BPC: Art and Computation – Fall 2006 8
Waves – PropertiesWaves – Properties
Sine Wave
-1.5
-1
-0.5
0
0.5
1
1.5
Amplitude
Wavelength (distance)
BPC: Art and Computation – Fall 2006 9
Waves in Motion – PropertiesWaves in Motion – Properties
Sine Wave
-1.5
-1
-0.5
0
0.5
1
1.5
Period (time for one cycle)
TimeTime 11 22Frequency cycles per time interval
BPC: Art and Computation – Fall 2006 10
Cycles and CirclesCycles and Circles
Sine waves and circles are closely related
Y axis
X axisangle
(x,y)
BPC: Art and Computation – Fall 2006 11
Cycles and CirclesCycles and CirclesY Value vs Angle
-1.5
-1
-0.5
0
0.5
1
1.5
0 30 60 90 120 150 180 210 240 270 300 330 360
Angle
Y v
alu
e
Y axis
X axisangle
(x,y)
X Value vs Angle
-1.5
-1
-0.5
0
0.5
1
1.5
0 30 60 90 120 150 180 210 240 270 300 330 360
Angle
X v
alu
e
BPC: Art and Computation – Fall 2006 12
Properties of SoundProperties of Sound
Pitch is the perception of frequencyHuman perception: 20 Hz – 20 KHzSound travels at approx. 1100
feet/second in air– Approx. 750 miles/hour or 1 mile every
4.8 sec.Loudness perception of amplitude
BPC: Art and Computation – Fall 2006 13
Properties of LightProperties of Light
Color is the perception of frequencyHuman perception: 430 – 750 THz
(red – violet)– 1 THz = 1,000,000,000,000 Hz
Light travels at approx. 186,000 miles/second in air– Approx 1 foot every nanosecond
Brightness is perception of energy level (number of photons)
BPC: Art and Computation – Fall 2006 14
How Fast is Light?How Fast is Light?
186,00 miles/sec or 300,000 meters/sec
8 minutes to reach earth from sun
BPC: Art and Computation – Fall 2006 15
WavelengthWavelength
Wavelength = Speed / Freq– E.g. 1 ft/sec at 1 Hz = 1 ft wavelength– Higher frequencies == shorter wavelengths
Red = 300KM/Sec / 430 THz = 698 nm (nano (billionth) meters)
Violet = 300KM/Sec / 750 THz = 400 nm
BPC: Art and Computation – Fall 2006 16
Visible SpectrumVisible Spectrum
Where is the white light?
What happens at higher/lower frequencies?
BPC: Art and Computation – Fall 2006 17
Electromagnetic SpectrumElectromagnetic Spectrum
Visible light is electromagnetic force in a particular frequency range
BPC: Art and Computation – Fall 2006 18
Light Interaction with MaterialsLight Interaction with Materials
When light hits a surface, several things can happen. The light can be:– Absorbed by the surface• Converted to another form of energy
– Reflected (bounced) off the surface– Transmitted (refracted) through the
surface
BPC: Art and Computation – Fall 2006 19
Absorption and ReflectionAbsorption and Reflection
Different materials will absorb different frequencies
The absorption vs. reflection determines the color of the material– Black materials absorbs all wavelengths– White material reflects all wavelengths– Blue material reflects blue and absorbs all
other wavelengths Combining pigments causes more
wavelengths to be absorbed, fewer wavelengths to be reflected– Subtractive color
BPC: Art and Computation – Fall 2006 20
Reflection and RefractionReflection and Refraction
BPC: Art and Computation – Fall 2006 21
ReflectionReflection
Light reflects at an opposite and equal angle– Specular (mirror) reflection
Some light will be scattered in all directions
BPC: Art and Computation – Fall 2006 22
RefractionRefraction
Speed of a wave varies by material Index of refraction is relative speed in the
medium– Vacuum 1.0000– Air 1.0003– Ice 1.31– Water 1.33– Quartz 1.46– Flint glass 1.57-1.75– Diamond 2.417
BPC: Art and Computation – Fall 2006 23
RefractionRefraction
When a wave chances speed it changes direction, i.e. bends
The angle
depends of the
change in
refractive
index
BPC: Art and Computation – Fall 2006 24
RefractionRefraction
Objects appear to bend in water
BPC: Art and Computation – Fall 2006 25
RefractionRefraction
Lens change size of objects
BPC: Art and Computation – Fall 2006 26
Combination of LightCombination of Light
White light?– Combination of multiple colors (freq) of
lightWhat happens when we combine
different frequencies of light, say red and green?
What happens when we combine different frequencies of sound, say an C and an E note?
BPC: Art and Computation – Fall 2006 27
Color ExperimentColor Experiment
If we combine red, green and blue light we get new colors in the region of overlap
Colors seem to “add”
BPC: Art and Computation – Fall 2006 28
How We SeeHow We See
Light is emitted from a sourceLight interacts with surfaces in the
environmentLight is reflected into our eyes
BPC: Art and Computation – Fall 2006 29
Human VisionHuman Vision
Light passes into the cornea, though a liquid filled chamber and out through the lens. These focus the light
The pupil acts as diaphragm, controlling the amount of light
The light is projected onto the retina at the back of the eye
BPC: Art and Computation – Fall 2006 30
Human VisionHuman Vision
The retina is covered with photosensitive receptor cells
Photoreceptor cells are attached to the optical nerve which feeds signals to the brain
Light (photons) enter the cell cause a chemical reaction which causes the cell to fire
BPC: Art and Computation – Fall 2006 31
Eat Your Carrots!Eat Your Carrots!
Photoreceptor cells contain opsin (a protein) + retinal = rhodopsin
Photo excitation causes the rhodopsin to twist and release the retinal
The released retinal causes a reaction which cause the attached nerve to fire
Retinal is destroyed in the processRetinal is synthesized from vitamin AVitamin A is derived from beta-
carotene
BPC: Art and Computation – Fall 2006BPC: Art and Computation – Fall 2006
Digital Media II:Digital Media II:Light, Vision & Digital ImagesLight, Vision & Digital ImagesPart 2Part 2
Glenn Bresnahan
BPC: Art and Computation – Fall 2006 33
Question?Question?
When we combine light of two different frequencies we seem to get light of a different color. Why does this happen? Sound waves don’t combine this way.
BPC: Art and Computation – Fall 2006 34
Combining WavesCombining Waves
Sound waves do not combine to make new frequencies (pitch)
C + E not equal DC = 523.25 Hz / 65.9 cm (2.162 ft)
D = 587.33 Hz / 58.7 cm (1.925 ft)
E = 659.29 Hz / 52.3 cm (1.716 ft)
BPC: Art and Computation – Fall 2006 35
Length of Light WavesLength of Light Waves
Human hair ~ 1/500”– 0.005 cm– 50,000 nm
Cyan light = 500 nm 100 wavelengths
across a human hair
BPC: Art and Computation – Fall 2006 36
Human VisionHuman Vision
Light passes into the cornea, though a liquid filled chamber and out through the lens. These focus the image
The pupil acts as diaphragm, controlling the amount of light
The light is projected onto the retina at the back of the eye where a chemical reaction causes neurons to fire
BPC: Art and Computation – Fall 2006 37
PhotoreceptorsPhotoreceptors
The retina contains two types of receptor cells: rods and cones
Approx. 90 million rods; 4.5 million cones
BPC: Art and Computation – Fall 2006 38
Photoreceptors - RodsPhotoreceptors - Rods
Rods react to very low light levels– As few as several photons
Rods react to a broad spectrum of frequencies (max at 498 nm)
Rods react slowly (~100 milliseconds)
BPC: Art and Computation – Fall 2006 39
Photoreceptors - ConesPhotoreceptors - Cones
Cones require much more light to fireCones react much more quickly (10-
15 ms)Cones are much denser in the center
(fovea) of the eye
BPC: Art and Computation – Fall 2006 40
Photoreceptors – DistributionPhotoreceptors – Distribution
BPC: Art and Computation – Fall 2006 41
Photoreceptors - ConesPhotoreceptors - Cones
Three types of cones: S, M, L which react to different wavelengths of light– L Cones: peak at 564 nm–M Cones: peak at 533 nm– S Cones: peak at 437 nm
BPC: Art and Computation – Fall 2006 42
Photoreceptors – Response SpectrumPhotoreceptors – Response Spectrum
S = blue, M = green, L = red
BPC: Art and Computation – Fall 2006 43
Photoreceptors – Seeing ColorsPhotoreceptors – Seeing Colors
Any response can be synthesized by combining red, green and blue light
BPC: Art and Computation – Fall 2006 44
Color MixingColor Mixing
Adding red, green and blue light in various proportions can generate the perception of all colors
BPC: Art and Computation – Fall 2006 45
Cell FiringsCell Firings
Light reaching photoreceptors causes some number of cells to fire (after an interval)
Cells can not continually fireReceptors can become saturatedCell firings are discrete
BPC: Art and Computation – Fall 2006 46
Saturation – After ImagesSaturation – After Images
BPC: Art and Computation – Fall 2006 47
Saturation – After ImagesSaturation – After Images
BPC: Art and Computation – Fall 2006 48
Flicker FusionFlicker Fusion
If light is flashed fast enough, it becomes indistinguishable from a steady light
The rate is called the flicker fusion or critical flicker frequency
Dependent on intensity, but about 45 Hz
BPC: Art and Computation – Fall 2006 49
Flicker Fusion & AnimationFlicker Fusion & Animation
Flicker fusion makes animation possible
Each frame is
displayed a
fraction of a
second
BPC: Art and Computation – Fall 2006 50
Flicker Fusion in Film and VideoFlicker Fusion in Film and Video
Film uses 24 frames per secondVideo uses 30 frames per secondFlicker fusion is >45 FPSHow does this work??
BPC: Art and Computation – Fall 2006 51
Flicker Fusion in FilmFlicker Fusion in Film
Film projector has a shutterEach frame is displayed 3 times
BPC: Art and Computation – Fall 2006 52
Flicker Fusion in VideoFlicker Fusion in Video
Frame is broken up into strips (scan lines)
Frame is divided into two fields: odd lines and even lines
Fields are displayed at 60 Hz
BPC: Art and Computation – Fall 2006 53
SeeingSeeing
The rods and cones cause nerves to fire and electrical signals to be send to the brain.
There are ~100 million receptor cells generating impulse streams
Impulses are combined by other nerve cells
1.2 million nerve fibers in optic nerve bundle
BPC: Art and Computation – Fall 2006 54
Vision Is ComplicatedVision Is Complicated
BPC: Art and Computation – Fall 2006 55
Digital ImagesDigital Images
BPC: Art and Computation – Fall 2006 56
Digital ImagesDigital Images
Red = 100%Green = 80%Blue = 60%
BPC: Art and Computation – Fall 2006 57
Digital ImagesDigital Images
Image is constructed from a grid (array) of individual color dots
Individual dots are called pixels (picture elements) Resolution is the number of elements in each
direction (e.g. 1280 in x, 1024 in y = 1.3 Mpixel) Each pixel is composed of three color
components representing levels of R,G,B light Each level (R,G,B) is represented by a number
– One byte (0-255) per component, e.g. 255,204,153 The array of pixel values is stored in a graphics
frame buffer (memory) The pixel values are read out (at approx. 60 fps)
and used to display the image on a monitor
BPC: Art and Computation – Fall 2006 58
Graphics DisplayGraphics Display
RGB RGB RGB …
RGB RGB RGB …
RGB RGB RGB …… … …
Frame Buffer Computer Monitor
BPC: Art and Computation – Fall 2006 59
Cathode Ray Tube DisplayCathode Ray Tube Display
Same technology as a TV screen Electron beam is aimed at the screen When the beam hits a phosphor on the surface it
glows Three different colored (RGB) beams phosphors
BPC: Art and Computation – Fall 2006 60
Other DisplaysOther Displays
Liquid Crystal (LCD) Plasma panel Digital Light Projection
BPC: Art and Computation – Fall 2006 61
Digital Storage of ImagesDigital Storage of Images
Need to store RGB value for each pixel 1024x1280 pixels = 3.9 million numbers Different images files use different ways of
storing the numbers– Most file formats store additional information– Formats vary in how much information per pixel is
stored Some formats compress the information
– Compression can lead to loss of detail– Uncompressing the compressed image is NOT the same
as the original image.– Repeatedly storing (compressing) and retrieving
(uncompressing) can cause an image to degrade