libNumerics/computeH.cpp
// Return LSE motion and the sum of weights
Return LSE motion and the sum of weights
Return LSE motion and the sum of weights
float ComputeH::compute(Homography& map) const
{
    vector<double> B(n);
    B.read(Bn);
    if(_type == Rotation) {
        if(! compute_rotation(B))
            return 0;
    } else {
        matrix<double> A(n,n);
        A.read(Ann);
        Normalization left, right;
        if(_type == Projective && !normalize(left, A, B, right))
            return 0;
        A.symUpper();
        vector<double> oldB(B);
        if(! solveLU(A, B))
            return 0;
        if(_type == Projective && ! de_normalize(left, B, right))
            return 0;
    }
    wrap(map, B);
    return weight();
}
float ComputeH :: compute ( Homography & map ) const { vector < double > B ( n ) ; B . read ( Bn ) ; if ( _type == Rotation ) { if ( ! compute_rotation ( B ) ) return 0 ; } else { matrix < double > A ( n , n ) ; A . read ( Ann ) ; Normalization left , right ; if ( _type == Projective && ! normalize ( left , A , B , right ) ) return 0 ; A . symUpper ( ) ; vector < double > oldB ( B ) ; if ( ! solveLU ( A , B ) ) return 0 ; if ( _type == Projective && ! de_normalize ( left , B , right ) ) return 0 ; } wrap ( map , B ) ; return weight ( ) ; }
Return LSE motion and the sum of weights
Return LSE motion and the sum of weights