Professional Documents
Culture Documents
Class 12
X =Shading
X =Multiple Light Sources
(photometric stereo)
X =Texture
X =Focus/Defocus
X =Specularities
X =Shadows
X =
Shape from shading
I = cos i = n s =
( pps + qq s + 1) = R ( p, q )
p 2 + q 2 + 1 pS2 + qS2 + 1
Reflectance Map
Iso-brightness contour (Lambertian)
cone of constant i
Reflectance Map
Lambertian case
iso-brightness
contour
q
0.8
0.9
1.0 R( p, q) = 0.7
( pS , qS )
p
i = 90
( ppS + qqS + 1 = 0)
0.3
0.0
Note: R( p, q ) is maximum when ( p, q ) = ( pS , qS )
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?
q
NO
Solution
S 1 z =1 s 1 z =1
N q n g
s
n s n
p f
y
y
x
x
Problem
1
(p,q) can be infinite when = 90
2p 2q
f = g=
1+ 1+ p2 + q2 1+ 1+ p2 + q2
e
n v
e
n
n e, n v n = e v e and v are known
Minimize
2
ei = (I (x, y ) R( f , g )) dxdy
image
es = ( x y ) ( x y )dxdy
f 2
+ f 2
+ g 2
+ g 2
image
e = es + ei
smoothness
constraint
image irradiance
Minimize error
2
( f )+ (g + g ) + (I (x, y ) R( f , g )) dxdy
2 2 2 2
e= x +f y x y
image
Results
Results
Solution
(p , q )
1
S
1
S
p
(p , q )
2
S
2
S
(p , q )
3
S
3
S
Photometric Stereo k : source brightness
: surface albedo (reflectance)
Lambertian case: c : constant (optical system)
kc
I= kc cos i = n s = 1
n Image irradiance:
s2 s3 I1 = n s1
s1 v I 2 = n s2
I 3 = n s 3
~ 1
n=S I inverse
~
=n
~ n
n ~
n= ~ =
n
More than Three Light Sources
Get better results by using more lights
T
I1 s 1
= n
I N sTN
I R = RSn
I G = G Sn
I B = BSn
Simple solution: first solve for n using one channel
Then substitute known n into above equations to get
( R , G , B )
Or combine three channels and solve for n
I = I 2R + I 2G + I 2B = Sn
Computing light source directions
n Ri if v = r
s i i r Re =
v 0 otherwise
s = 2(n r )n r
Computing the Light Source Direction
Chrome sphere that has a highlight at position h in the image
N
H h
rN
C c
sphere in 3D
image plane
V2
V1
Big problems
Doesnt 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
Trick for Handling Shadows
Weight each equation by the pixel brightness:
I i (I i ) = I i (n s i )
Gives weighted least-squares matrix equation:
I12 I1sT1
= n
I N2 I N sTN
Solve for ,n as before
Original Images
Results - Shape
No Shading Information
Original Images
Results - Shape
Results - Albedo
Results