We consider the pinhole camera model, with P1 = (x1, y1, z1) the center of the camera and f=(fx, fy, fz) the optical axis.
A point P=(x,y,z) in the space is imaged into a point
Q=(u,v) on the image plane. Denoting DP the
vector joining the center of the camera and the point P,
and DPf = DP uf its projection
on the optical axis,
we have
where uf is the unit vector along the optical axis. Q is computed in the 3D space, but it actually lies in the image plane. In particular, with two cameras the epipole of one (P2) in the image plane of the other (P1) is Q(P2) = [ D - Df f/f] / Df, where D is the vector from the first camera to the second one..
By taking the scalar product of Q(P) with f one can verify that Qf=0. Next from the scalar product with DP we have DPQ = Q2 DPf. Therefore
and |DP| = |DPf| sqrt(1 + Q2).
We now consider a specific example. Let the camera be at
(0,0,z), with f=f (cos(t),0,-sin(t)). Also take the frame
in the image plane, u=(sin(t),0,cos(t)) and v=(0,-1,0), so that
uxv=f/f. Then the unit vector along Q,
uQ can be written
as cos(p)u+sin(p)v.
A point P=(x,y,0) on the plane z=0 will give
DPf=z / [ sin(t) - cos(p)cos(t) Q ] ,
DPx = [ cos(p)sin(t) Q + cos(t) ] DPf ,
and
DPy = - sin(t) Q DPf .
These are the equation of the mapping (U,V)->(x,y),
x | = | z [ sin(t) U + cos(t) ] / [ sin(t) - cos(t) U ] |
y | = | - z V / [ sin(t) - cos(t) U ] |
The inverse mapping is
U | = | [ sin(t) x - cos(t) z ] / [ x + tg(t) z ] |
V | = | -y / [ x + tg(t) z ] |
Finally if we have two cameras we can consider the composition of the mappings
where the map from (x,y) to (x',y') is in general a rototranslation whose parameters depends on the relative position of the two cameras and their orientation. Without writing explicitly these transformation in terms of the camera parameters, we can nevertheless find the general form of the transformation (U,V)-&gr;(U',V'),
therefore the general form of the homography mapping, i.e, the
mapping of the images of the points in a plane in 3D between the
two image planes is
Marco Corvi - Page hosted by
geocities.com.
V' = [ d U + e V + f ]
/ [ a U + b V + c + tg(t') z' {tg(t) - U} ]
V ' = [ D U + E V + F ] / [ G U + H V + 1 ]