BPC: Art and Computation – Fall 2006 Digital Media II: Light, Vision & Digital Images Glenn Bresnahan
BPC: Art and Computation – Fall Outline What is light? Properties of light How do we see? Digital representation of images Computer display Digital image formats
BPC: Art and Computation – Fall How Do We See?
BPC: Art and Computation – Fall 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 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 What is Light Light is a wave Packets of light energy are called photons
BPC: Art and Computation – Fall Waves Revisited
BPC: Art and Computation – Fall Waves – Properties Amplitude Wavelength (distance)
BPC: Art and Computation – Fall Waves in Motion – Properties Period (time for one cycle) Time 1 2 Frequency cycles per time interval
BPC: Art and Computation – Fall Cycles and Circles Sine waves and circles are closely related Y axis X axis angle (x,y)
BPC: Art and Computation – Fall Cycles and Circles Y axis X axis angle (x,y)
BPC: Art and Computation – Fall Properties of Sound Pitch is the perception of frequency Human perception: 20 Hz – 20 KHz Sound travels at approx feet/second in air –Approx. 750 miles/hour or 1 mile every 4.8 sec. Loudness perception of amplitude
BPC: Art and Computation – Fall Properties of Light Color is the perception of frequency Human 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 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 Wavelength 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 Visible Spectrum Where is the white light? What happens at higher/lower frequencies?
BPC: Art and Computation – Fall Electromagnetic Spectrum Visible light is electromagnetic force in a particular frequency range
BPC: Art and Computation – Fall Light 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 Absorption 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 Reflection and Refraction
BPC: Art and Computation – Fall Reflection Light reflects at an opposite and equal angle –Specular (mirror) reflection Some light will be scattered in all directions
BPC: Art and Computation – Fall Refraction Speed of a wave varies by material Index of refraction is relative speed in the medium –Vacuum –Air –Ice1.31 –Water1.33 –Quartz1.46 –Flint glass –Diamond2.417
BPC: Art and Computation – Fall Refraction 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 Refraction Objects appear to bend in water
BPC: Art and Computation – Fall Refraction Lens change size of objects
BPC: Art and Computation – Fall Combination of Light White light? –Combination of multiple colors (freq) of light What 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 Color 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 How We See Light is emitted from a source Light interacts with surfaces in the environment Light is reflected into our eyes
BPC: Art and Computation – Fall Human 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 Human 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 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 process Retinal is synthesized from vitamin A Vitamin A is derived from beta- carotene
BPC: Art and Computation – Fall 2006 Digital Media II: Light, Vision & Digital Images Part 2 Glenn Bresnahan
BPC: Art and Computation – Fall 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 Combining Waves Sound waves do not combine to make new frequencies (pitch) C + E not equal D C = Hz / 65.9 cm (2.162 ft) D = Hz / 58.7 cm (1.925 ft) E = Hz / 52.3 cm (1.716 ft)
BPC: Art and Computation – Fall Length 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 Human 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 Photoreceptors The retina contains two types of receptor cells: rods and cones Approx. 90 million rods; 4.5 million cones
BPC: Art and Computation – Fall Photoreceptors - 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 Photoreceptors - Cones Cones require much more light to fire Cones react much more quickly ( ms) Cones are much denser in the center (fovea) of the eye
BPC: Art and Computation – Fall Photoreceptors – Distribution
BPC: Art and Computation – Fall Photoreceptors - 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 Photoreceptors – Response Spectrum S = blue, M = green, L = red
BPC: Art and Computation – Fall Photoreceptors – Seeing Colors Any response can be synthesized by combining red, green and blue light
BPC: Art and Computation – Fall Color Mixing Adding red, green and blue light in various proportions can generate the perception of all colors
BPC: Art and Computation – Fall Cell Firings Light reaching photoreceptors causes some number of cells to fire (after an interval) Cells can not continually fire Receptors can become saturated Cell firings are discrete
BPC: Art and Computation – Fall Saturation – After Images
BPC: Art and Computation – Fall Saturation – After Images
BPC: Art and Computation – Fall Flicker 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 Flicker Fusion & Animation Flicker fusion makes animation possible Each frame is displayed a fraction of a second
BPC: Art and Computation – Fall Flicker Fusion in Film and Video Film uses 24 frames per second Video uses 30 frames per second Flicker fusion is >45 FPS How does this work??
BPC: Art and Computation – Fall Flicker Fusion in Film Film projector has a shutter Each frame is displayed 3 times
BPC: Art and Computation – Fall Flicker 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 Seeing 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 Vision Is Complicated
BPC: Art and Computation – Fall Digital Images
BPC: Art and Computation – Fall Digital Images Red= 100% Green = 80% Blue = 60%
BPC: Art and Computation – Fall Digital 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 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 Graphics Display RGB RGB RGB … … … … Frame Buffer Computer Monitor
BPC: Art and Computation – Fall Cathode 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 Other Displays Liquid Crystal (LCD) Plasma panel Digital Light Projection
BPC: Art and Computation – Fall Digital 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