Programming Assignment #3: Single View Modeling
Terence Sim

Oct 21, 1999

• Description
• GUI
• Texture maps
• Output
• VRML model
• Description

This goal of this assignment is to create a 3D model from a single image, using the method of Criminisi et. al.  (ref). The original image I used is a photograph of the University Center at CMU.  I took a picture using a 35mm camera, developed the photo, and scanned it in at 300dpi at a scale of 800x1115 pixels (click on image below for full-size picture):

Matlab GUI

I created a simple GUI to zoom in, capture and print the locations of the points I would mark.  This allowed me to compute the various vanishing points: Vx, Vy, and Vz, as well as the homography H, and the scale factor alpha (from one known height). Computation of the vanishing points was done using Bob Collins' algorithm.  The reference height was physically measured to be 127 cm, and the 4 reference points form roughly a square of length 167 cm.  The GUI, and the points I marked, are shown here:

Computing texture maps

Next, I generated the texture maps for 7 planar surfaces: the left and right walls, the floor, the center entrance, the panels on both sides of this entrance, and a top panel.  I did not model the ceiling as it is curved.  The texture maps are shown below.  I used Adobe photoshop to touch up some of these maps.  For instance, the date stamp from my camera was removed by painting over with neighboring pixels.  Also, the black box at the bottom of the right wall was removed.  Furthermore, I cropped out the people and objects visible through the center entrance, and made that region transparent.  Since the ceiling is curved, I painted over parts of it which appeared in the left and right panels and made them transparent.  These edited texture maps are as follows:

Output

With all these in place, I computed the 3D world-coordinates for the 7 surfaces and generated a VRML model of the scene.  I even included a little surprise: a logo of  the Robotics Institute where I am a student.  Here are some views:

I encountered the most difficulty with the VRML browser: several I tried didn't work.  Finally I settled on GLview, but this did not render the texture maps whenever I changed the VRML file.  I had to quit and rerun the browser.  Due to the inaccuracy of locating points in the original image, I computed slightly different heights for the walls.  I manually enforced consistency, so that the end points of each wall have the same height.  Also, there was some minor errors in the coordinates of the top curved panel.  I manually corrected the coordinates for better alignment.

If I had more time, I would:

1. Model an Italian renaissance art painting, such as the Last Supper by Leonardo da Vinci.
2. Improve my GUI so that more of the computation can be automated.
3. Improve the texture maps: although I removed the box at the bottom of the right wall, I did not remove its shadow on the floor.
4. Model the curved ceiling, the lamps on the wall, and the people visible through the entrance.
5. Include the location of the camera.
6. Compute more length/breadth measurements, say, of the lamps on the walls.

VRML model

uc.wrl (may cause WorldView to crash, use Cosmoplayer instead)
uc2.wrl (smaller gif files, so WorldView should not crash)