![]() |
Visual Servoing Platform version 3.6.0
|
#include <vpRobust.h>
Public Types | |
| enum | vpRobustEstimatorType { TUKEY , CAUCHY , HUBER } |
Public Member Functions | |
| vpRobust () | |
| vpRobust (const vpRobust &other) | |
| virtual | ~vpRobust () |
| double | getMedianAbsoluteDeviation () |
| double | getMinMedianAbsoluteDeviation () |
| void | MEstimator (const vpRobustEstimatorType method, const vpColVector &residues, vpColVector &weights) |
| vpRobust & | operator= (const vpRobust &other) |
| vpRobust & | operator= (const vpRobust &&other) |
| void | setMinMedianAbsoluteDeviation (double mad_min) |
Deprecated functions | |
| vp_deprecated | vpRobust (unsigned int n_data) |
| void | MEstimator (const vpRobustEstimatorType method, const vpColVector &residues, const vpColVector &all_residues, vpColVector &weights) |
| vp_deprecated void | setIteration (unsigned int iter) |
| vp_deprecated void | setThreshold (double mad_min) |
| vp_deprecated vpColVector | simultMEstimator (vpColVector &residues) |
Contains an M-estimator and various influence function.
This class implements an M-estimator with Tukey, Cauchy or Huber influence function [PhDComport] which allow uncertain measures to be less likely considered and in some cases completely rejected, thus inferring that the data is not normally distributed.
When using a robust estimate of the mean, it is usual to normalize the distribution to center the data around zero. In the case of a median operator, the normalized residue is given by:



The Median Absolute Deviation (MAD) representing one standard deviation of the normal distribution is given by:
![\[ \sigma = 1.48 \; {Med}(|\overline{r_i}|) \]](form_306.png)
This class allows to set the minimum value of 
This estimated standard deviation 
Let us consider the weight function 



![\[ w(r_i) = \left\{ \begin{array}{ll} 1 &
\mbox{if } |r_i| \leq a \\ \frac{a}{|r_i|} & \mbox{else} \end{array} \right. \]](form_310.png)


![\[ w(r_i) = \left\{ \begin{array}{ll} {\left(1 - {\left(\frac{r_i}{b}\right)}^2 \right)}^2 &
\mbox{if } |r_i| \leq b \\ 0 & \mbox{else} \end{array} \right. \]](form_313.png)


![\[ w(r_i) = \frac{1}{(1 + {(r_i/c)}^2)} \]](form_316.png)
Given the influence function and the residual vector, the weights are updated in MEstimator().
Definition at line 82 of file vpRobust.h.
Enumeration of influence functions.
| Enumerator | |
|---|---|
| TUKEY | Tukey influence function. |
| CAUCHY | Cauchy influence function. |
| HUBER | Huber influence function. |
Definition at line 86 of file vpRobust.h.
| vpRobust::vpRobust | ( | ) |
Default constructor.
Definition at line 59 of file vpRobust.cpp.
| vpRobust::vpRobust | ( | const vpRobust & | other | ) |
Copy constructor.
Definition at line 71 of file vpRobust.cpp.
|
inlinevirtual |
Destructor.
Definition at line 118 of file vpRobust.h.
|
explicit |
| n_data | : Size of the data vector. |
Definition at line 312 of file vpRobust.cpp.
References vpColVector::resize(), and vpCDEBUG.
|
inline |
Return residual vector Median Absolute Deviation (MAD). This value is updated after a call to MEstimator(). It corresponds to value of 
Definition at line 129 of file vpRobust.h.
|
inline |
Return the min value used to threshold residual vector Median Absolute Deviation (MAD). This value corresponds to the mimimal value of 
Definition at line 137 of file vpRobust.h.
| void vpRobust::MEstimator | ( | const vpRobustEstimatorType | method, |
| const vpColVector & | residues, | ||
| const vpColVector & | all_residues, | ||
| vpColVector & | weights | ||
| ) |
Compute the weights according a residue vector and a PsiFunction.
Definition at line 327 of file vpRobust.cpp.
References CAUCHY, vpArray2D< Type >::getRows(), HUBER, TUKEY, and vpCDEBUG.
| void vpRobust::MEstimator | ( | const vpRobustEstimatorType | method, |
| const vpColVector & | residues, | ||
| vpColVector & | weights | ||
| ) |
Calculate an M-estimate given a particular influence function using MAD (Median Absolute Deviation) as a scale estimate at each iteration.
| [in] | method | : Type of influence function. |
| [in] | residues | : Vector of residues ![]() |
| [out] | weights | : Vector of weights ![]() |
Definition at line 137 of file vpRobust.cpp.
References CAUCHY, vpArray2D< Type >::getRows(), HUBER, vpColVector::resize(), and TUKEY.
Referenced by vpMbEdgeKltTracker::computeVVS(), vpMbEdgeTracker::computeVVSWeights(), vpMbTracker::computeVVSWeights(), vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobust(), vpPose::poseVirtualVSrobust(), and vpHomography::robust().
Move operator.
Definition at line 95 of file vpRobust.cpp.
Copy operator.
Definition at line 76 of file vpRobust.cpp.
|
inline |
| iter | : The first call iter should be set to 0. |
Definition at line 170 of file vpRobust.h.
|
inline |
Set minimal median absolute deviation (MAD) value corresponding to the mimimal value of 

| mad_min | : Minimal Median Absolute Deviation value. Default value is set to 0.0017 in the default constructor. |
Definition at line 155 of file vpRobust.h.
Referenced by vpMbEdgeKltTracker::computeVVS(), vpMbDepthNormalTracker::computeVVSInit(), vpMbEdgeTracker::computeVVSInit(), vpMbKltTracker::computeVVSInit(), vpMeLine::leastSquare(), vpMeEllipse::leastSquareRobust(), and vpPose::poseVirtualVSrobust().
|
inline |
| mad_min | : Minimal Median Absolute Deviation value. Default value is set to 0.0017 in the default constructor. |
Definition at line 179 of file vpRobust.h.
| vpColVector vpRobust::simultMEstimator | ( | vpColVector & | residues | ) |
| [in] | residues | : Vector of residues. The content of the vector is changed. |
Definition at line 421 of file vpRobust.cpp.
References vpArray2D< Type >::getRows().