homog2d library
Public Member Functions | Friends | List of all members
h2d::Hmatrix_< M, FPT > Class Template Reference

A 2D homography, defining a planar transformation. More...

#include <homog2d.hpp>

Inheritance diagram for h2d::Hmatrix_< M, FPT >:
Inheritance graph
[legend]
Collaboration diagram for h2d::Hmatrix_< M, FPT >:
Collaboration graph
[legend]

Public Member Functions

template<typename T >
void applyTo (T &) const
 Apply homography to a vector/array/list (type T) of points or lines. More...
 
void buildFrom4Points (const std::vector< Point2d_< FPT >> &, const std::vector< Point2d_< FPT >> &, int method=1)
 Build Homography from 2 sets of 4 points. More...
 
void copyTo (cv::Mat &, int type=CV_64F) const
 Copy matrix to Opencv cv::Mat. More...
 
void init ()
 
Hmatrix_inverse ()
 Inverse matrix. More...
 
void normalize () const
 Homography normalisation (const because flag _hasChanged declared as mutable) More...
 
bool operator!= (const Hmatrix_ &h) const
 Comparison operator. Does normalization if required. More...
 
Hmatrix_operator= (const Hmatrix_< M, FPT > &other)
 Assignment operator. More...
 
Hmatrix_operator= (const cv::Mat &)
 Get homography from Opencv cv::Mat. More...
 
bool operator== (const Hmatrix_ &h) const
 Comparison operator. Does normalization if required. More...
 
Constructors
 Hmatrix_ ()
 Default constructor, initialize to unit transformation. More...
 
template<typename T >
 Hmatrix_ (T val)
 Constructor, set homography to a rotation matrix of angle val. More...
 
template<typename T1 , typename T2 >
 Hmatrix_ (T1 tx, T2 ty)
 Constructor, set homography to a translation matrix ( see Hmatrix_( T ) ) More...
 
template<typename T >
 Hmatrix_ (const std::vector< std::vector< T >> &in)
 Constructor, used to fill with a vector of vector matrix. More...
 
template<typename T >
 Hmatrix_ (const std::array< std::array< T, 3 >, 3 > &in)
 Constructor, used to fill with a std::array. More...
 
 Hmatrix_ (const Hmatrix_< M, FPT > &other)
 Copy-constructor. More...
 
 Hmatrix_ (const cv::Mat &mat)
 Constructor used to initialise with a cv::Mat, call the assignment operator. More...
 
Adding/assigning a transformation
template<typename T >
Hmatrix_addTranslation (T tx, T ty)
 Adds a translation tx,ty to the matrix. More...
 
template<typename T1 , typename T2 >
Hmatrix_setTranslation (T1 tx, T2 ty)
 Sets the matrix as a translation tx,ty. More...
 
template<typename T >
Hmatrix_addRotation (T theta)
 Adds a rotation with an angle theta (radians) to the matrix. More...
 
template<typename T >
Hmatrix_setRotation (T theta)
 Sets the matrix as a rotation with an angle theta (radians) More...
 
template<typename T >
Hmatrix_addScale (T k)
 Adds the same scale factor to the matrix. More...
 
template<typename T1 , typename T2 >
Hmatrix_addScale (T1 kx, T2 ky)
 Adds a scale factor to the matrix. More...
 
template<typename T >
Hmatrix_setScale (T k)
 Sets the matrix as a scaling transformation (same on two axis) More...
 
template<typename T1 , typename T2 >
Hmatrix_setScale (T1 kx, T2 ky)
 Sets the matrix as a scaling transformation. More...
 
- Public Member Functions inherited from h2d::detail::Matrix_< FPT >
HOMOG2D_INUMTYPE determ () const
 Return determinant of matrix. More...
 
matrix_t< FPT > & getRaw ()
 
const matrix_t< FPT > & getRaw () const
 
Matrix_inverse ()
 Inverse matrix. More...
 
bool isNormalized () const
 
 Matrix_ ()
 Constructor. More...
 
template<typename FPT2 >
 Matrix_ (const Matrix_< FPT2 > &other)
 Copy-Constructor. More...
 
template<typename T >
void set (size_t r, size_t c, T v)
 
Matrix_transpose ()
 Transpose and return matrix. More...
 
const FPT & value (size_t r, size_t c) const
 
FPT & value (size_t r, size_t c)
 
- Public Member Functions inherited from h2d::detail::Common< FPT >
std::pair< int, int > dsize () const
 Get data size expressed as number of bits for, respectively, mantissa and exponent. More...
 
Dtype dtype () const
 Get numerical data type as a Dtype value, can be stringified with h2d::getString(Dtype) More...
 
template<typename T >
constexpr bool isInside (const Common< T > &) const
 This function is a fallback for all sub-classes that do not provide such a method. More...
 
size_t size () const
 

Friends

template<typename T1 , typename T2 >
class LPBase
 
template<typename T , typename U >
Line2d_< T > operator* (const Homogr_< U > &, const Line2d_< T > &)
 
template<typename T , typename U >
Point2d_< T > operator* (const Homogr_< U > &, const Point2d_< T > &)
 
template<typename T , typename U , typename V >
base::LPBase< typename detail::HelperPL< T >::OtherType, Voperator* (const Hmatrix_< typ::IsEpipmat, U > &h, const base::LPBase< T, V > &in)
 
Hmatrix_ operator* (const Hmatrix_ &h1, const Hmatrix_ &h2)
 Matrix multiplication, call the base class product. More...
 
std::ostream & operator<< (std::ostream &f, const Hmatrix_ &h)
 

Additional Inherited Members

- Protected Member Functions inherited from h2d::detail::Matrix_< FPT >
template<typename FPT2 >
void p_divideAll (detail::Matrix_< FPT > &mat, FPT2 value) const
 Divide all elements of mat by value. More...
 
void p_divideBy (size_t r, size_t c) const
 Divide all elements by the value at (r,c), used for normalization. More...
 
void p_fillEye ()
 
template<typename T >
void p_fillWith (const T &in)
 
void p_fillZero ()
 
void p_normalizeMat (int r, int c) const
 
- Protected Attributes inherited from h2d::detail::Matrix_< FPT >
bool _isNormalized = false
 
matrix_t< FPT > _mdata
 

Detailed Description

template<typename M, typename FPT>
class h2d::Hmatrix_< M, FPT >

A 2D homography, defining a planar transformation.

To define an affine or rigid transformation, you can use:

To add an affine or rigid transformation to the current one, you can use:

To return to unit transformation, use init()

Implemented as a 3x3 matrix

Templated by Floating-Point Type (FPT) and by type M (typ::IsEpipmat or typ::IsHomogr)

Constructor & Destructor Documentation

◆ Hmatrix_() [1/7]

template<typename M, typename FPT>
h2d::Hmatrix_< M, FPT >::Hmatrix_ ( )
inline

Default constructor, initialize to unit transformation.

1700  {
1701  init();
1702  }
void init()
Definition: homog2d.hpp:1820

◆ Hmatrix_() [2/7]

template<typename M, typename FPT>
template<typename T >
h2d::Hmatrix_< M, FPT >::Hmatrix_ ( val)
inlineexplicit

Constructor, set homography to a rotation matrix of angle val.

1707  {
1709  init();
1710  setRotation( val );
1711  }
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Hmatrix_ & setRotation(T theta)
Sets the matrix as a rotation with an angle theta (radians)
Definition: homog2d.hpp:1864
void init()
Definition: homog2d.hpp:1820

◆ Hmatrix_() [3/7]

template<typename M, typename FPT>
template<typename T1 , typename T2 >
h2d::Hmatrix_< M, FPT >::Hmatrix_ ( T1  tx,
T2  ty 
)
inlineexplicit

Constructor, set homography to a translation matrix ( see Hmatrix_( T ) )

1716  {
1719  init();
1720  setTranslation( tx, ty );
1721  }
Hmatrix_ & setTranslation(T1 tx, T2 ty)
Sets the matrix as a translation tx,ty.
Definition: homog2d.hpp:1840
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
void init()
Definition: homog2d.hpp:1820

◆ Hmatrix_() [4/7]

template<typename M, typename FPT>
template<typename T >
h2d::Hmatrix_< M, FPT >::Hmatrix_ ( const std::vector< std::vector< T >> &  in)
inline

Constructor, used to fill with a vector of vector matrix.

Warning
  • Input matrix must be 3 x 3, but type can be anything that can be copied to double
  • no checking is done on validity of matrix as an homography. Thus some assert can get triggered elsewhere.
1731  {
1732 #ifndef HOMOG2D_NOCHECKS
1734  if( in.size() != 3 )
1735  HOMOG2D_THROW_ERROR_1( "Invalid line size for input: " << in.size() );
1736  for( auto li: in )
1737  if( li.size() != 3 )
1738  HOMOG2D_THROW_ERROR_1( "Invalid column size for input: " << li.size() );
1739 #endif
1741  normalize();
1742  }
void p_fillWith(const T &in)
Definition: homog2d.hpp:1570
Line2d li
Definition: homog2d_test.cpp:4035
void normalize() const
Homography normalisation (const because flag _hasChanged declared as mutable)
Definition: homog2d.hpp:1928
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
#define HOMOG2D_THROW_ERROR_1(msg)
Error throw wrapper macro.
Definition: homog2d.hpp:181

◆ Hmatrix_() [5/7]

template<typename M, typename FPT>
template<typename T >
h2d::Hmatrix_< M, FPT >::Hmatrix_ ( const std::array< std::array< T, 3 >, 3 > &  in)
inline

Constructor, used to fill with a std::array.

1747  {
1750  normalize();
1751  }
void p_fillWith(const T &in)
Definition: homog2d.hpp:1570
void normalize() const
Homography normalisation (const because flag _hasChanged declared as mutable)
Definition: homog2d.hpp:1928
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144

◆ Hmatrix_() [6/7]

template<typename M, typename FPT>
h2d::Hmatrix_< M, FPT >::Hmatrix_ ( const Hmatrix_< M, FPT > &  other)
inline

Copy-constructor.

1755  : detail::Matrix_<FPT>( other)
1756  , _hasChanged ( true )
1757  , _hmt ( nullptr )
1758  {
1759  detail::Matrix_<FPT>::getRaw() = other.getRaw();
1760  }
matrix_t< FPT > & getRaw()
Definition: homog2d.hpp:1461

◆ Hmatrix_() [7/7]

template<typename M, typename FPT>
h2d::Hmatrix_< M, FPT >::Hmatrix_ ( const cv::Mat &  mat)
inline

Constructor used to initialise with a cv::Mat, call the assignment operator.

1765  {
1766  *this = mat;
1767  }

Member Function Documentation

◆ addRotation()

template<typename M, typename FPT>
template<typename T >
Hmatrix_& h2d::Hmatrix_< M, FPT >::addRotation ( theta)
inline

Adds a rotation with an angle theta (radians) to the matrix.

1855  {
1857  Hmatrix_ out;
1858  out.setRotation( theta );
1859  *this = out * *this;
1860  return *this;
1861  }
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Hmatrix_()
Default constructor, initialize to unit transformation.
Definition: homog2d.hpp:1699
Here is the caller graph for this function:

◆ addScale() [1/2]

template<typename M, typename FPT>
template<typename T >
Hmatrix_& h2d::Hmatrix_< M, FPT >::addScale ( k)
inline

Adds the same scale factor to the matrix.

1879  {
1881  return this->addScale( k, k );
1882  }
Hmatrix_ & addScale(T k)
Adds the same scale factor to the matrix.
Definition: homog2d.hpp:1878
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Here is the caller graph for this function:

◆ addScale() [2/2]

template<typename M, typename FPT>
template<typename T1 , typename T2 >
Hmatrix_& h2d::Hmatrix_< M, FPT >::addScale ( T1  kx,
T2  ky 
)
inline

Adds a scale factor to the matrix.

1886  {
1889  Hmatrix_ out;
1890  out.setScale( kx, ky );
1891  *this = out * *this;
1892  _hasChanged = true;
1893  return *this;
1894  }
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Hmatrix_()
Default constructor, initialize to unit transformation.
Definition: homog2d.hpp:1699

◆ addTranslation()

template<typename M, typename FPT>
template<typename T >
Hmatrix_& h2d::Hmatrix_< M, FPT >::addTranslation ( tx,
ty 
)
inline

Adds a translation tx,ty to the matrix.

1831  {
1833  Hmatrix_ out;
1834  out.setTranslation( tx, ty );
1835  *this = out * *this;
1836  return *this;
1837  }
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Hmatrix_()
Default constructor, initialize to unit transformation.
Definition: homog2d.hpp:1699
Here is the caller graph for this function:

◆ applyTo()

template<typename W , typename FPT >
template<typename T >
void h2d::Hmatrix_< W, FPT >::applyTo ( T &  vin) const

Apply homography to a vector/array/list (type T) of points or lines.

9564 {
9565 #if 0
9567  std::begin( vin ),
9568  std::end( vin ),
9569  std::begin( vin ),
9570  [](){}
9571  );
9572 #else
9573  for( auto& elem: vin )
9574  elem = *this * elem;
9575 #endif
9576 }
CommonType_< FPT > transform(const Homogr_< FPT > &h, const T &elem)
Apply homography to primitive.
Definition: homog2d.hpp:10378
Here is the caller graph for this function:

◆ buildFrom4Points()

template<typename M , typename FPT>
void h2d::Hmatrix_< M, FPT >::buildFrom4Points ( const std::vector< Point2d_< FPT >> &  vpt1,
const std::vector< Point2d_< FPT >> &  vpt2,
int  method = 1 
)

Build Homography from 2 sets of 4 points.

See also
free function: h2d::buildFrom4Points()
Todo:
fix this so that user can provide a std::array of points
Parameters
vpt1source points
vpt2destination points
method0: Eigen, 1: Opencv (default)
4798 {
4799  if( vpt1.size() != 4 )
4800  HOMOG2D_THROW_ERROR_1( "invalid vector size for source points, should be 4, value=" << vpt1.size() );
4801  if( vpt2.size() != 4 )
4802  HOMOG2D_THROW_ERROR_1( "invalid vector size for dest points, should be 4, value=" << vpt2.size() );
4803  assert( method == 0 || method == 1 );
4804 
4805  if( method == 0 )
4806  {
4807 #ifdef HOMOG2D_USE_EIGEN
4808  *this = detail::buildFrom4Points_Eigen( vpt1, vpt2 );
4809 #else
4810  throw std::runtime_error( "Unable, build without Eigen support" );
4811 #endif
4812  }
4813  else
4814  {
4815 #ifdef HOMOG2D_USE_OPENCV
4816  *this = detail::buildFrom4Points_Opencv( vpt1, vpt2 );
4817 #else
4818  throw std::runtime_error( "Unable, build without Opencv support" );
4819 #endif
4820  }
4821 }
Homogr_< FPT > buildFrom4Points_Opencv(const std::vector< Point2d_< FPT >> &vpt1, const std::vector< Point2d_< FPT >> &vpt2)
Build Homography from 2 sets of 4 points, using Opencv.
Definition: homog2d.hpp:4750
#define HOMOG2D_THROW_ERROR_1(msg)
Error throw wrapper macro.
Definition: homog2d.hpp:181
Here is the caller graph for this function:

◆ copyTo()

template<typename W , typename FPT >
void h2d::Hmatrix_< W, FPT >::copyTo ( cv::Mat &  mat,
int  type = CV_64F 
) const

Copy matrix to Opencv cv::Mat.

The output matrix is passed by reference to avoid issues with Opencv copy operator, and is allocated here.

User can pass a type as second argument: CV_32F for float, CV_64F for double (default)

11644 {
11645  auto& data = detail::Matrix_<FPT>::_mdata;
11646 #ifndef HOMOG2D_NOCHECKS
11647  if( type != CV_64F && type != CV_32F )
11648  throw std::runtime_error( "invalid OpenCv matrix type" );
11649 #endif
11650  mat.create( 3, 3, type ); // default:CV_64F
11651  size_t i=0;
11652  switch( type )
11653  {
11654  case CV_64F:
11655  for( auto it = mat.begin<double>(); it != mat.end<double>(); it++, i++ )
11656  *it = data[i/3][i%3];
11657  break;
11658  case CV_32F:
11659  for( auto it = mat.begin<float>(); it != mat.end<float>(); it++, i++ )
11660  *it = data[i/3][i%3];
11661  break;
11662  default: assert(0);
11663  }
11664 }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1441
Type type(const T &elem)
Free function. Returns the type of object or variant.
Definition: homog2d.hpp:10190
Here is the caller graph for this function:

◆ init()

template<typename M, typename FPT>
void h2d::Hmatrix_< M, FPT >::init ( )
inline
1821  {
1822  impl_mat_init0( detail::BaseHelper<M>() );
1823  }

◆ inverse()

template<typename M, typename FPT>
Hmatrix_& h2d::Hmatrix_< M, FPT >::inverse ( )
inline

Inverse matrix.

1783  {
1785  normalize();
1786  return *this;
1787  }
void normalize() const
Homography normalisation (const because flag _hasChanged declared as mutable)
Definition: homog2d.hpp:1928
Matrix_ & inverse()
Inverse matrix.
Definition: homog2d.hpp:1513
Here is the caller graph for this function:

◆ normalize()

template<typename M, typename FPT>
void h2d::Hmatrix_< M, FPT >::normalize ( ) const
inline

Homography normalisation (const because flag _hasChanged declared as mutable)

1929  {
1931  _hasChanged = true;
1932  }
void p_normalizeMat(int r, int c) const
Definition: homog2d.hpp:1528
Here is the caller graph for this function:

◆ operator!=()

template<typename M, typename FPT>
bool h2d::Hmatrix_< M, FPT >::operator!= ( const Hmatrix_< M, FPT > &  h) const
inline

Comparison operator. Does normalization if required.

1972  {
1973  return !(*this == h);
1974  }

◆ operator=() [1/2]

template<typename M, typename FPT>
Hmatrix_& h2d::Hmatrix_< M, FPT >::operator= ( const Hmatrix_< M, FPT > &  other)
inline

Assignment operator.

1774  {
1775  if( this != &other )
1776  detail::Matrix_<FPT>::getRaw() = other.getRaw();
1777  _hasChanged = true;
1778  return *this;
1779  }
matrix_t< FPT > & getRaw()
Definition: homog2d.hpp:1461

◆ operator=() [2/2]

template<typename W, typename FPT>
Hmatrix_< W, FPT > & h2d::Hmatrix_< W, FPT >::operator= ( const cv::Mat &  mat)

Get homography from Opencv cv::Mat.

11670 {
11671  auto type = mat.type();
11672 #ifndef HOMOG2D_NOCHECKS
11673  if( mat.rows != 3 || mat.cols != 3 )
11674  throw std::runtime_error( "invalid matrix size, rows=" + std::to_string(mat.rows) + " cols=" + std::to_string(mat.cols) );
11675  if( mat.channels() != 1 )
11676  throw std::runtime_error( "invalid matrix nb channels: " + std::to_string(mat.channels() ) );
11677  if( type != CV_64F && type != CV_32F )
11678  throw std::runtime_error( "invalid matrix type" );
11679 #endif
11680  size_t i=0;
11681 
11682  auto& data = detail::Matrix_<FPT>::_mdata;
11683  switch( type )
11684  {
11685  case CV_64F:
11686  for( auto it = mat.begin<double>(); it != mat.end<double>(); it++, i++ )
11687  data[i/3][i%3] = *it;
11688  break;
11689  case CV_32F:
11690  for( auto it = mat.begin<float>(); it != mat.end<float>(); it++, i++ )
11691  data[i/3][i%3] = *it;
11692  break;
11693  default: assert(0);
11694  }
11695  return *this;
11696 }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1441
Type type(const T &elem)
Free function. Returns the type of object or variant.
Definition: homog2d.hpp:10190

◆ operator==()

template<typename M, typename FPT>
bool h2d::Hmatrix_< M, FPT >::operator== ( const Hmatrix_< M, FPT > &  h) const
inline

Comparison operator. Does normalization if required.

This does an absolute comparison of all matrix elements, one by one, and if one differs more than the threshold, it will return false

1952  {
1953  auto& data = detail::Matrix_<FPT>::_mdata;
1954 
1956  normalize();
1957  if( !h.isNormalized() )
1958  h.normalize();
1959 
1960  for( int i=0; i<3; i++ )
1961  for( int j=0; j<3; j++ )
1962  if( std::fabs(
1963  static_cast<HOMOG2D_INUMTYPE>( data[i][j] ) - h.value(i,j) )
1964  >= thr::nullDeter()
1965  )
1966  return false;
1967  return true;
1968  }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1441
bool isNormalized() const
Definition: homog2d.hpp:1525
void normalize() const
Homography normalisation (const because flag _hasChanged declared as mutable)
Definition: homog2d.hpp:1928
static HOMOG2D_INUMTYPE & nullDeter()
Definition: homog2d.hpp:1217

◆ setRotation()

template<typename M, typename FPT>
template<typename T >
Hmatrix_& h2d::Hmatrix_< M, FPT >::setRotation ( theta)
inline

Sets the matrix as a rotation with an angle theta (radians)

1865  {
1867  auto& mat = detail::Matrix_<FPT>::_mdata;
1868  init();
1869  mat[0][0] = mat[1][1] = std::cos(theta);
1870  mat[1][0] = std::sin(theta);
1871  mat[0][1] = -mat[1][0];
1873  _hasChanged = true;
1874  return *this;
1875  }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1441
bool _isNormalized
Definition: homog2d.hpp:1442
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
void init()
Definition: homog2d.hpp:1820
Here is the caller graph for this function:

◆ setScale() [1/2]

template<typename M, typename FPT>
template<typename T >
Hmatrix_& h2d::Hmatrix_< M, FPT >::setScale ( k)
inline

Sets the matrix as a scaling transformation (same on two axis)

1898  {
1900  return setScale( k, k );
1901  }
Hmatrix_ & setScale(T k)
Sets the matrix as a scaling transformation (same on two axis)
Definition: homog2d.hpp:1897
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Here is the caller graph for this function:

◆ setScale() [2/2]

template<typename M, typename FPT>
template<typename T1 , typename T2 >
Hmatrix_& h2d::Hmatrix_< M, FPT >::setScale ( T1  kx,
T2  ky 
)
inline

Sets the matrix as a scaling transformation.

1905  {
1908  init();
1909  auto& mat = detail::Matrix_<FPT>::_mdata;
1910  mat[0][0] = kx;
1911  mat[1][1] = ky;
1913  _hasChanged = true;
1914  return *this;
1915  }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1441
bool _isNormalized
Definition: homog2d.hpp:1442
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
void init()
Definition: homog2d.hpp:1820

◆ setTranslation()

template<typename M, typename FPT>
template<typename T1 , typename T2 >
Hmatrix_& h2d::Hmatrix_< M, FPT >::setTranslation ( T1  tx,
T2  ty 
)
inline

Sets the matrix as a translation tx,ty.

1841  {
1844  init();
1845  auto& mat = detail::Matrix_<FPT>::_mdata;
1846  mat[0][2] = tx;
1847  mat[1][2] = ty;
1849  _hasChanged = true;
1850  return *this;
1851  }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1441
bool _isNormalized
Definition: homog2d.hpp:1442
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
void init()
Definition: homog2d.hpp:1820
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ LPBase

template<typename M, typename FPT>
template<typename T1 , typename T2 >
friend class LPBase
friend

◆ operator* [1/4]

template<typename M, typename FPT>
template<typename T , typename U >
Line2d_<T> operator* ( const Homogr_< U > &  ,
const Line2d_< T > &   
)
friend

◆ operator* [2/4]

template<typename M, typename FPT>
template<typename T , typename U >
Point2d_<T> operator* ( const Homogr_< U > &  ,
const Point2d_< T > &   
)
friend

◆ operator* [3/4]

template<typename M, typename FPT>
template<typename T , typename U , typename V >
base::LPBase<typename detail::HelperPL<T>::OtherType,V> operator* ( const Hmatrix_< typ::IsEpipmat, U > &  h,
const base::LPBase< T, V > &  in 
)
friend

◆ operator* [4/4]

template<typename M, typename FPT>
Hmatrix_ operator* ( const Hmatrix_< M, FPT > &  h1,
const Hmatrix_< M, FPT > &  h2 
)
friend

Matrix multiplication, call the base class product.

1938  {
1939  Hmatrix_ out;
1940  detail::product( out, static_cast<detail::Matrix_<FPT>>(h1), static_cast<detail::Matrix_<FPT>>(h2) ) ;
1941  out.normalize();
1942  out._hasChanged = true;
1943  return out;
1944  }
void product(Matrix_< FPT1 > &, const Matrix_< FPT2 > &, const Matrix_< FPT3 > &)
Implementation of product 3x3 by 3x3.
Definition: homog2d.hpp:9584
Hmatrix_()
Default constructor, initialize to unit transformation.
Definition: homog2d.hpp:1699

◆ operator<<

template<typename M, typename FPT>
std::ostream& operator<< ( std::ostream &  f,
const Hmatrix_< M, FPT > &  h 
)
friend
2007  {
2008  f << "Hmatrix:\n"
2009  << static_cast<const detail::Matrix_<FPT>&>(h);
2010  return f;
2011  }

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