FLImaging 7.10.21.1
FLImagingImgProcBase/Moment.h
1#pragma once
2
22
23#include "AlgorithmFeature_SR.h"
24
25#include "ReportDescriptorForMoment.h"
26
28namespace FLImaging
29{
31 namespace ImageProcessing
32 {
33 class CInternalMoment;
34
54
55 class FL_EXPORT CMoment : public CAlgorithmFeature_SR
56 {
57 public:
66
74 CMoment(const CMoment& Moment);
75
83 CMoment(const CMoment* pMoment);
84
92 virtual ~CMoment();
93
101 const CMoment& operator=(const CMoment& Moment);
102
116 virtual const CResult Assign(const CMoment& aib);
117
131 virtual const CResult Assign(const CMoment* pAib);
132
145 {
156 };
157
170 {
173 };
174
187 {
198 };
199
212 {
223 };
224
237 {
238 double f64Hu0;
239 double f64Hu1;
240 double f64Hu2;
241 double f64Hu3;
242 double f64Hu4;
243 double f64Hu5;
244 double f64Hu6;
245 };
246
268 struct SMoments
269 {
275 };
276
284 struct SZernike
285 {
286 int32_t i32N;
287 int32_t i32M;
295 uint64_t u64Radius;
320 };
321
341 virtual const CResult EnableBinaryImage(bool bBinaryImage = true);
342
352 virtual bool IsBinaryImageEnabled() const;
353
365 virtual const CResult Execute();
366
378 virtual const CResult Clear() override;
379
393 virtual const CResult EnableGeometricMoment(bool bCalc = true);
394
404 virtual bool IsGeometricMomentEnabled() const;
405
419 virtual const CResult EnableCentroidMoment(bool bCalc = true);
420
430 virtual bool IsCentroidMomentEnabled() const;
431
445 virtual const CResult EnableCentralMoment(bool bCalc = true);
446
456 virtual bool IsCentralMomentEnabled() const;
457
471 virtual const CResult EnableNormalizedCentralMoment(bool bCalc = true);
472
483
497 virtual const CResult EnableHuMoment(bool bCalc = true);
498
508 virtual bool IsHuMomentEnabled() const;
509
521 virtual const CResult ClearZernike();
522
548 virtual const CResult AddZernike(int32_t i32N, int32_t i32M, uint64_t u64ZernikeRadius = 0, bool bInscribedCircle = true);
549
567 virtual const CResult GetMoment(CMoment::SMoments& moments, int64_t i64Channel = 0) const;
568
586 virtual const CResult GetMoment(CMoment::SMoments* pMoments, int64_t i64Channel = 0) const;
587
599 virtual int64_t GetZernikeCount() const;
600
620 virtual const CResult GetZernike(CMoment::SZernike& zernike, int64_t i64Index = 0, int64_t i64Channel = 0) const;
621
641 virtual const CResult GetZernike(CMoment::SZernike* pZernike, int64_t i64Index = 0, int64_t i64Channel = 0) const;
642
644
663 static const CResult GetContoursMatchL1(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double* pF64Result);
664 static const CResult GetContoursMatchL1(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double& f64Result);
666
668
687 static const CResult GetContoursMatchL2(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double* pF64Result);
688 static const CResult GetContoursMatchL2(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double& f64Result);
690
692
711 static const CResult GetContoursMatchL3(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double* pF64Result);
712 static const CResult GetContoursMatchL3(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double& f64Result);
714
715 virtual const CResult ReportToCSV(const Foundation::CReportDescriptor* pWrd) const override;
716
737 virtual const CResult ReportToCSV(const CReportDescriptorForMoment& wrd) const;
738
759 virtual const CResult ReportToCSV(const CReportDescriptorForMoment* pWrd) const;
760
761 virtual bool IsLicenseAvailable() const override;
762
763
764 DeclareGetClassType();
765 SupportToDuplicateObject(CMoment, *this);
766
767 protected:
776
785
794
803
812
821
822 protected:
823 friend class CInternalMoment;
824
825 CInternalMoment* m_pInternal;
826 };
827 }
828}
FLImaging module execution result object.
Definition FLImagingBase/ResultsDef.h:1712
ReportDescriptor class.
Definition FLImagingFoundation/ReportDescriptor.h:22
bool m_bBinaryImage
Definition FLImagingImgProcBase/Moment.h:775
bool m_bCalcHuMoment
Definition FLImagingImgProcBase/Moment.h:820
static const CResult GetContoursMatchL3(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double *pF64Result)
virtual const CResult GetZernike(CMoment::SZernike *pZernike, int64_t i64Index=0, int64_t i64Channel=0) const
virtual bool IsNormalizedCentralMomentEnabled() const
static const CResult GetContoursMatchL3(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double &f64Result)
virtual const CResult Assign(const CMoment *pAib)
virtual const CResult GetMoment(CMoment::SMoments &moments, int64_t i64Channel=0) const
CMoment(const CMoment *pMoment)
virtual bool IsCentroidMomentEnabled() const
bool m_bCalcGeometricMoment
Definition FLImagingImgProcBase/Moment.h:784
bool m_bCalcNormalizedCentralMoment
Definition FLImagingImgProcBase/Moment.h:811
virtual const CResult EnableCentralMoment(bool bCalc=true)
virtual const CResult ReportToCSV(const CReportDescriptorForMoment &wrd) const
virtual const CResult AddZernike(int32_t i32N, int32_t i32M, uint64_t u64ZernikeRadius=0, bool bInscribedCircle=true)
virtual const CResult Execute()
bool m_bCalcCentroidMoment
Definition FLImagingImgProcBase/Moment.h:793
virtual bool IsBinaryImageEnabled() const
virtual const CResult GetZernike(CMoment::SZernike &zernike, int64_t i64Index=0, int64_t i64Channel=0) const
virtual const CResult Clear() override
const CMoment & operator=(const CMoment &Moment)
virtual const CResult EnableCentroidMoment(bool bCalc=true)
virtual bool IsHuMomentEnabled() const
virtual const CResult EnableBinaryImage(bool bBinaryImage=true)
static const CResult GetContoursMatchL1(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double &f64Result)
virtual int64_t GetZernikeCount() const
CMoment(const CMoment &Moment)
virtual const CResult GetMoment(CMoment::SMoments *pMoments, int64_t i64Channel=0) const
virtual bool IsLicenseAvailable() const override
Returns whether the algorithm can be used with the current license.
virtual const CResult EnableNormalizedCentralMoment(bool bCalc=true)
virtual const CResult Assign(const CMoment &aib)
static const CResult GetContoursMatchL1(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double *pF64Result)
bool m_bCalcCentralMoment
Definition FLImagingImgProcBase/Moment.h:802
virtual bool IsGeometricMomentEnabled() const
static const CResult GetContoursMatchL2(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double *pF64Result)
virtual const CResult EnableGeometricMoment(bool bCalc=true)
static const CResult GetContoursMatchL2(const CMoment::SHuMoment sHuMoment1, const CMoment::SHuMoment sHuMoment2, double &f64Result)
virtual bool IsCentralMomentEnabled() const
virtual const CResult ReportToCSV(const Foundation::CReportDescriptor *pWrd) const override
The execution result of the algorithm is recorded in a file according to the options recorded in the ...
virtual const CResult ClearZernike()
virtual const CResult EnableHuMoment(bool bCalc=true)
virtual const CResult ReportToCSV(const CReportDescriptorForMoment *pWrd) const
ReportDescriptorForMoment class.
Definition FLImagingImgProcBase/ReportDescriptorForMoment.h:23
Definition FLImagingImgProcBase/AbsoluteThreshold.h:25
central moment structure
Definition FLImagingImgProcBase/Moment.h:187
double f64CentralM03
Definition FLImagingImgProcBase/Moment.h:197
double f64CentralM02
Definition FLImagingImgProcBase/Moment.h:193
double f64CentralM01
Definition FLImagingImgProcBase/Moment.h:190
double f64CentralM00
Definition FLImagingImgProcBase/Moment.h:188
double f64CentralM21
Definition FLImagingImgProcBase/Moment.h:195
double f64CentralM30
Definition FLImagingImgProcBase/Moment.h:194
double f64CentralM12
Definition FLImagingImgProcBase/Moment.h:196
double f64CentralM20
Definition FLImagingImgProcBase/Moment.h:191
double f64CentralM11
Definition FLImagingImgProcBase/Moment.h:192
double f64CentralM10
Definition FLImagingImgProcBase/Moment.h:189
centroid moment structure
Definition FLImagingImgProcBase/Moment.h:170
double f64CentroidX
Definition FLImagingImgProcBase/Moment.h:171
double f64CentroidY
Definition FLImagingImgProcBase/Moment.h:172
geometric moment structure
Definition FLImagingImgProcBase/Moment.h:145
double f64GeometricM01
Definition FLImagingImgProcBase/Moment.h:148
double f64GeometricM11
Definition FLImagingImgProcBase/Moment.h:150
double f64GeometricM21
Definition FLImagingImgProcBase/Moment.h:153
double f64GeometricM20
Definition FLImagingImgProcBase/Moment.h:149
double f64GeometricM10
Definition FLImagingImgProcBase/Moment.h:147
double f64GeometricM02
Definition FLImagingImgProcBase/Moment.h:151
double f64GeometricM12
Definition FLImagingImgProcBase/Moment.h:154
double f64GeometricM00
Definition FLImagingImgProcBase/Moment.h:146
double f64GeometricM03
Definition FLImagingImgProcBase/Moment.h:155
double f64GeometricM30
Definition FLImagingImgProcBase/Moment.h:152
invariant moment structure
Definition FLImagingImgProcBase/Moment.h:237
double f64Hu0
Definition FLImagingImgProcBase/Moment.h:238
double f64Hu3
Definition FLImagingImgProcBase/Moment.h:241
double f64Hu6
Definition FLImagingImgProcBase/Moment.h:244
double f64Hu4
Definition FLImagingImgProcBase/Moment.h:242
double f64Hu5
Definition FLImagingImgProcBase/Moment.h:243
double f64Hu1
Definition FLImagingImgProcBase/Moment.h:239
double f64Hu2
Definition FLImagingImgProcBase/Moment.h:240
moment structure
Definition FLImagingImgProcBase/Moment.h:269
SCentralMoment sCentralMoments
Definition FLImagingImgProcBase/Moment.h:272
SNormalizedCentralMoment sNormalizedCentralMoments
Definition FLImagingImgProcBase/Moment.h:273
SCentroid sCentroidMoment
Definition FLImagingImgProcBase/Moment.h:271
SHuMoment sHuMoments
Definition FLImagingImgProcBase/Moment.h:274
SGeometricMoment sGeometricMoments
Definition FLImagingImgProcBase/Moment.h:270
normalized central moment structure
Definition FLImagingImgProcBase/Moment.h:212
double f64NormalizedCentralM12
Definition FLImagingImgProcBase/Moment.h:221
double f64NormalizedCentralM10
Definition FLImagingImgProcBase/Moment.h:214
double f64NormalizedCentralM11
Definition FLImagingImgProcBase/Moment.h:217
double f64NormalizedCentralM00
Definition FLImagingImgProcBase/Moment.h:213
double f64NormalizedCentralM21
Definition FLImagingImgProcBase/Moment.h:220
double f64NormalizedCentralM02
Definition FLImagingImgProcBase/Moment.h:218
double f64NormalizedCentralM01
Definition FLImagingImgProcBase/Moment.h:215
double f64NormalizedCentralM30
Definition FLImagingImgProcBase/Moment.h:219
double f64NormalizedCentralM03
Definition FLImagingImgProcBase/Moment.h:222
double f64NormalizedCentralM20
Definition FLImagingImgProcBase/Moment.h:216
Definition FLImagingImgProcBase/Moment.h:285
int32_t i32N
Definition FLImagingImgProcBase/Moment.h:286
bool bInscribedCircle
Definition FLImagingImgProcBase/Moment.h:303
uint64_t u64Radius
Definition FLImagingImgProcBase/Moment.h:295
double f64ZernikeReal
Definition FLImagingImgProcBase/Moment.h:311
int32_t i32M
Definition FLImagingImgProcBase/Moment.h:287
double f64ZernikeImag
Definition FLImagingImgProcBase/Moment.h:319