00001
00024 #ifndef __D_H_SOLVER__
00025 #define __D_H_SOLVER__
00026
00027 #include <opencv/cv.h>
00028 #include <vector>
00029 #include "FSolver.h"
00030
00031 namespace DVision {
00032
00034 class HSolver: protected FSolver
00035 {
00036 public:
00037
00041 HSolver();
00042
00048 HSolver(int cols, int rows);
00049
00053 virtual ~HSolver(){}
00054
00061 virtual void setImageSize(int cols, int rows);
00062
00078 cv::Mat findHomography(const cv::Mat &P1, const cv::Mat &P2,
00079 double reprojection_error, int min_points = 5,
00080 std::vector<uchar>* status = NULL,
00081 bool computeH = true, double probability = 0.99, int max_its = 500) const;
00082
00094 bool checkHomography(const cv::Mat &P1, const cv::Mat &P2,
00095 double reprojection_error, int min_points = 5,
00096 double probability = 0.99, int max_its = 500) const;
00097
00098 protected:
00099
00107 cv::Mat _computeH(const cv::Mat &Qc1, const cv::Mat &Qc2,
00108 const std::vector<unsigned int> &i_cols) const;
00109
00110 };
00111
00112 }
00113
00114 #endif