public static RefineEpipolar homographyRefine ( double tol , int maxIterations , EpipolarError type ) { ModelObservationResidualN residuals ; switch ( type ) { case SIMPLE : residuals = new HomographyResidualTransfer ( ) ; break ; case SAMPSON : residuals = new HomographyResidualSampson ( ) ; break ; default : throw new IllegalArgumentException ( "Type not supported: " + type ) ; } return new LeastSquaresHomography ( tol , maxIterations , residuals ) ; }
Creates a non - linear optimizer for refining estimates of homography matrices .