Perspective mapping using vanishing points

prsM

New member
Joined
Jul 3, 2016
Messages
1
This question has been bothering me for some time, help would be appreciated! Suppose we have an image of a building facade with vanishing points at Vx = (x,0) and Vy = (0,y) which are horizontal and vertical respectively. We know two points P = (0,0) and Q = (1,1). We want to find a transform that maps this facade onto a rectangle that keeps P and Q fixed.
Since this is a homogenous coordinate system I set P = (0,0,1) and Q = (1,1,1), Vx = (x,0,0) and Vy = (0,y,0). Then I tried to find a transform that maps this onto the following: (0,0,1), (1,1,1,), (1,0,1), (0,1,1). However when I tried this I was wrong according to the answer which was:

Code:
[y-x+xy   0        0
 0       y-x+xy     0 
 y         -x      xy]


I feel like I'm approaching this question wrongly so any bit of advice that can help me understand how to tackle this question would be much appreciated!
 
Top