public boolean computeInverseH ( List < Homography2D_F64 > homography0toI ) { listHInv . reset ( ) ; int N = homography0toI . size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { Homography2D_F64 H = homography0toI . get ( i ) ; Homography2D_F64 Hinv = listHInv . grow ( ) ; // Ensure the determinant is one double d = CommonOps_DDF3 . det ( H ) ; if ( d < 0 ) CommonOps_DDF3 . divide ( H , - Math . pow ( - d , 1.0 / 3 ) , Hinv ) ; else CommonOps_DDF3 . divide ( H , Math . pow ( d , 1.0 / 3 ) , Hinv ) ; // Now invert the matrix if ( ! CommonOps_DDF3 . invert ( Hinv , Hinv ) ) { return false ; } } return true ; }
Ensures the determinant is one then inverts the homogrpahy