IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
HomographyTransform2d.h
1 // HomographyTransform2d.h:
3 // ------------------------
4 //
14 
15 #ifndef __IPSDKGEOMETRY_HOMOGRAPHYTRANSFORM2D_H__
16 #define __IPSDKGEOMETRY_HOMOGRAPHYTRANSFORM2D_H__
17 
18 // suppression warnings
19 // warning C4251: 'ipsdk::geom::HomographyTransform2d::_matH' : class 'boost::numeric::ublas::bounded_matrix<ipsdk::ipReal64,0x03,0x03,boost::numeric::ublas::row_major>' needs to have dll-interface to be used by clients of class 'ipsdk::geom::HomographyTransform2d'
20 #pragma warning (push)
21 #pragma warning (disable : 4251)
22 
23 #include <IPSDKGeometry/Transform/2d/BaseGeometryTransform2d.h>
24 #include <IPSDKMath/Geometry/2d/Transform/Homography2d.h>
25 
26 namespace ipsdk {
27 namespace geom {
28 
31 
33 {
34  // declare geometry transform 2d
36 
37 // predefined public types
38 public:
40  static const eTransform2dType::domain g_transform2dType = eTransform2dType::eT2DT_HomographyTransform;
41 
42 public:
50 
51 // methods
52 public:
54  eTransform2dType getTransform2dType() const;
55 
58  void init(const math::Matrix3d& matH);
59  void init(const math::transform::Homography2d& transform);
61 
62 protected:
65  template <typename T>
66  void processPoint(Point2dData<T>& entity) const;
67  template <typename T>
68  bool processInSitu(Point2d<T>& entity) const;
69  bool processInSitu(Vector2d& entity) const;
70  template <typename T>
71  bool processInSitu(PointCloud2d<T>& entity) const;
72  template <typename T>
73  bool processInSitu(Polygon2d<T>& entity) const;
74  template <typename T>
75  bool processInSitu(PolygonWithHoles2d<T>& entity) const;
76  bool processInSitu(Shape2d& entity) const;
77  template <typename T>
78  bool processInSitu(Segment2d<T>& entity) const;
80 
81 // attributes
82 protected:
85 };
86 
89 
90 inline eTransform2dType
92 {
93  return g_transform2dType;
94 }
95 
96 inline void
98 {
99  _transform = transform;
100 }
101 
104 
105 } // end of namespace geom
106 } // end of namespace ipsdk
107 
108 #pragma warning (pop)
109 
110 #endif // __IPSDKGEOMETRY_HOMOGRAPHYTRANSFORM2D_H__
Homography transformation.
Definition: GeometryTransform2dTypes.h:47
Homography 2d transformation.
Definition: HomographyTransform2d.h:32
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
Point class associated to cartesian 2d coordinates.
Definition: GeometryEntity2dTypes.h:28
math::transform::Homography2d _transform
underlying transformation
Definition: HomographyTransform2d.h:84
#define IPSDK_DECLARE_GEOMETRY_TRANSFORM_2D(libraryName, className)
Macro allowing to declare a geometry transform 2d.
Definition: GeometryTransform2dHdrMacros.h:26
Closed polygon potentially associated to interior polygonal holes.
Definition: PolygonWithHoles2d.h:40
Transformation class allowing to manage 2d homography transformations.
Definition: Homography2d.h:32
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
Unordered collection of 2d points.
Definition: PointCloud2d.h:35
2d segment associated to two points
Definition: Segment2d.h:38
Closed polygon associated to an ordered collection of 2d points.
Definition: Polygon2d.h:38
boost::numeric::ublas::bounded_matrix< ipReal64, 3, 3 > Matrix3d
3d matrix (3x3) type associated to library
Definition: LinearAlgebraTypes.h:54
eTransform2dType getTransform2dType() const
method allowing to retrieve entity 2d transformation type
Definition: HomographyTransform2d.h:91
Vector class associated to polar 2d coordinates.
Definition: Vector2d.h:32
void init(const math::Matrix3d &matH)
initialization of transformation parameters
Base class for geometry 2d transformations.
Definition: BaseGeometryTransform2d.h:34
Shape 2d associated to one or more closed polygon 2d.
Definition: Shape2d.h:35
Lightweight structure used to store Point2d data.
Definition: GeometryEntity2dTypes.h:26
static const eTransform2dType::domain g_transform2dType
geometry transformation type
Definition: HomographyTransform2d.h:40
eTransform2dType
Enumerate describing geometry 2d transform type.
Definition: GeometryTransform2dTypes.h:33