CVB++ 14.0
PerspectiveTransformation Class Reference

Perspective transformation coefficients. More...

#include <cvb/foundation/transform_2d.hpp>

Public Member Functions

 PerspectiveTransformation (Point2D< double > leftTop, Point2D< double > rightTop, Point2D< double > rightBottom, Point2D< double > leftBottom, Rect< int > destRect)
 Calculate the defining coefficients for the perspective transformation. More...
 
 PerspectiveTransformation (Point2D< double > leftTop, Point2D< double > rightTop, Point2D< double > rightBottom, Point2D< double > leftBottom, Rect< double > destRect)
 Calculate the defining coefficients for the perspective transformation. More...
 
double C00 () const noexcept
 Get defining coefficient for the transformation. More...
 
double C01 () const noexcept
 Get defining coefficient for the transformation. More...
 
double C02 () const noexcept
 Get defining coefficient for the transformation. More...
 
double C10 () const noexcept
 Get defining coefficient for the transformation. More...
 
double C11 () const noexcept
 Get defining coefficient for the transformation. More...
 
double C12 () const noexcept
 Get defining coefficient for the transformation. More...
 
double C20 () const noexcept
 Get defining coefficient for the transformation. More...
 
double C21 () const noexcept
 Get defining coefficient for the transformation. More...
 
double C22 () const noexcept
 Get defining coefficient for the transformation. More...
 

Detailed Description

Perspective transformation coefficients.

Performed calculation is:

  • X = (C00*X' + C01*Y' + C02) / (C20*X' + C21*Y' + C22)
  • Y = (C10*X' + C11*Y' + C12) / (C20*X' + C21*Y' + C22)

Constructor & Destructor Documentation

◆ PerspectiveTransformation() [1/2]

PerspectiveTransformation ( Point2D< double >  leftTop,
Point2D< double >  rightTop,
Point2D< double >  rightBottom,
Point2D< double >  leftBottom,
Rect< int >  destRect 
)
inline

Calculate the defining coefficients for the perspective transformation.

Parameters
[in]leftTopLeft top corner's coordinate in the source image.
[in]rightTopRight top corner's coordinate in the source image.
[in]rightBottomRight bottom corner's coordinate in the source image.
[in]leftBottomLeft bottom corner's coordinate in the source image.
[in]destRectRectangle containing the locations the input points are to be transformed to.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ PerspectiveTransformation() [2/2]

PerspectiveTransformation ( Point2D< double >  leftTop,
Point2D< double >  rightTop,
Point2D< double >  rightBottom,
Point2D< double >  leftBottom,
Rect< double >  destRect 
)
inline

Calculate the defining coefficients for the perspective transformation.

Parameters
[in]leftTopLeft top corner's coordinate in the source image.
[in]rightTopRight top corner's coordinate in the source image.
[in]rightBottomRight bottom corner's coordinate in the source image.
[in]leftBottomLeft bottom corner's coordinate in the source image.
[in]destRectRectangle containing the positions into which the input points are to be converted.
Exceptions
Anyexception derived from std::exception including CvbException.

Member Function Documentation

◆ C00()

double C00 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.

◆ C01()

double C01 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.

◆ C02()

double C02 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.

◆ C10()

double C10 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.

◆ C11()

double C11 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.

◆ C12()

double C12 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.

◆ C20()

double C20 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.

◆ C21()

double C21 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.

◆ C22()

double C22 ( ) const
inlinenoexcept

Get defining coefficient for the transformation.

Returns
double The element.
Exceptions
Doesnot throw any exception.