Affine2DEstimator.h 1018 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. class Affine2DEstimator
  3. {
  4. public:
  5. Affine2DEstimator();
  6. int runKernel( const CvMat* m1, const CvMat* m2, CvMat* model );
  7. int runRANSAC( const CvMat* m1, const CvMat* m2, CvMat* model,
  8. CvMat* mask, double threshold,
  9. double confidence=0.99, int maxIters=2000 );
  10. bool getSubset( const CvMat* m1, const CvMat* m2,
  11. CvMat* ms1, CvMat* ms2, int maxAttempts=1000 );
  12. bool checkSubset( const CvMat* ms1, int count );
  13. int findInliers( const CvMat* m1, const CvMat* m2,
  14. const CvMat* model, CvMat* error,
  15. CvMat* mask, double threshold );
  16. void computeReprojError( const CvMat* m1, const CvMat* m2, const CvMat* model, CvMat* error );
  17. double getDistortion( const CvMat* m1);
  18. double getMinHeight( const CvMat* m1, const CvMat* m2);
  19. protected:
  20. CvRNG rng;
  21. int modelPoints;
  22. CvSize modelSize;
  23. int maxBasicSolutions;
  24. bool checkPartialSubsets;
  25. };
  26. int estimateAffine2D(cv::InputArray _from, cv::InputArray _to,
  27. cv::OutputArray _out, cv::OutputArray _inliers,
  28. double param1=3, double param2=0.99);