Class ProjectiveStructureByFactorization


  • public class ProjectiveStructureByFactorization
    extends java.lang.Object
    Performs projective reconstruction via factorization. For every view all points are observed. The algorithm works by iteratively estimating the depth of each point in every view and this results in better and better estimates of the projective camera matrices and the points being found. An initial estimate of feature depth can be provided. Unfortunately, there is no grantee of this method converging to a valid solution.
     [ λ[1,1]*x[1,1] , λ[1,2]*x[1,2] , ... , λ[1,M]*x[1,M] ]  = [ P[1] ] * [X[1], X[2], ... , X[N]
     [ λ[2,1]*x[1,1] , λ[2,2]*x[1,2] , ... , λ[2,M]*x[2,M] ]  = [ P[2] ]
     [                                 ...                 ]  = [ ...  ]
     [ λ[N,1]*x[1,1] , λ[N,2]*x[1,2] , ... , λ[N,M]*x[N,M] ]  = [ P[M] ]
     
    where λ is the depth, x is homogenous pixel coordinate, P is 3x4 projective, X is 3D feature location in world coordinate system. Procedure:
    1. Call initialize(int, int) and specify the system's size
    2. Set initial pixel depths
    3. Set pixel observations for each view
    4. Call process()
    5. Get results with getFeature3D(int, georegression.struct.point.Point4D_F64) and getCameraMatrix(int, org.ejml.data.DMatrixRMaj)

    Internally depth and pixel values are scaled so that they are close to unity then undo for output. This ensures better approximation of errors and has other desirable numerical properties.

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