computer vision

40
Computer Vision Spring 2010 15-385,-685 Instructor: S. Narasimhan PH A18B T-R 10:30am – 11:50am Lecture #13

Upload: mizell

Post on 07-Jan-2016

37 views

Category:

Documents


0 download

DESCRIPTION

Computer Vision. Spring 2010 15-385,-685 Instructor: S. Narasimhan PH A18B T-R 10:30am – 11:50am Lecture #13. Mechanisms of Reflection. source. incident direction. surface reflection. body reflection. surface. Surface Reflection: Specular Reflection Glossy Appearance - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Computer Vision

Computer Vision

Spring 2010 15-385,-685

Instructor: S. Narasimhan

PH A18B

T-R 10:30am – 11:50am

Lecture #13

Page 2: Computer Vision

Mechanisms of Reflectionsource

surfacereflection

surface

incidentdirection

bodyreflection

• Body Reflection:

Diffuse ReflectionMatte AppearanceNon-Homogeneous MediumClay, paper, etc

• Surface Reflection:

Specular ReflectionGlossy AppearanceHighlightsDominant for Metals

Image Intensity = Body Reflection + Surface Reflection

Page 3: Computer Vision

Example Surfaces

Body Reflection:

Diffuse ReflectionMatte AppearanceNon-Homogeneous MediumClay, paper, etc

Surface Reflection:

Specular ReflectionGlossy AppearanceHighlightsDominant for Metals

Many materials exhibitboth Reflections:

Page 4: Computer Vision

Diffuse Reflection and Lambertian BRDF

Page 5: Computer Vision

Diffuse Reflection and Lambertian BRDF

viewingdirection

surfaceelement

normalincidentdirection

in

v

s

d

rriif ),;,(• Lambertian BRDF is simply a constant :

albedo

• Surface appears equally bright from ALL directions! (independent of )

• Surface Radiance :

v

• Commonly used in Vision and Graphics!

snIIL di

d .cos

source intensity

source intensity I

Page 6: Computer Vision

White-out: Snow and Overcast Skies

CAN’T perceive the shape of the snow covered terrain!

CAN perceive shape in regions lit by the street lamp!!

WHY?

Page 7: Computer Vision

Specular Reflection and Mirror BRDFsource intensity I

viewingdirectionsurface

element

normal

incidentdirection n

v

s

rspecular/mirror direction

),( ii ),( vv

),( rr

• Mirror BRDF is simply a double-delta function :

• Valid for very smooth surfaces.

• All incident light energy reflected in a SINGLE direction (only when = ).

• Surface Radiance : )()( vivisIL

v r

)()(),;,( vivisvviif specular albedo

Page 8: Computer Vision

Combing Specular and Diffuse: Dichromatic Reflection

Observed Image Color = a x Body Color + b x Specular Reflection Color

R

G

B

Klinker-Shafer-Kanade 1988

Color of Source(Specular reflection)

Color of Surface(Diffuse/Body Reflection)

Does not specify any specific model forDiffuse/specular reflection

Page 9: Computer Vision

Diffuse and Specular Reflection

diffuse specular diffuse+specular

Page 10: Computer Vision

Photometric Stereo

Lecture #9

Page 11: Computer Vision

Image Intensity and 3D Geometry

• Shading as a cue for shape reconstruction• What is the relation between intensity and shape?

– Reflectance Map

Page 12: Computer Vision

Surface Normal

surface normal Equation of plane

or

Let

Surface normal

Page 13: Computer Vision

Gradient Space

Normal vector

Source vector

plane is called the Gradient Space (pq plane)

• Every point on it corresponds to a particular surface orientation

Page 14: Computer Vision

Reflectance Map

• Relates image irradiance I(x,y) to surface orientation (p,q) for given source direction and surface reflectance

• Lambertian case:

: source brightness

: surface albedo (reflectance)

: constant (optical system)

Image irradiance:

Let then

Page 15: Computer Vision

• Lambertian case

Reflectance Map(Lambertian)

cone of constant

Iso-brightness contour

Reflectance Map

Page 16: Computer Vision

• Lambertian caseiso-brightnesscontour

Note: is maximum when

Reflectance Map

Page 17: Computer Vision

• Glossy surfaces (Torrance-Sparrow reflectance model)

diffuse term specular term

Diffuse peak

Specular peak

Reflectance Map

Page 18: Computer Vision

Shape from a Single Image?

• Given a single image of an object with known surface reflectance taken under a known light source, can we recover the shape of the object?

• Given R(p,q) ( (pS,qS) and surface reflectance) can we determine (p,q) uniquely for each image point?

NO

Page 19: Computer Vision

Solution

• Take more images– Photometric stereo

• Add more constraints– Shape-from-shading (next class)

Page 20: Computer Vision

Photometric Stereo

Page 21: Computer Vision

• We can write this in matrix form:

Image irradiance:

Lambertian case:

Photometric Stereo

Page 22: Computer Vision

Solving the Equations

inverse

Page 23: Computer Vision

More than Three Light Sources

• Get better results by using more lights

• Least squares solution:

• Solve for as beforeMoore-Penrose pseudo inverse

Page 24: Computer Vision

Color Images

• The case of RGB images– get three sets of equations, one per color channel:

– Simple solution: first solve for using one channel– Then substitute known into above equations to get

– Or combine three channels and solve for

Page 25: Computer Vision

Computing light source directions

• Trick: place a chrome sphere in the scene

– the location of the highlight tells you the source direction

Page 26: Computer Vision

• For a perfect mirror, light is reflected about N

Specular Reflection - Recap

• We see a highlight when • Then is given as follows:

Page 27: Computer Vision

Computing the Light Source Direction

• Can compute N by studying this figure– Hints:

• use this equation:• can measure c, h, and r in the image

N

rN

C

H

c

h

Chrome sphere that has a highlight at position h in the image

image plane

sphere in 3D

Page 28: Computer Vision

Limitations

• Big problems– Doesn’t work for shiny things, semi-translucent things– Shadows, inter-reflections

• Smaller problems– Camera and lights have to be distant– Calibration requirements

• measure light source directions, intensities• camera response function

Page 29: Computer Vision

Trick for Handling Shadows

• Weight each equation by the pixel brightness:

• Gives weighted least-squares matrix equation:

• Solve for as before

Page 30: Computer Vision

Results: Lambertian Sphere

Input Images

Estimated AlbedoEstimated Surface Normals

Needles are projectionsof surface normals on

image plane

Page 31: Computer Vision

Lambertain Mask

Page 32: Computer Vision

Results – Albedo and Surface Normal

Page 33: Computer Vision

Results: Lambertian Toy

Input Images

Estimated Surface Normals Estimated Albedo

I.2

Page 34: Computer Vision

Depth from Normals

• Get a similar equation for V2

– Each normal gives us two linear constraints on z

– compute z values by solving a matrix equation

V1

V2

N

Page 35: Computer Vision

Results – Shape of Mask

Page 36: Computer Vision

Results

1. Estimate light source directions2. Compute surface normals3. Compute albedo values4. Estimate depth from surface normals5. Relight the object (with original texture and uniform albedo)

Page 37: Computer Vision

Original Images

Page 38: Computer Vision

Results - Albedo

No Shading Information

Page 39: Computer Vision

Results - Shape

Shallow reconstruction (effect of interreflections)

Accurate reconstruction (after removing interreflections)

Page 40: Computer Vision

Next Class

• Shape from Shading

• Reading: Horn, Chapter 11.