Lecture 13 - Massachusetts Institute of...
Transcript of Lecture 13 - Massachusetts Institute of...
![Page 1: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/1.jpg)
Lecture 13 Shape from X
![Page 2: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/2.jpg)
Depth Perception: The inverse problem
![Page 3: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/3.jpg)
Monocular cues to depth
• Absolute depth cues: (assuming known camera parameters) these cues provide information about the absolute depth between the observer and elements of the scene
• Relative depth cues: provide relative information about depth between elements in the scene (this point is twice as far at that point, …)
![Page 4: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/4.jpg)
Relative depth cues
Simple and powerful cue, but hard to make it work in practice…
![Page 5: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/5.jpg)
Atmospheric perspective
• Based on the effect of air on the color and visual acuity of objects at various distances from the observer.
• Consequences: – Distant objects appear
bluer – Distant objects have lower
contrast.
![Page 6: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/6.jpg)
Atmospheric perspective
http://encarta.msn.com/medias_761571997/Perception_(psychology).html
![Page 7: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/7.jpg)
Claude Lorrain (artist) French, 1600 - 1682 Landscape with Ruins, Pastoral Figures, and Trees, 1643/1655
![Page 8: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/8.jpg)
[Golconde Rene Magritte]
![Page 9: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/9.jpg)
Shadows
http://www.cs.cornell.edu/courses/cs569/2008sp/schedule.stm Slide by Steve Marschner
![Page 10: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/10.jpg)
Shadows
video
![Page 11: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/11.jpg)
Shadows
http://vision.psych.umn.edu/users/kersten/kersten-lab/shadows.html
![Page 12: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/12.jpg)
Linear perspective
![Page 13: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/13.jpg)
Linear Perspective
Based on the apparent convergence of parallel lines to common vanishing points with increasing distance from the observer.
(Gibson : “perspective order”) In Gibson’s term, perspective is a
characteristic of the visual field rather than the visual world. It approximates how we see (the retinal image) rather than what we see, the objects in the world.
Perspective : a representation that is specific to one individual, in one position in space and one moment in time (a powerful immediacy).
Is perspective a universal fact of the visual
retinal image ? Or is perspective something that is learned ?
Simple and powerful cue, and easy to make it work in practice…
![Page 14: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/14.jpg)
Linear Perspective
Ponzo’s illusion
![Page 15: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/15.jpg)
Linear Perspective
Muller-Lyer 1889
![Page 16: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/16.jpg)
Linear Perspective
Muller-Lyer 1889
![Page 17: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/17.jpg)
Linear Perspective
Muller-Lyer 1889
![Page 18: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/18.jpg)
The two Towers of Pisa
Frederick Kingdom, Ali Yoonessi and Elena Gheorghiu of McGill Vision Research unit.
![Page 19: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/19.jpg)
3D percept is driven by the scene, which imposes its ruling to the objects
The strength of linear perspective
![Page 20: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/20.jpg)
Manhattan assumption
Slide by James Coughlan J. Coughlan and A.L. Yuille. "Manhattan World: Orientation and Outlier Detection by Bayesian Inference." Neural Computation. May 2003.
![Page 21: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/21.jpg)
Slide by James Coughlan
![Page 22: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/22.jpg)
Slide by James Coughlan
Camera orientation
Edge type
Gradient magnitude and orientation
![Page 23: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/23.jpg)
Slide by James Coughlan
![Page 24: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/24.jpg)
![Page 25: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/25.jpg)
Slide by James Coughlan
![Page 26: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/26.jpg)
![Page 27: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/27.jpg)
The importance of the horizon line
![Page 28: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/28.jpg)
Distance from the horizon line
• Based on the tendency of objects to appear nearer the horizon line with greater distance to the horizon.
• Objects approach the horizon line with greater distance from the viewer. The base of a nearer column will appear lower against its background floor and further from the horizon line. Conversely, the base of a more distant column will appear higher against the same floor, and thus nearer to the horizon line.
![Page 29: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/29.jpg)
Moon illusion
![Page 30: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/30.jpg)
Relative height
The object closer to the horizon is perceived as farther away, and the object further from the horizon is perceived as closer
If you know camera parameters: height of
the camera, then we know real depth
![Page 31: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/31.jpg)
At which elevation has been taken this picture?
![Page 32: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/32.jpg)
Comparing heights
Vanishing Point
![Page 33: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/33.jpg)
Measuring height
1
2
3
4
5 5.4
2.8
3.3
Camera height
![Page 34: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/34.jpg)
q1
Computing vanishing points (from lines)
Intersect p1q1 with p2q2
v
p1
p2
q2
Least squares version
• Better to use more than two lines and compute the “closest” point of intersection
• See notes by Bob Collins for one good way of doing this: – http://www-2.cs.cmu.edu/~ph/869/www/notes/vanishing.txt
![Page 35: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/35.jpg)
C
Measuring height without a ruler
ground plane
Compute H from image measurements • Need more than vanishing points to do this
H
![Page 36: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/36.jpg)
Measuring height
R H
vz
r
b
t
H
b0
t0 v vx vy
vanishing line (horizon)
![Page 37: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/37.jpg)
Measuring height vz
r
b
t0 vx vy
vanishing line (horizon)
v
t0
m0
What if the point on the ground plane b0 is not known? • Here the guy is standing on the box • Use one side of the box to help find b0 as shown above
b0
t1
b1
![Page 38: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/38.jpg)
What if vz is not infinity?
![Page 39: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/39.jpg)
The cross ratio A Projective Invariant
• Something that does not change under projective transformations (including perspective projection)
P1
P2
P3 P4
1423
2413
PPPPPPPP
−−−−
The cross-ratio of 4 collinear points
Can permute the point ordering • 4! = 24 different orders (but only 6 distinct values)
This is the fundamental invariant of projective geometry
=
1i
i
i
i ZYX
P
3421
2431
PPPPPPPP
−−−−
![Page 40: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/40.jpg)
vZ
r t
b
tvbrrvbt
−−−−
Z
Z
image cross ratio
Measuring height
B (bottom of object)
T (top of object)
R (reference point)
ground plane
H C
TBRRBT
−∞−−∞−
scene cross ratio
∞
=
1ZYX
P
=
1yx
pscene points represented as image points as
RH
=
RH
=
R
![Page 41: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/41.jpg)
Measuring height
R H
vz
r
b
t
image cross ratio
H
b0
t0 v vx vy
vanishing line (horizon)
t − b vZ − rr − b vZ − t
=HR
![Page 42: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/42.jpg)
Measuring heights in real photos
Problem: How tall is this person?
reference 185.3 cm
![Page 43: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/43.jpg)
Assessing geometric accuracy
Measuring relative heights
Problem: Are the heights of the two groups of people consistent with each other?
Piero della Francesca, Flagellazione di Cristo,
c.1460, Urbino
![Page 44: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/44.jpg)
Single-View Metrology
Complete 3D reconstructions from single views
![Page 45: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/45.jpg)
Example: The Virtual Trinity
Masaccio, Trinita’ , 1426, Florence
Complete 3D reconstruction
![Page 46: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/46.jpg)
Example: The Virtual Flagellation
Piero della Francesca, Flagellazione di Cristo,
c.1460, Urbino
Complete 3D reconstruction
![Page 47: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/47.jpg)
Henry V Steenwick, St.Jerome in His Study, 1630, The Netherlands
Example: The Virtual St. Jerome
Complete 3D reconstruction
![Page 48: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/48.jpg)
J. Vermeer, The Music Lesson,
1665, London
Example: The Virtual Music Lesson
Complete 3D reconstruction
![Page 49: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/49.jpg)
Example: A Virtual Museum @ Microsoft
The Image-Based Realities team @ Microsoft Research
![Page 50: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/50.jpg)
Antonio Criminisi Accurate Visual Reconstruction
from Single and Multiple Uncalibrated Images
(Springer-Verlag) ISBN: 1-85233-468-1 look for it on amazon.com !
www.research.microsoft.com/~antcrim
References
![Page 51: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/51.jpg)
Texture Gradient
![Page 52: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/52.jpg)
Texture Gradient
A Witkin. Recovering Surface Shape and Orientation from Texture (1981)
![Page 53: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/53.jpg)
Texture Gradient
Shape from Texture from a Multi-Scale Perspective. Tony Lindeberg and Jonas Garding. ICCV 93
![Page 54: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/54.jpg)
Texture Gradient
• Filter outputs
• Textons
![Page 55: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/55.jpg)
![Page 56: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/56.jpg)
Assumptions: • Smooth closed surface • Homogeneous texture • (sometimes, isotropic texture)
![Page 57: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/57.jpg)
Texture description Use filter outputs to measure local spatial frequency.
![Page 58: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/58.jpg)
Texture projection Assume orthographic projection.
![Page 59: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/59.jpg)
Slant and tilt Slant
Tilt
![Page 60: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/60.jpg)
![Page 61: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/61.jpg)
CVPR 04
![Page 62: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/62.jpg)
Texture description Non-occluded textons, and approximated as flat.
![Page 63: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/63.jpg)
The two pieces of the solution If we knew the transformations
• We can find the textons • We can find the local
intensity contrast
By minimization of:
If we knew the texton and contrast
• Recover the transformation by transforming the texton to match each local patch.
Texton Local contrast
Local texture with inverse transform
![Page 64: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/64.jpg)
64
Expectation Maximization (EM): a solution to chicken-and-egg problems
![Page 65: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/65.jpg)
65
Model fitting example Fitting two lines to observed data
x
y
![Page 66: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/66.jpg)
66
Fitting two lines: on the one hand…
x
y
If we knew which points went with which lines, we’d be back at the single line-fitting problem, twice.
Line 1
Line 2
![Page 67: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/67.jpg)
67
Maximum likelihood estimation for the slope of a single line
Maximum likelihood estimate:
where
gives regression formula
Data likelihood for point n: x
y
![Page 68: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/68.jpg)
68
Fitting two lines, on the other hand…
x
y
We could figure out the probability that any point came from either line if we just knew the two equations for the two lines.
![Page 69: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/69.jpg)
69
MLE with hidden/latent variables: Expectation Maximisation
General problem:
data parameters hidden variables
For MLE, want to maximise the log likelihood
The sum over z inside the log gives a complicated expression for the ML solution.
![Page 70: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/70.jpg)
70
Maximizing the log likelihood of the data
ˆ θ = argmaxθ δ(zn =1)log p(yn | zn =1,θ)n
∑ + δ(zn = 2)log p(yn | zn = 2,θ)
if you knew the zn labels for each sample n:
![Page 71: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/71.jpg)
71
Maximizing the log likelihood of the data
ˆ θ = argmaxθ δ(zn =1)log p(yn | zn =1,θ)n
∑ + δ(zn = 2)log p(yn | zn = 2,θ)
if you knew the zn labels for each sample n:
In the EM algorithm, we replace those known labels with their expectation under the current algorithm parameters. So
E[δ(zn = i)] = p(zn = i | y,θold )
= α i(n)Call that quantity
∝ p(y | zn = i,θold ) ∝e−(yn −ai xn )2 / 2
![Page 72: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/72.jpg)
72
Maximizing gives
and maximising that gives
ˆ a i =α i(n)yn xnn∑α i(n)xn
2
n∑
And then for the estimate of the line parameters, we have
ˆ θ = argminθ α1(n)n
∑ (yn − a1xn )2 + α2(n)(yn − a2xn )2
![Page 73: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/73.jpg)
73
EM fitting to two lines
with
and
Regression becomes:
“E-step”
“M-step”
repeat
α i(n) ∝e−(yn −ai xn )2 / 2
α1(n) + α2(n) =1
ˆ a i =α i(n)yn xnn∑α i(n)xn
2
n∑
![Page 74: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/74.jpg)
74
Experiments: EM fitting to two lines
Iteration 1 2 3
Line weights
line 1
line 2
(from a tutorial by Yair Weiss, http://www.cs.huji.ac.il/~yweiss/tutorials.html)
![Page 75: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/75.jpg)
EM
Find interest points
EM iterations
![Page 76: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/76.jpg)
![Page 77: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/77.jpg)
Shading
• Based on 3 dimensional modeling of objects in light, shade and shadows.
• Perception of depth through shading alone is always subject to the concave/convex inversion. The pattern shown can be perceived as stairsteps receding towards the top and lighted from above, or as an overhanging structure lighted from below.
![Page 78: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/78.jpg)
Reflectance map
p = dZ / dx
q = dZ / dy R(p,q)
![Page 79: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/79.jpg)
Linear shape from shading
A close form solution can be obtained using the Fourier transform (Pentland 88)
Pentland 88
![Page 80: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/80.jpg)
Ground truth
Linear shape from shading
![Page 81: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/81.jpg)
Learning based methods • User recognition to learn structure of the world from labeled examples
…
Slides by Efros
![Page 82: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/82.jpg)
• Goal: learn labeling of image into 7 Geometric Classes: • Support (ground) • Vertical
– Planar: facing Left (), Center ( ), Right () – Non-planar: Solid (X), Porous or wiry (O)
• Sky
Label Geometric Classes
Slides by Efros
![Page 83: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/83.jpg)
What cues to use?
Vanishing points, lines
Color, texture, image location
Texture gradient Slides by Efros
![Page 84: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/84.jpg)
Dataset very general
Slides by Efros
![Page 85: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/85.jpg)
The General Case (outdoors)
• Typical outdoor photograph off the Web – Got 300 images using Google Image Search
keyboards: “outdoor”, “scenery”, “urban”, etc. • Certainly not random samples from world
– 100% horizontal horizon – 97% pixels belong to 3 classes -- ground, sky,
vertical (gravity) – Camera axis usually parallel to ground plane
• Still very general dataset!
Slides by Efros
![Page 86: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/86.jpg)
Let’s use many weak cues
• Material
• Image Location
• Perspective
Slides by Efros
![Page 87: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/87.jpg)
Need Spatial Support
50x50 Patch 50x50 Patch
Color Texture Perspective Color Texture Perspective
Slides by Efros
![Page 88: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/88.jpg)
Image Segmentation • Naïve Idea #1: segment the image
– Chicken & Egg problem
• Naïve Idea #2: multiple segmentations – Decide later which segments are good
…
Slides by Efros
![Page 89: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/89.jpg)
• We want to know: – Is this a good (coherent) segment?
– If so, what is the surface label?
• Learn these likelihoods from training images – we use Boosted Decision Trees
Estimating surfaces from segments
P(good segment | data)
P(label | good segment, data)
Slides by Efros
![Page 90: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/90.jpg)
…
Gray?
High in Image?
Many Long Lines?
Yes
No
No No
No
Yes Yes
Yes
Very High Vanishing
Point?
High in Image?
Smooth? Green?
Blue?
Yes
No
No No
No
Yes Yes
Yes
Boosted Decision Trees
Ground Vertical Sky
Slides by Efros
![Page 91: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/91.jpg)
Labeling Segments
…
…
For each segment:
- Get P(good segment | data) P(label | good segment, data)
Slides by Efros
![Page 92: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/92.jpg)
Image Labeling
…
Labeled Segmentations
Labeled Pixels Slides by Efros
![Page 93: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/93.jpg)
No Hard Decisions
Support Vertical Sky
V-Left V-Center V-Right V-Porous V-Solid
![Page 94: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/94.jpg)
Labeling Results
Input image Ground Truth Our Result Slides by Efros
![Page 95: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/95.jpg)
Labeling Results
Input image Ground Truth Our Result Slides by Efros
![Page 96: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/96.jpg)
Labeling Results
Input image Ground Truth Our Result Slides by Efros
![Page 97: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/97.jpg)
Labeling Results
Input image Ground Truth Our Result Slides by Efros
![Page 98: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/98.jpg)
Labeling Results
Input image Ground Truth Our Result Slides by Efros
![Page 99: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/99.jpg)
Labeling Results
Input image Ground Truth Our Result Slides by Efros
![Page 100: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/100.jpg)
Labeling Results
Input image Ground Truth Our Result Slides by Efros
![Page 101: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/101.jpg)
Some Failures
Input image Ground Truth Our Result Slides by Efros
![Page 102: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/102.jpg)
Catastrophic Failures
Input image Ground Truth Our Result Slides by Efros
![Page 103: Lecture 13 - Massachusetts Institute of Technology6.869.csail.mit.edu/sp11/lectures/lecture13.pdf · Atmospheric perspective • Based on the effect of air on the color and visual](https://reader034.fdocuments.in/reader034/viewer/2022042917/5f58cfda96df4e1f893aab53/html5/thumbnails/103.jpg)
Automatic Photo Popup Labeled Image Fit Ground-Vertical
Boundary with Line Segments
Form Segments into Polylines
Cut and Fold
Final Pop-up Model
[Hoiem Efros Hebert 2005]