123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- #ifndef MAPPER_H_
- #define MAPPER_H_
- #include <opencv2/core.hpp> // Basic OpenCV structures (cv::Mat, Scalar)
- #include "map.hpp"
- namespace cv {
- namespace reg {
- class CV_EXPORTS Mapper
- {
- public:
- virtual ~Mapper(void) {}
-
- virtual void calculate(const cv::Mat& img1, const cv::Mat& img2, cv::Ptr<Map>& res) const = 0;
-
- virtual cv::Ptr<Map> getMap(void) const = 0;
- protected:
-
- void gradient(const cv::Mat& img1, const cv::Mat& img2,
- cv::Mat& Ix, cv::Mat& Iy, cv::Mat& It) const;
-
- void grid(const Mat& img, Mat& grid_r, Mat& grid_c) const;
-
- cv::Mat sqr(const cv::Mat& mat1) const
- {
- cv::Mat res;
- res.create(mat1.size(), mat1.type());
- res = mat1.mul(mat1);
- return res;
- }
- };
- }}
- #endif
|