![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
Parametric model estimation. More...
Modules | |
| Geometric estimation 2d | |
| Parametric model estimation in geometric 2d case. | |
| Geometric estimation 3d | |
| Parametric model estimation in geometric 3d case. | |
Classes | |
| class | ipsdk::math::BaseEstimator |
| Base class for parametric estimation from data set. More... | |
| class | ipsdk::math::BaseRobustEstimator |
| Base class for parametric robust estimation from data set. More... | |
| class | ipsdk::math::EstimationConfig |
| Configuration structure used for estimation management. More... | |
| class | ipsdk::math::EstimationResults |
| Structure allowing to encapsulate robust estimation results. More... | |
| class | ipsdk::math::LMSRobustEstimator |
| Robust Least Mean Square estimatorThis algorithm do not request any threshold for model estimation. It has an outlier ratio upper bound at 50% (<50%) More... | |
| class | ipsdk::math::MLESACRobustEstimator |
| Robust Maximum Likelihood Estimation SAmple Consensus estimatorThis algorithm request a threshold value on residuals of model estimation. It has no outlier ratio upper bound. More... | |
| class | ipsdk::math::MSACRobustEstimator |
| Robust M-estimator SAmple Consensus estimatorThis algorithm request a threshold value on residuals of model estimation. It has no outlier ratio upper bound. More... | |
| class | ipsdk::math::RANSACRobustEstimator |
| Robust RANdom SAmple Consensus estimatorThis algorithm request a threshold value on residuals of model estimation. It has no outlier ratio upper bound. More... | |
Functions | |
| IPSDKMATH_API void | ipsdk::math::processEstimation (const EstimationConfig &config, const EstimatorPtr &pEstimator, const DataSet &inputDataSet, EstimationResults &results) |
| function allowing to launch a robust estimation process More... | |
| IPSDKMATH_API void | ipsdk::math::processEstimation (const EstimationConfig &config, const EstimatorPtr &pEstimator, const CostFunCreator &costFunCreator, const DataSet &inputDataSet, EstimationResults &results) |
| function allowing to launch a robust estimation process completed with a non linear estimation More... | |
Parametric model estimation.
This section deals with processes allowing to estimate the values of model parameters based on measured data.
It will give some theorical and practical basis on parametric estimation under IPSDK. User should take a look to examples to start with these features.
A basic example of model parameter estimator is the case where an input cloud of 2d points is used to estimate parameters of underlying line 2d :
In this case we use input 2d points coordinates
to compute line parameters
and
where points coordinates are supposed to respect the following equation :
A more realistic version of previous problem is illustrated by following figure :
where input 2d points are issued from a measure and do not perfectly fit searched 2d line.
A common assumption in this case is to consider that input measures are perturbated with an additive white gaussian noise :
with :
the theorical (perfect) coordinates of point 
the measured coordinates of point 
a random white gaussian noise with
standard deviationUnder this assumption, we can use technics such as linear least square regression to solve for model parameters. Such technics suppose that we are able to define a cost function
which can be used to quantify an error between an input data set and parameters of an estimated model :
with :
the input data set
the model parameters
the residuals which is defined as the distance from input data
to estimated model as define by model parameters
.In case of 2d lines,
is define by
and
parameters and we can simply use orthogonal distance from input 2d points to estimated the line 2d as cost function :
Least square regression will then compute optimal (minimal) solution of following problem :
This cost function allows to derive the 'root mean square' (RMS) value associated to an estimation :
This value can be used as a measure quality indicator.
This process can be represented by following diagram :
A more complete description of Estimation theory and of linear regression concepts can be found here :
Suppose now that input data, in addition to an additive white gaussian noise, can be affected by outliers. Which means that we modify measured data definition as :
with
a perturbation which will be take following value :
probability)
in case of an outlier (with
probability)In this case previous technics may completly failed since input data are no more simply ruled by white gaussian noise hypothesis :
In this case we can see that two outlier points introduce a strong bias in line 2d parameters estimation.
Such failure cases can be handle using robust estimation technics, which allow to detect outlier data and to remove it from estimation process :
Red points stand for detected outliers in previous figure.
This process can be represented by following diagram :
The following robust estimators are available for processing :
This algorithm do not need any assumption on a threshold value on residuals allowing to separate inliers and outlier. It has an outlier ratio break down point at 0.5 (this means that input collection should strictly contains less than 50% of outliers).
This algorithm has the advantage to have no theorical outlier ratio break down point but uses an input user threshold value to separate inliers and outlier. This is historically the first version of this kind of algorithms. We recommand to use MSAC or MLESAC sub versions of this algorithm.
This algorithm has the same properties as RANSAC algorithm but is more efficient for outliers filtering.
This is the more complex version of algorithms derived from RANSAC. It is more efficient than MSAC version but is a bit slower and more complex to configure.
Robust estimation is based on statistical random sub sampling of input data set with minimal size regards to solved problem.
In the case of a 2d line, a robust process will sample several couples of points. For each pairs a 2d line will be estimated and residuals on global input data set will be computed.
It is easy to see that random sampling of closed points is often a bad idea :
To avoid such cases, we use a data partition policy which will associate to each input data a bucket. During robust estimation sub sampling stages we will then randomly choose a bucket and then randomly choose a data inside it with the guarantee that each random data for a given sub sampling are issued from a separate bucket.
We provide to algorithms for data partition:
Each axis is then divided into nbBucketsByAxis constant sized buckets between minimum and maximum data range along considered axis.
Each axis is once again divided into nbBucketsByAxis buckets between minimum and maximum data range but in this case each bucket contains a constant quantile of data for considered axis.
| IPSDKMATH_API void ipsdk::math::processEstimation | ( | const EstimationConfig & | config, |
| const EstimatorPtr & | pEstimator, | ||
| const DataSet & | inputDataSet, | ||
| EstimationResults & | results | ||
| ) |
function allowing to launch a robust estimation process
| ipsdk::math::IPSDKMathException | if pEstimator.get() == 0 || pEstimator->isInit() == false |
| ipsdk::math::IPSDKMathException | if config.isInit() == false |
| IPSDKMATH_API void ipsdk::math::processEstimation | ( | const EstimationConfig & | config, |
| const EstimatorPtr & | pEstimator, | ||
| const CostFunCreator & | costFunCreator, | ||
| const DataSet & | inputDataSet, | ||
| EstimationResults & | results | ||
| ) |
function allowing to launch a robust estimation process completed with a non linear estimation
| ipsdk::math::IPSDKMathException | if pEstimator.get() == 0 || pEstimator->isInit() == false |
| ipsdk::math::IPSDKMathException | if costFunCreator returns a null shared pointer |
| ipsdk::math::IPSDKMathException | if config.isInit() == false |
1.8.14