| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Public Member Functions | List of all members
cv::reg::MapShift Class Reference
Image Registration

`#include <opencv2/reg/mapshift.hpp>`

Collaboration diagram for cv::reg::MapShift:

## Public Member Functions
| MapShift ()
| MapShift (InputArray shift)
| ~MapShift ()
void | compose (cv::Ptr< Map > map) CV_OVERRIDE
const cv::Vec< double, 2 > & | getShift () const
void | getShift (OutputArray shift) const
cv::Ptr< Map > | inverseMap () const CV_OVERRIDE
void | inverseWarp (InputArray img1, OutputArray img2) const CV_OVERRIDE
void | scale (double factor) CV_OVERRIDE
Public Member Functions inherited from cv::reg::Map
virtual | ~Map ()
virtual void | warp (InputArray img1, OutputArray img2) const

## Detailed Description

Defines an transformation that consists on a simple displacement

## Constructor & Destructor Documentation

## ◆ MapShift() [1/2]

cv::reg::MapShift::MapShift | ( |  | ) |

Python:
| cv.reg.MapShift( |  | ) -> | <reg_MapShift object>
| cv.reg.MapShift( | shift | ) -> | <reg_MapShift object>

Default constructor builds an identity map

## ◆ MapShift() [2/2]

cv::reg::MapShift::MapShift | ( | InputArray | shift | ) |

Python:
| cv.reg.MapShift( |  | ) -> | <reg_MapShift object>
| cv.reg.MapShift( | shift | ) -> | <reg_MapShift object>

Constructor providing explicit values

Parameters

  [in] | shift | Displacement

## ◆ ~MapShift()

cv::reg::MapShift::~MapShift | ( |  | ) |

Destructor

## Member Function Documentation

## ◆ compose()

void cv::reg::MapShift::compose | ( | cv::Ptr< Map > | map | ) |
| virtual

Python:
| cv.reg.MapShift.compose( | map | ) -> | None

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.

Parameters

  [in] | map | Transformation to compose with.

Implements cv::reg::Map.

## ◆ getShift() [1/2]

const cv::Vec< double, 2 > & cv::reg::MapShift::getShift | ( |  | ) | const
| inline

Python:
| cv.reg.MapShift.getShift( | [, shift] | ) -> | shift

Return displacement

Returns
  Displacement

## ◆ getShift() [2/2]

void cv::reg::MapShift::getShift | ( | OutputArray | shift | ) | const
| inline

Python:
| cv.reg.MapShift.getShift( | [, shift] | ) -> | shift

Here is the call graph for this function:

## ◆ inverseMap()

cv::Ptr< Map > cv::reg::MapShift::inverseMap | ( |  | ) | const
| virtual

Python:
| cv.reg.MapShift.inverseMap( |  | ) -> | retval

Calculates the inverse map

Returns
  Inverse map

Implements cv::reg::Map.

## ◆ inverseWarp()

void cv::reg::MapShift::inverseWarp | ( | InputArray | img1,
|  | OutputArray | img2 ) const
| virtual

Python:
| cv.reg.MapShift.inverseWarp( | img1[, img2] | ) -> | img2

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.

Parameters

  [in] | img1 | Original image
  [out] | img2 | Warped image

Implements cv::reg::Map.

## ◆ scale()

void cv::reg::MapShift::scale | ( | double | factor | ) |
| virtual

Python:
| cv.reg.MapShift.scale( | factor | ) -> | None

Scales the map by a given factor as if the coordinates system is expanded/compressed by that factor.

Parameters

  [in] | factor | Expansion if bigger than one, compression if smaller than one

Implements cv::reg::Map.

The documentation for this class was generated from the following file:

- opencv2/reg/mapshift.hpp