Image Based Modeling and Rendering
Assignment # 3
Kiran Bhat, Robotics Institute

Single View Metrology

I constructed a 3-D model of the following building image that I downloaded from the net. I got this image while searching for renaissance architecture: http://hces.hunter.cuny.edu/h/links/renaissance.html
This image had well defined lines in X, Y and Z directions, and lines on the ground that I exploited for finding the homography.

The following picture a view of the 3D reconstructed model of this building

Some of the texture maps used in creating the model are given below:

The floor

The left wall

User Interface
I used MFC's (using VC++ in Windows) to create an user interface. The user can draw lines with the mouse, and this feature is used for computing vanishing points and homography. A snapshot of the UI is given below:

Approach used:
1) User specifies a set of parallel lines in X,Y and Z directions.
2) Calculate vanishing points along the 3 directions using Bob Collin's algorithm
3) Specify 4 points on the reference plane and compute the homography (xy to uv) and its inverse (uv to xy)
4) Select the endpoints of the reference plane (in uv coords) and compute the xy coordinates. Also perform a texture   mapping to get the texture for the reference image (using 4 point correspondence)
5) Select sets of vertical lines (along the reference direction) and compute the z values for all points. (pts on reference frame have z = 0)
6) Select image regions (left wall, right wall, etc), compute the (x,y,z) of the endpoints of the regions, and compute the texture map for each region.
7) Use VRML to view the 3D model from the various texture maps and point coordinates.

The VRML file sample.wrl is available in the course handin directory.

If there was more time....
-Texture mapping of planes parallel to the reference palne
-Try this method on photographs
-Try integrating information from multiple photographs to get a better (complete) 3D representation of the scene