# Programming Assignment 3:Single View Modeling

Liu Ren
CSD Ph.D. Student
Wean Hall 8205
268-3778

## Source Images:

1. Preuzii's work: "Sala delle prospettive". This part is about colonanade with a view of Rome.
The image was taken  from an old book  -"The Farnesina Frescoes at Rome".,by Paolo D'Ancona,1955.(HUNT LIBRARY)

2.The box and the book .The image was shot at Wean Hall 4216.

## Still Images of  New Views:

Each recovered  model contains 14 faces,including faces of  the  book, the box,and colonanades.

## Some Textures :

The second texture is a transparent image.The last one is retouched using Photoshop5.0.

## Description of approach and comments:

1.I use Robert Collins' method to caculate vanishing points.Considering numerical conditioning ,
the coordinate of the image  is translated by (-imageX/2, -imageY/2).After comparing the result,
I found  the 3-D model   was  much more precisely recovered by using the method.

2.I use two points from the image to get the planar perspective map.
One point determines  " l". The other point determines  " a" and " b".
More points will get much  more precise value by a least squares fit.

3.However, in order to use the algebraic methods the paper presented, some transformations should
be made , for the "l" I got is different from the standard format in criminisi's paper .It means that
the world origin is translated in the reference plane. So the H I got should be [a1Vx   b1Vy   l1],while
Criminisi's H is [aVx   bVy   l]. "l" can be caculated but " a"  and  "b " is unknown. To compute the Hz,
we need to know   "a" and "b" although "l" and "Alpha"  are known now.I got " a"  and  "b "  by the
following way: [aVx   bVy  l] = s[a1Vx  b1Vy l1]Txy. "s " is a scale. Txy is the matrix of transformation.
Txy can be caculated by [a1Vx   b1Vy  l1] and "l" .

4.To make the program more powerful, I provided several kinds of  constraints the  user can specify
during modeling process. Combined with those constraints,  we can caculate the position of a point
when we can't find its corresponding point in the reference plan,like the  positoin of the book  in the
second recovered model.Besides, by providing this function,the program can deal with some paintings
in which the projective relationships are not very well maintained by the painter.

5.I use Visual C++ 6.0 and Open GL to do the coding. (roughly  4,000 lines )

## Extensions:

1.Merging models from multiple  images according to the constraints the users specifies.

2.Using texture synthesis for texture retouching.