OpenCV  4.5.1
Open Source Computer Vision
Public Member Functions | List of all members
cv::reg::MapAffine Class Reference

#include <opencv2/reg/mapaffine.hpp>

Inheritance diagram for cv::reg::MapAffine:
cv::reg::Map

Public Member Functions

 MapAffine ()
 
 MapAffine (InputArray linTr, InputArray shift)
 
 ~MapAffine ()
 
void compose (cv::Ptr< Map > map) CV_OVERRIDE
 
const cv::Matx< double, 2, 2 > & getLinTr () const
 
void getLinTr (OutputArray linTr) const
 
const cv::Vec< double, 2 > & getShift () const
 
void getShift (OutputArray shift) const
 
cv::Ptr< MapinverseMap () 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 affine transformation

Constructor & Destructor Documentation

◆ MapAffine() [1/2]

cv::reg::MapAffine::MapAffine ( )
Python:
<reg_MapAffine object>=cv.reg_MapAffine()
<reg_MapAffine object>=cv.reg_MapAffine(linTr, shift)

Default constructor builds an identity map

◆ MapAffine() [2/2]

cv::reg::MapAffine::MapAffine ( InputArray  linTr,
InputArray  shift 
)
Python:
<reg_MapAffine object>=cv.reg_MapAffine()
<reg_MapAffine object>=cv.reg_MapAffine(linTr, shift)

Constructor providing explicit values

Parameters
[in]linTrLinear part of the affine transformation
[in]shiftDisplacement part of the affine transformation

◆ ~MapAffine()

cv::reg::MapAffine::~MapAffine ( )

Destructor

Member Function Documentation

◆ compose()

void cv::reg::MapAffine::compose ( cv::Ptr< Map map)
virtual
Python:
None=cv.reg_MapAffine.compose(map)

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]mapTransformation to compose with.

Implements cv::reg::Map.

◆ getLinTr() [1/2]

const cv::Matx<double, 2, 2>& cv::reg::MapAffine::getLinTr ( ) const
inline
Python:
linTr=cv.reg_MapAffine.getLinTr([, linTr])

Return linear part of the affine transformation

Returns
Linear part of the affine transformation

◆ getLinTr() [2/2]

void cv::reg::MapAffine::getLinTr ( OutputArray  linTr) const
inline
Python:
linTr=cv.reg_MapAffine.getLinTr([, linTr])

◆ getShift() [1/2]

const cv::Vec<double, 2>& cv::reg::MapAffine::getShift ( ) const
inline
Python:
shift=cv.reg_MapAffine.getShift([, shift])

Return displacement part of the affine transformation

Returns
Displacement part of the affine transformation

◆ getShift() [2/2]

void cv::reg::MapAffine::getShift ( OutputArray  shift) const
inline
Python:
shift=cv.reg_MapAffine.getShift([, shift])

◆ inverseMap()

cv::Ptr<Map> cv::reg::MapAffine::inverseMap ( ) const
virtual
Python:
retval=cv.reg_MapAffine.inverseMap()

Calculates the inverse map

Returns
Inverse map

Implements cv::reg::Map.

◆ inverseWarp()

void cv::reg::MapAffine::inverseWarp ( InputArray  img1,
OutputArray  img2 
) const
virtual
Python:
img2=cv.reg_MapAffine.inverseWarp(img1[, 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]img1Original image
[out]img2Warped image

Implements cv::reg::Map.

◆ scale()

void cv::reg::MapAffine::scale ( double  factor)
virtual
Python:
None=cv.reg_MapAffine.scale(factor)

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

Parameters
[in]factorExpansion if bigger than one, compression if smaller than one

Implements cv::reg::Map.


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