IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
EstimationResults.h
1 // EstimationResults.h:
3 // --------------------
4 //
15 
16 #ifndef __IPSDKMATH_ESTIMATIONRESULTS_H__
17 #define __IPSDKMATH_ESTIMATIONRESULTS_H__
18 
19 // suppression warnings
20 // warning C4251: 'ipsdk::math::EstimationResults::_estimationStatus': class 'ipsdk::ProcessingResult<bool>' needs to have dll-interface to be used by clients of class 'ipsdk::math::EstimationResults'
21 #pragma warning (push)
22 #pragma warning (disable : 4251)
23 
26 #include <IPSDKMath/Estimation/EstimationConfig.h>
27 #include <IPSDKSerialization/Engine/BaseSerializationObject.h>
28 
29 namespace ipsdk {
30 namespace math {
31 
34 
36 {
37  // declare serial class
39 
40 public:
46 
47 // methods
48 public:
50  bool isInit() const;
51 
53  void initFailed(const EstimationConfig& config,
54  const ipUInt32 nbEstimParams,
55  const ipUInt32 inputDataSize,
56  const ipUInt32 nbMinDataForEstimation,
57  const ipUInt32 nbMinDataForRobustEstimation,
58  const ipUInt32 nbInputData,
59  const std::string& failureMessage);
60 
62  void initRobustSuccess(const EstimationConfig& config,
63  const ipUInt32 nbEstimParams,
64  const ipUInt32 inputDataSize,
65  const ipUInt32 nbMinDataForEstimation,
66  const ipUInt32 nbMinDataForRobustEstimation,
67  const ipUInt32 nbInputData,
68  const ParameterType& estimParams,
69  const ResidualsSet& residualsSet,
70  const OutlierFlags& outlierFlags,
71  const ipReal64 estimOutlierThreshold);
72 
74  void initSimpleSuccess(const EstimationConfig& config,
75  const ipUInt32 nbEstimParams,
76  const ipUInt32 inputDataSize,
77  const ipUInt32 nbMinDataForEstimation,
78  const ipUInt32 nbMinDataForRobustEstimation,
79  const ipUInt32 nbInputData,
80  const ParameterType& estimParams,
81  const ResidualsSet& residualsSet);
82 
86  const EstimationConfig& getEstimationConfig() const;
87 
91  ipUInt32 getNbEstimParams() const;
92 
97  ipUInt32 getInputDataSize() const;
98 
102  ipUInt32 getNbMinDataForEstimation() const;
103 
107  ipUInt32 getNbMinDataForRobustEstimation() const;
108 
112  ipUInt32 getNbInputData() const;
113 
117  const BoolResult& getEstimationStatus() const;
118 
123  bool hasRobustEstimationDone() const;
124 
128  const ParameterType& getEstimParams() const;
129 
133  const ResidualsSet& getResidualsSet() const;
134 
138  const OutlierFlags& getOutlierFlags() const;
139 
143  ipReal64 getEstimOutlierThreshold() const;
144 
148  ipReal64 getGlobalRms() const;
149 
153  ipReal64 getInliersRms() const;
154 
158  ipUInt32 getNbOutliers() const;
159 
163  ipUInt32 getNbInliers() const;
164 
168  ipReal64 getOutlierRatio() const;
169 
173  ipReal64 getInlierRatio() const;
174 
180  void updateNonLinearFailed(const std::string& failureMessage);
181  void updateNonLinearSuccess(const ParameterType& estimParams,
182  const ResidualsSet& residualsSet,
183  const ipUInt32 nbNonLinearIteration,
184  const std::string& warnMessage = "");
186 
191  ipUInt32 getNbNonLinearIteration() const;
192 
194  void clear();
195 
196 // attributes
197 protected:
199  bool _bInit;
200 
203 
206 
210 
213 
216 
219 
222 
226 
229 
232 
235 
238 
242 };
243 
246 
247 inline bool
249 {
250  return _bInit;
251 }
252 
255 
256 } // end of namespace math
257 } // end of namespace ipsdk
258 
259 #pragma warning (pop)
260 
261 #endif // __IPSDKMATH_ESTIMATIONRESULTS_H__
#define IPSDK_DECLARE_SERIAL_WITH_COPY(libraryName, className)
macro enabling serialization on class
Definition: SerializationHdrMacro.h:73
Vector ParameterType
parameter type resulting from estimation
Definition: EstimationTypes.h:61
Definition of import/export macro for library.
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
ipUInt32 _inputDataSize
Definition: EstimationResults.h:209
ipUInt32 _nbNonLinearIteration
Definition: EstimationResults.h:241
bool isInit() const
check whether objet has been initialized
Definition: EstimationResults.h:248
double ipReal64
Base types definition.
Definition: BaseTypes.h:57
bool _bInit
flag indicating whether object has been initialized
Definition: EstimationResults.h:199
ipUInt32 _nbMinDataForEstimation
minimum number of input data for a simple estimation
Definition: EstimationResults.h:212
ipUInt32 _nbInputData
number of input data available for estimation
Definition: EstimationResults.h:218
ipUInt32 _nbMinDataForRobustEstimation
minimum number of input data for a robust estimation
Definition: EstimationResults.h:215
Structure allowing to encapsulate robust estimation results.
Definition: EstimationResults.h:35
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27
OutlierFlags _outlierFlags
estimated outlier flags
Definition: EstimationResults.h:234
ParameterType _estimParams
estimated parameters
Definition: EstimationResults.h:228
ipUInt32 _nbEstimParams
number of estimated parameters
Definition: EstimationResults.h:205
BoolResult _estimationStatus
estimation status
Definition: EstimationResults.h:221
Configuration structure used for estimation management.
Definition: EstimationConfig.h:34
ipReal64 _estimOutlierThreshold
outlier threshold estimated during processing
Definition: EstimationResults.h:237
Predefined types for parametric estimation from data set.
std::vector< bool > OutlierFlags
collection of outliers flags
Definition: EstimationTypes.h:70
Vector ResidualsSet
residuals type resulting from estimation
Definition: EstimationTypes.h:64
bool _bRobustEstimationDone
Definition: EstimationResults.h:225
Base class for serializable class.
Definition: BaseSerializationObject.h:33
EstimationConfig _config
configuration object for processings
Definition: EstimationResults.h:202
uint32_t ipUInt32
Base types definition.
Definition: BaseTypes.h:53
ResidualsSet _residualsSet
estimation residuals
Definition: EstimationResults.h:231