Class ProjectiveStructureFromHomographies


  • public class ProjectiveStructureFromHomographies
    extends java.lang.Object

    Given a set of homographies mapping pixels in view i to view 0 this will estimate the projective camera matrix of each view. x' = P*X, where P is the camera matrix that is to be estimated, x' is pixel, and X is 3D feature location in view 0's reference frame. Output is 3D structure and camera matrices.

    A camera matrix is a 3x4 projective matrix with the following structure [M,t]. If a homography defines the transform between pixels in one view to another view then M is equal to that homography. The camera matrix is now defined up to the unknown t. To solve for t the points in this projective frame also need to be derived. This is done by solving a linear system:

         [ p.x*m'[2] - m'[0] , -1 , 0  , p.x ]
         [ p.y*m'[2] - m'[1] ,  0 , -1 , p.y ] * [X ; t ]
     
    where m'[i] is row 'i' in M transposed. (p.x,p.y) is pixel observation, X and t are the unknowns. Each observation x = P*X generates 2 equations. See [1] for derivation. Vector product of both sides is involved.

    Normalization is automatically applied to inputs and undo for output. Normalization matrix is computed using LowLevelMultiViewOps.computeNormalizationLL(List, NormalizationPoint2D)

    [1] 18.5.1 Page 448 in R. Hartley, and A. Zisserman, "Multiple View Geometry in Computer Vision", 2nd Ed, Cambridge 2003