OpenCV
3.1.0-dev
Open Source Computer Vision
|
Base class for modelling a Map between two images. More...
#include "map.hpp"
Public Member Functions | |
virtual | ~Map (void) |
virtual void | compose (const Map &map)=0 |
virtual cv::Ptr< Map > | inverseMap (void) const =0 |
virtual void | inverseWarp (const cv::Mat &img1, cv::Mat &img2) const =0 |
virtual void | scale (double factor)=0 |
virtual void | warp (const cv::Mat &img1, cv::Mat &img2) const |
Base class for modelling a Map between two images.
The class is only used to define the common interface for any possible map.
|
virtual |
Virtual destructor
|
pure virtual |
Changes the map composing the current transformation with the one provided in the call. The order is first the current transformation, then the input argument.
[in] | map | Transformation to compose with. |
Implemented in cv::reg::MapAffine, cv::reg::MapProjec, and cv::reg::MapShift.
Calculates the inverse map
Implemented in cv::reg::MapAffine, cv::reg::MapProjec, and cv::reg::MapShift.
Warps image to a new coordinate frame. The calculation is img2(x)=img1(T(x)), so in fact this is the inverse warping as we are taking the value of img1 with the forward transformation of the points.
[in] | img1 | Original image |
[out] | img2 | Warped image |
Implemented in cv::reg::MapAffine, cv::reg::MapProjec, and cv::reg::MapShift.
|
pure virtual |
Scales the map by a given factor as if the coordinates system is expanded/compressed by that factor.
[in] | factor | Expansion if bigger than one, compression if smaller than one |
Implemented in cv::reg::MapAffine, cv::reg::MapProjec, and cv::reg::MapShift.
Warps image to a new coordinate frame. The calculation is img2(x)=img1(T^{-1}(x)), as we have to apply the inverse transformation to the points to move them to were the values of img2 are.
[in] | img1 | Original image |
[out] | img2 | Warped image |