eight light and image. light as a ray light is most frequently thought of as a set of rays traveling...

51
eight light and image

Post on 20-Dec-2015

216 views

Category:

Documents


1 download

TRANSCRIPT

eight

light and image

Light as a ray

Light is most frequently thought of as a set of rays Traveling from a light

source To a viewer By way of some

surface(s) that reflect it

Light as a ray

Light is most frequently thought of as a set of rays Traveling from a light

source To a viewer By way of some

surface(s) that reflect it Often, it’s many

surfaces

Pinhole camera

Placing a very small hole in very a dark box

Produces a faint image on the opposite side of the

box

Technically, the image is upside-down

object

light ray

hole

image plane

object

Pinhole camera

The hole constrains where the rays can project Farther objects must

project closer to the center

Nearer objects, toward the sides

Pinhole camera

The hole constrains where the rays can project Farther objects

produce smaller images

Nearer objects, larger images

Perspective projection

A camera projects a 3D world down to a 2D world The particular type of

projection is called perspective projection

We can describe perspective projection in terms of coordinates

Y

Zyf

Image plane object

light ray

Y = height of objectZ = depthy = “height” of projection (note image is really upside down)

f = focal length

y/f = Y/Z y = fY/Z

Perspective projection

A camera projects a 3D world down to a 2D world The particular type of

projection is called perspective projection

We can describe perspective projection in terms of coordinates

Y

Z(x,y)f

Image plane (X, Y, Z)

light ray

x = fX/Z

y = fY/Z

(x,y) = (fX/Z, fY/Z)

Perspective projection

Decreasing the focal length makes the image smaller But also increases

your field of view Lenses with short focal

lengths are therefore called wide-angle lenses

Y

Z(x,y)f

Image plane (X, Y, Z)

light ray

x = fX/Z

y = fY/Z

(x,y) = (fX/Z, fY/Z)

Perspective projection

Increasing the focal length makes the image bigger But decreases your

field of view Lenses with large focal

lengths are called telephoto lenses

Y

Z

(x,y)

f

Image plane (X, Y, Z)

light ray

x = fX/Z

y = fY/Z

(x,y) = (fX/Z, fY/Z)

Light as a ray

Light is most frequently thought of as a set of rays Traveling from a light

source To a viewer By way of some

surface(s) that reflect it

Surface reflection

Surface reflectance is very complicated

There are two main models of reflectance Specular (glossy) surfaces

bounce it directly off Lambertian (matte) bounce

it evenly in all directions

incident ray

incident ray

specular reflection(highlights)

Lambertian reflection(matte/diffuse)

reflec

ted ra

ys

reflected rays

Specular reflection

Mirror-like reflection Mirrors are near-perfect

specular reflectors

Incident and reflected rays have at (almost) the same angle

In practice, there’s some scattering

All wavelengths are (usually) reflected equally

So reflection has the color of the light

incident ray

reflec

ted ra

ys

Lambertian reflection

Lambertian/diffuse/matte reflection Perfect non-glossy paint Light reflected equally in all

directions

Brightness depends on illumination angle

When light hits and an angle, it’s spread out over a wider area (1/sin θ times wider)

So the intensity of the light coming out is dimmed by sin θ

Not all wavelengths are reflected equally

The reflection has the color of the surface (at least if the light is white)

θ

d/sin θ

beam spreads out by 1/sin θ

Surface normals

(For reasons that will be clearer later)

We usually measure the angle a little differently

We use the angle between the light and

A line sticking straight out from the surface

This is called the surface’s normal

This means the dimming factor is cos θ

Because we measured θ differently

θ

d θ

d/cos θ

beam spreads out by 1/cos θ

surf

ace

norm

al

Specular and diffuse reflection

Shape from shading

Perceptual system computes surface curvature from intensity gradients

Bias to assume light source is above the head

Modeling

Pictorial techniques to bring out object shape Chiaroscuro very

important

Point-lights generate strong shadows Highlights

Carvaggio, Incredulity of St. Thomas

Modeling

Modeling with lighting

Key light Offset from camera Mood, modeling

Fill light Fills in rest of scene Keeps shadows under control

Others Back light, rim light, …

Rim lighting

Used to emphasize outline of an object in shadow Key light leaves left edge of character in shadow

Can’t make out object boundaries Spooky (Tom Hanks isn’t supposed to be spooky)

Weak rim light brings up contrast at object boundary Tom Hanks safely de-spooked

key fill rim

John Lasseter, Toy Story (USA, 1995)

The Boris Karloff effect

The Locket (USA, 1947)

Cohen bros., Blood Simple (USA, 1984)

The French Connection (1971)

Dark City (1998)

Dark city

Dark City

Dark City

Dark City

Subsurface scattering

Translucent materials don’treflect light directly It bounces around inside the material for a

while and comes out in a different location

This is important for modeling skin and wax

Components ofreflection and transmission

                   

  

                   

  

                   

  

                  

   specular diffuse SSS combined

Problems with pinhole cameras

Because the aperture (hole) is so small, pinhole cameras let very little light in

This means you need to use very bright lights or very long exposures to capture images on film

object

light ray

small aperture

image plane

object

Problems with pinhole cameras

We can make the aperture larger But then it doesn’t

constraint where the rays go

We lose focus Light from objects spreads

out Images of objects overlap

object

light rays

big aperture

image plane

object

Thin lens projection

A lens allows many rays to focus to the same point

Brighter image

But only focuses a single depth plane

Image planelight rays

aperture

lens

Thin lens projection

That’s partly why cameras with lenses still have an aperture

By shrinking the aperture We get closer to a

pinhole camera And we get wider depth

of field

Image planelight rays

aperture

lens

Deep focus

Citizen Kane (Welles, 1941)

Citizen Kane

Shallow focus

Rules of the Game, (Renoir, 1939)

Light as a wave

Light is an oscillation between electric and magnetic fields

Frequency/wavelength determines apparent color But color is perceptual

property, not a physical one

Amplitude determines apparent brightness

magnetic field

elec

tric

fie

ld

time

High frequencyShort wavelength

Low frequencyLong wavelength

Oscillation

Occurs when two forces are in opposition

Causes energy to alternate between two forms

Guitar string Motion stretches the string Which slows the motion And eventually reverses it But then the stretch reverses And so on …

Commonly takes the form of a sine wave

speed(t) = cos ωtstretch(t) = sin ωt

ω is the frequency of the oscillation (how often it repeats)

speed

stre

tch

time

Waves

Waves are oscillations that move through space Frequency

Rate of cycling Period (how far

between cycles)

Amplitude (intensity):Size of the oscillation

w(x) = A sin(ωx)

Chromatic aberration

A lens actually focuses different wavelengths (colors) at slightly different depths

In extreme cases, this leads to a colored blur around bright lights

blue/violet artifacts

The human eye

Lens and iris Photoreceptors

Rods (b/w) Cones (color) Fovea

Small (size of thumbnail at 3’) High resolution Color vision

Macula, and peripheryLow resolution, wide FOV

Retinal processing Gain control Edge enhancement? Simple motion detection

lens/irisrods

conesretinal

ganglion

Chromatic aberration in the eye

The blue photoreceptors of the eye evolved first So the have lower resolution And nature didn’t try to fix the chromatic aberration of the eye

So blue light is significantly out of focus on the retina Blue backgrounds in PowerPoint are evil

blueis

poorlyfocused

onthe

retina

greenis

wellfocused

onthe

retina

Photoreceptors

Rods Found mostly in the macula and periphery Very sensitive to light But don’t detect color

Cones Found in the fovea Less sensitive Color sensitive

Colors seem to fade in low light

Trichromacy

Having different cones for every possible wavelength would be bad

We just have three kinds of cones “Blue” cones: short wavelengths “Green” cones: intermediate

wavelengths “Red” cones: long wavelengths However, their responses overlap

The eye reduces all the wavelengths at a given pixel to just the total “amount” of “red”, “green”, and “blue”

Components of a color image