public static void ensureDeterminantOfOne ( List < Homography2D_F64 > homography0toI ) { int N = homography0toI . size ( ) ; for ( int i = 0 ; i < N ; i ++ ) { Homography2D_F64 H = homography0toI . get ( i ) ; double d = CommonOps_DDF3 . det ( H ) ; // System.out.println("Before = "+d); if ( d < 0 ) CommonOps_DDF3 . divide ( H , - Math . pow ( - d , 1.0 / 3 ) ) ; else CommonOps_DDF3 . divide ( H , Math . pow ( d , 1.0 / 3 ) ) ; // System.out.println("determinant = "+ CommonOps_DDF3.det(H)); } }
Scales all homographies so that their determinants are equal to one