IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Moments2dO3.h
1 // Moments2dO3.h:
3 // ------------
4 //
13 
14 #ifndef __IPSDKGEOMETRY_MEASURE_MOMENTS2DO3_H__
15 #define __IPSDKGEOMETRY_MEASURE_MOMENTS2DO3_H__
16 
18 #include <IPSDKUtil/BaseTypes.h>
19 #include <IPSDKGeometry/Entity/2d/Point/Point2dData.h>
20 
21 namespace ipsdk {
22 namespace geom {
23 
25 public:
26  Moments2dO3();
27  Moments2dO3(ipReal64 m00, ipReal64 m10, ipReal64 m01, ipReal64 m20, ipReal64 m11,
28  ipReal64 m02, ipReal64 m30, ipReal64 m21, ipReal64 m12, ipReal64 m03);
29 
31  template <typename T>
32  void computeMoments(const std::vector< Point2dData<T> >& pointColl);
33 
35  void complete();
36 
37  Moments2dO3 operator+(const Moments2dO3& m);
38  Moments2dO3 operator+=(const Moments2dO3& m);
39  Moments2dO3 operator-(const Moments2dO3& m);
40  Moments2dO3 operator-=(const Moments2dO3& m);
41  ipBool isEqual(const Moments2dO3& m, const ipsdk::ipReal64 tolerance) const;
42 
43 // attributes
44 public:
45  // raw moments
46  ipReal64 _m00;
47  ipReal64 _m10;
48  ipReal64 _m01;
49  ipReal64 _m20;
50  ipReal64 _m11;
51  ipReal64 _m02;
52  ipReal64 _m30;
53  ipReal64 _m21;
54  ipReal64 _m12;
55  ipReal64 _m03;
56 
57  // normalized moments
58  ipReal64 _n10;
59  ipReal64 _n01;
60  ipReal64 _n20;
61  ipReal64 _n11;
62  ipReal64 _n02;
63  ipReal64 _n30;
64  ipReal64 _n21;
65  ipReal64 _n12;
66  ipReal64 _n03;
67 
68  // central moments
69  ipReal64 _mu20;
70  ipReal64 _mu11;
71  ipReal64 _mu02;
72  ipReal64 _mu30;
73  ipReal64 _mu21;
74  ipReal64 _mu12;
75  ipReal64 _mu03;
76 
77  // central normalized moments
78  ipReal64 _nu20;
79  ipReal64 _nu11;
80  ipReal64 _nu02;
81  ipReal64 _nu30;
82  ipReal64 _nu21;
83  ipReal64 _nu12;
84  ipReal64 _nu03;
85 };
86 
87 } // end of namespace geom
88 } // end of namespace ipsdk
89 
90 #endif // __IPSDKGEOMETRY_MEASURE_MOMENTS2DO3_H__
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
Moments of order up to 3 on a 2d shape.
Definition: Moments2dO3.h:24
Definition of import/export macro for library.
Base types for multiplatform compatibility.
#define IPSDKGEOMETRY_API
Import/Export macro for library IPSDKGeometry.
Definition: IPSDKGeometryExports.h:25
IPSDK_FORCEINLINE Pack2MaskPackType< PackT >::Type isEqual(const PackT &in1, const PackT &in2)
isEqual function; tests if all the elements of the first operand pack equal the elements of the secon...
Definition: isEqual.h:39
bool ipBool
Base types definition.
Definition: BaseTypes.h:47
Lightweight structure used to store Point2d data.
Definition: GeometryEntity2dTypes.h:26