123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- /*M
- #ifndef MAPSHIFT_H_
- #define MAPSHIFT_H_
- #include "map.hpp"
- namespace cv {
- namespace reg {
- /*!
- * Defines an transformation that consists on a simple displacement
- */
- class CV_EXPORTS MapShift : public Map
- {
- public:
- /*!
- * Default constructor builds an identity map
- */
- MapShift(void);
- /*!
- * Constructor providing explicit values
- * \param[in] shift Displacement
- */
- MapShift(const cv::Vec<double, 2>& shift);
- /*!
- * Destructor
- */
- ~MapShift(void);
- void inverseWarp(const cv::Mat& img1, cv::Mat& img2) const;
- cv::Ptr<Map> inverseMap(void) const;
- void compose(const Map& map);
- void scale(double factor);
- /*!
- * Return displacement
- * \return Displacement
- */
- const cv::Vec<double, 2>& getShift() const {
- return shift_;
- }
- private:
- cv::Vec<double, 2> shift_; /*< Displacement */
- };
- }}
- #endif
|