15 #ifndef __IPSDKMATH_HOMOGRAPHY2D_H__ 16 #define __IPSDKMATH_HOMOGRAPHY2D_H__ 20 #pragma warning (push) 21 #pragma warning (disable : 4251) 23 #include <IPSDKMath/Geometry/2d/Transform/BaseLinearGeometricTransform2d.h> 58 _matA(0, 0) = 1; _matA(0, 1) = 0; _matA(0, 2) = 0;
59 _matA(1, 0) = 0; _matA(1, 1) = 1; _matA(1, 2) = 0;
60 _matA(2, 0) = 0; _matA(2, 1) = 0; _matA(2, 2) = 1;
70 _matA(0, 0) = axx; _matA(0, 1) = axy; _matA(0, 2) = axw;
71 _matA(1, 0) = ayx; _matA(1, 1) = ayy; _matA(1, 2) = ayw;
72 _matA(2, 0) = awx; _matA(2, 1) = awy; _matA(2, 2) = aww;
82 static bool transform(
const Matrix3d& matA,
85 return transform(matA(0, 0), matA(0, 1), matA(0, 2),
86 matA(1, 0), matA(1, 1), matA(1, 2),
87 matA(2, 0), matA(2, 1), matA(2, 2),
95 const ipReal64 xTmp = axx*x + axy*y + axw;
96 const ipReal64 yTmp = ayx*x + ayy*y + ayw;
97 const ipReal64 wTmp = awx*x + awy*y + aww;
113 transform(0, 0) = axx; transform(0, 1) = axy; transform(0, 2) = axw;
114 transform(1, 0) = ayx; transform(1, 1) = ayy; transform(1, 2) = ayw;
115 transform(2, 0) = awx; transform(2, 1) = awy; transform(2, 2) = aww;
134 matA(0, 0) = axx; matA(0, 1) = axy; matA(0, 2) = axw;
135 matA(1, 0) = ayx; matA(1, 1) = ayy; matA(1, 2) = ayw;
136 matA(2, 0) = awx; matA(2, 1) = awy; matA(2, 2) = aww;
137 getInvParams(matA(0, 0), matA(0, 1), matA(0, 2),
138 matA(1, 0), matA(1, 1), matA(1, 2),
139 matA(2, 0), matA(2, 1), matA(2, 2));
152 static Vector getIdentityParams();
156 void setParams(
const Matrix3d& matA)
164 _matA(0, 0) = axx; _matA(0, 1) = axy; _matA(0, 2) = axw;
165 _matA(1, 0) = ayx; _matA(1, 1) = ayy; _matA(1, 2) = ayw;
166 _matA(2, 0) = awx; _matA(2, 1) = awy; _matA(2, 2) = aww;
173 void setParams(
const Vector& params);
182 Matrix3d getHomogenousMatrix()
const;
188 bool isInvertible()
const;
193 Matrix3d getInvHomogenousMatrix()
const;
198 Vector getInvParams()
const;
223 #pragma warning (pop) 225 #endif // __IPSDKMATH_HOMOGRAPHY2D_H__ Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
void setIdentity()
set transformation parameters to identity
Definition: Homography2d.h:222
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
IPSDKGEOMETRY_API bool apply(const BaseGeometryTransform2d &transform, BaseGeometryEntity2d &entity)
function allowing to apply in situ a given transformation on an entity
boost::numeric::ublas::vector< ipReal64 > Vector
vector type associated to library
Definition: LinearAlgebraTypes.h:36
static Vector getIdentityParams()
retrieve identity parameters for transformation
Transformation class allowing to manage 2d homography transformations.
Definition: Homography2d.h:32
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27
boost::numeric::ublas::bounded_matrix< ipReal64, 3, 3 > Matrix3d
3d matrix (3x3) type associated to library
Definition: LinearAlgebraTypes.h:54
void setParams(const Matrix3d &matA)
select parameters associated to transformation
Definition: Homography2d.h:167
eTransformParams
Definition: Homography2d.h:39
Base class for linear geometric transformation 2d management.
Definition: BaseLinearGeometricTransform2d.h:27
#define IPSDK_ENUM(enumTypeStr, enumSeq)
macro allowing to declare an enumerate for library
Definition: EnumMacros.h:26
#define IPSDK_DECLARE_TRANSFORM2D(className)
macro allowing to declare a geometric transformation 2d
Definition: Transform2dHdrMacros.h:55