12/15/2006 15-862 Fall 2006
Two-Point Perspective Single View Geometry
15-862 Final ProjectFaustinus Kevin Gozali ([email protected])
an extended tour into the picture…
12/15/2006 15-862 Fall 2006 2
Two-point Perspective World Camera/eye at (0,0,h)
h = dist(horizon, bottom of image) Camera vanishes at the center of horizon (veye) Image plane parallel to x and z axis
Center at (0,f,h) Two vanishing points (vpl, vpr)
Xvprvpl
veye
Image Plane
x
z
y
yy Bottomhorizonh
12/15/2006 15-862 Fall 2006 3
Our Assumptions Horizontal Horizon line
This holds for two-point perspective 1 VP to the left, 1 to the right
Baselines below horizon Uniform heights for all walls
Xvprvpl
veye
Image Plane
x
z
ybase line
12/15/2006 15-862 Fall 2006 4
Vanishing Point Calculation User specifies parallel lines Compute intersection point with Least Square Method = VP
Method described by Bob Collins http://www.cs.cmu.edu/~ph/869/www/notes/vanishing.txt
Simply doing MLdivide doesn’t work Done separately for VPleft and VPright
Xvprvpl
veye
Image Plane
x
z
y
12/15/2006 15-862 Fall 2006 5
The Horizon Line Calculated based on 2 VPs Assumption: horizontal horizon in image plane Or, user can specify directly
2.. yryl
y
VPVPhorizon
12/15/2006 15-862 Fall 2006 6
Selecting Base Lines User specifies base-lines
For each desired vertical wall Assumption: must be below horizon
12/15/2006 15-862 Fall 2006 7
Computing Depth (y-axis) Similar to 1-point perspective Based on height ratios
Camera height as reference Recall: image plane at y = f
veye
Image Plane
y
zSide View
dyh
base point depth (3Dy)f
Camera (0,0,h) horizon line fdyhDy 3
12/15/2006 15-862 Fall 2006 8
Computing Location in x-axis Using calculated depths (y) Compute horizontal distance from veye in image plane
Recall: left side is x-, right side is x+ Horizontal distance amplified using depth ratio to
camera height Farther points are amplified more
fD
vDD yxeyexx
3)2(3 .X
veye
Image Plane
dx2
dx1
2Dx1
2Dx2
12/15/2006 15-862 Fall 2006 9
Specifying Height After 3D location is computed Compute Height Scales
Ratio for each base point to camera height Extend walls vertically upward
Height of the base-point closest to the camera as reference User picks the desired height, then compute 3Dheight
12/15/2006 15-862 Fall 2006 10
Ground Surface Ground surface is a prefect rectangle at z = 0 Create Ground mask
Up to the farthest base-point Warp texture (using Homography)
Point correspondences have to consider 3D depth! Create 3D surface
12/15/2006 15-862 Fall 2006 11
Vertical Walls Similar to ground processing
All walls are perfect rectangle No mask is needed Warp texture using Homography
Consider distance of each base point as width Uniform height
Create 3D model Intersects the ground plane correctly
12/15/2006 15-862 Fall 2006 12
3D Model Generation Define the surfaces
Based on (3Dx, 3Dy, 3Dheight) Wrap textures Observe model
12/15/2006 15-862 Fall 2006 13
Fun with Texture Sources Texture Interpolation
approximately evening view Blending
Half morning half night Use this for 3D model
))(1()( NightViewwMorningVietexture
12/15/2006 15-862 Fall 2006 14
Texture Examples
12/15/2006 15-862 Fall 2006 15
Gallery
12/15/2006 15-862 Fall 2006 16
Gallery
12/15/2006 15-862 Fall 2006 17
Gallery
12/15/2006 15-862 Fall 2006 18
Gallery
12/15/2006 15-862 Fall 2006 19
References[1] Chu, Siu-Hang, Animating Chinese Landscape Paintings and Panoramas. A Thesis
Submitted to the Hong Kong University of Science and Technology, August 2001.
[2] Hoeim, Derek; Efros, A. Alexei; Herbert, Martial. Automatic Photo Pop-up. Robotics Institute, Carnegie Melon University, Pittsburgh PA, USA. http://www.cs.cmu.edu/~dhoiem/projects/popup
[3] Single View Reconstruction Lecture slides. http://graphics.cs.cmu.edu/courses/15-463/2006_fall/www/Lectures/SingleViewReconstruction.pdf
[4] Perspective Drawing. An online tutorial. http://www.lems.brown.edu/vision/people/leymarie/SkiP/May98/Boehm1.html
[5] Horry, Yoichi; Anjyo, Ken-ichi; Arai, Kiyoshi. Tour Into the Picture: Using a Spidery Mesh Interface to Make Animation from a Single Image. Hitachi, Ltd.
[6] Collins, Bob. A guide to compute vanishing points. http://www.cs.cmu.edu/~ph/869/www/notes/vanishing.txt
12/15/2006 15-862 Fall 2006 20
Q&A
Questions?