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.

1734  {
1735  init();
1736  }
void init()
Definition: homog2d.hpp:1854

◆ 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.

1741  {
1743  init();
1744  setRotation( val );
1745  }
#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:1898
void init()
Definition: homog2d.hpp:1854

◆ 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 ) )

1750  {
1753  init();
1754  setTranslation( tx, ty );
1755  }
Hmatrix_ & setTranslation(T1 tx, T2 ty)
Sets the matrix as a translation tx,ty.
Definition: homog2d.hpp:1874
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
void init()
Definition: homog2d.hpp:1854

◆ 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.
1765  {
1766 #ifndef HOMOG2D_NOCHECKS
1768  if( in.size() != 3 )
1769  HOMOG2D_THROW_ERROR_1( "Invalid line size for input: " << in.size() );
1770  for( auto li: in )
1771  if( li.size() != 3 )
1772  HOMOG2D_THROW_ERROR_1( "Invalid column size for input: " << li.size() );
1773 #endif
1775  normalize();
1776  }
void p_fillWith(const T &in)
Definition: homog2d.hpp:1604
Line2d li
Definition: homog2d_test.cpp:4035
void normalize() const
Homography normalisation (const because flag _hasChanged declared as mutable)
Definition: homog2d.hpp:1962
#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.

1781  {
1784  normalize();
1785  }
void p_fillWith(const T &in)
Definition: homog2d.hpp:1604
void normalize() const
Homography normalisation (const because flag _hasChanged declared as mutable)
Definition: homog2d.hpp:1962
#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.

1789  : detail::Matrix_<FPT>( other)
1790  , _hasChanged ( true )
1791  , _hmt ( nullptr )
1792  {
1793  detail::Matrix_<FPT>::getRaw() = other.getRaw();
1794  }
matrix_t< FPT > & getRaw()
Definition: homog2d.hpp:1495

◆ 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.

1799  {
1800  *this = mat;
1801  }

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.

1889  {
1891  Hmatrix_ out;
1892  out.setRotation( theta );
1893  *this = out * *this;
1894  return *this;
1895  }
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Hmatrix_()
Default constructor, initialize to unit transformation.
Definition: homog2d.hpp:1733
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.

1913  {
1915  return this->addScale( k, k );
1916  }
Hmatrix_ & addScale(T k)
Adds the same scale factor to the matrix.
Definition: homog2d.hpp:1912
#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.

1920  {
1923  Hmatrix_ out;
1924  out.setScale( kx, ky );
1925  *this = out * *this;
1926  _hasChanged = true;
1927  return *this;
1928  }
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Hmatrix_()
Default constructor, initialize to unit transformation.
Definition: homog2d.hpp:1733

◆ 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.

1865  {
1867  Hmatrix_ out;
1868  out.setTranslation( tx, ty );
1869  *this = out * *this;
1870  return *this;
1871  }
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
Hmatrix_()
Default constructor, initialize to unit transformation.
Definition: homog2d.hpp:1733
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.

9565 {
9566 #if 0
9568  std::begin( vin ),
9569  std::end( vin ),
9570  std::begin( vin ),
9571  [](){}
9572  );
9573 #else
9574  for( auto& elem: vin )
9575  elem = *this * elem;
9576 #endif
9577 }
CommonType_< FPT > transform(const Homogr_< FPT > &h, const T &elem)
Apply homography to primitive.
Definition: homog2d.hpp:10379
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)
4799 {
4800  if( vpt1.size() != 4 )
4801  HOMOG2D_THROW_ERROR_1( "invalid vector size for source points, should be 4, value=" << vpt1.size() );
4802  if( vpt2.size() != 4 )
4803  HOMOG2D_THROW_ERROR_1( "invalid vector size for dest points, should be 4, value=" << vpt2.size() );
4804  assert( method == 0 || method == 1 );
4805 
4806  if( method == 0 )
4807  {
4808 #ifdef HOMOG2D_USE_EIGEN
4809  *this = detail::buildFrom4Points_Eigen( vpt1, vpt2 );
4810 #else
4811  throw std::runtime_error( "Unable, build without Eigen support" );
4812 #endif
4813  }
4814  else
4815  {
4816 #ifdef HOMOG2D_USE_OPENCV
4817  *this = detail::buildFrom4Points_Opencv( vpt1, vpt2 );
4818 #else
4819  throw std::runtime_error( "Unable, build without Opencv support" );
4820 #endif
4821  }
4822 }
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:4751
#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)

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

◆ init()

template<typename M, typename FPT>
void h2d::Hmatrix_< M, FPT >::init ( )
inline
1855  {
1856  impl_mat_init0( detail::BaseHelper<M>() );
1857  }

◆ inverse()

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

Inverse matrix.

1817  {
1819  normalize();
1820  return *this;
1821  }
void normalize() const
Homography normalisation (const because flag _hasChanged declared as mutable)
Definition: homog2d.hpp:1962
Matrix_ & inverse()
Inverse matrix.
Definition: homog2d.hpp:1547
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)

1963  {
1965  _hasChanged = true;
1966  }
void p_normalizeMat(int r, int c) const
Definition: homog2d.hpp:1562
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.

2006  {
2007  return !(*this == h);
2008  }

◆ operator=() [1/2]

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

Assignment operator.

1808  {
1809  if( this != &other )
1810  detail::Matrix_<FPT>::getRaw() = other.getRaw();
1811  _hasChanged = true;
1812  return *this;
1813  }
matrix_t< FPT > & getRaw()
Definition: homog2d.hpp:1495

◆ 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.

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

◆ 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

1986  {
1987  auto& data = detail::Matrix_<FPT>::_mdata;
1988 
1990  normalize();
1991  if( !h.isNormalized() )
1992  h.normalize();
1993 
1994  for( int i=0; i<3; i++ )
1995  for( int j=0; j<3; j++ )
1996  if( std::fabs(
1997  static_cast<HOMOG2D_INUMTYPE>( data[i][j] ) - h.value(i,j) )
1998  >= thr::nullDeter()
1999  )
2000  return false;
2001  return true;
2002  }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1475
bool isNormalized() const
Definition: homog2d.hpp:1559
void normalize() const
Homography normalisation (const because flag _hasChanged declared as mutable)
Definition: homog2d.hpp:1962
static HOMOG2D_INUMTYPE & nullDeter()
Definition: homog2d.hpp:1251

◆ 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)

1899  {
1901  auto& mat = detail::Matrix_<FPT>::_mdata;
1902  init();
1903  mat[0][0] = mat[1][1] = std::cos(theta);
1904  mat[1][0] = std::sin(theta);
1905  mat[0][1] = -mat[1][0];
1907  _hasChanged = true;
1908  return *this;
1909  }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1475
bool _isNormalized
Definition: homog2d.hpp:1476
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
void init()
Definition: homog2d.hpp:1854
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)

1932  {
1934  return setScale( k, k );
1935  }
Hmatrix_ & setScale(T k)
Sets the matrix as a scaling transformation (same on two axis)
Definition: homog2d.hpp:1931
#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.

1939  {
1942  init();
1943  auto& mat = detail::Matrix_<FPT>::_mdata;
1944  mat[0][0] = kx;
1945  mat[1][1] = ky;
1947  _hasChanged = true;
1948  return *this;
1949  }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1475
bool _isNormalized
Definition: homog2d.hpp:1476
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
void init()
Definition: homog2d.hpp:1854

◆ 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.

1875  {
1878  init();
1879  auto& mat = detail::Matrix_<FPT>::_mdata;
1880  mat[0][2] = tx;
1881  mat[1][2] = ty;
1883  _hasChanged = true;
1884  return *this;
1885  }
matrix_t< FPT > _mdata
Definition: homog2d.hpp:1475
bool _isNormalized
Definition: homog2d.hpp:1476
#define HOMOG2D_CHECK_IS_NUMBER(T)
Definition: homog2d.hpp:144
void init()
Definition: homog2d.hpp:1854
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.

1972  {
1973  Hmatrix_ out;
1974  detail::product( out, static_cast<detail::Matrix_<FPT>>(h1), static_cast<detail::Matrix_<FPT>>(h2) ) ;
1975  out.normalize();
1976  out._hasChanged = true;
1977  return out;
1978  }
void product(Matrix_< FPT1 > &, const Matrix_< FPT2 > &, const Matrix_< FPT3 > &)
Implementation of product 3x3 by 3x3.
Definition: homog2d.hpp:9585
Hmatrix_()
Default constructor, initialize to unit transformation.
Definition: homog2d.hpp:1733

◆ operator<<

template<typename M, typename FPT>
std::ostream& operator<< ( std::ostream &  f,
const Hmatrix_< M, FPT > &  h 
)
friend
2041  {
2042  f << "Hmatrix:\n"
2043  << static_cast<const detail::Matrix_<FPT>&>(h);
2044  return f;
2045  }

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