Ocean
|
This class implements robust estimator functions. More...
Public Types | |
enum | EstimatorType : uint32_t { ET_INVALID = 0u , ET_SQUARE , ET_LINEAR , ET_HUBER , ET_TUKEY , ET_CAUCHY } |
Definition of individual robust estimator types. More... | |
using | EstimatorTypes = std::vector< EstimatorType > |
Definition of a vector holding estimator types. More... | |
Static Public Member Functions | |
template<EstimatorType tEstimator> | |
static constexpr bool | needSigma () |
Returns whether an estimator needs a standard deviation for computation. More... | |
template<EstimatorType tEstimator> | |
static constexpr bool | isStandardEstimator () |
Returns whether an estimator is the standard square error estimator. More... | |
static bool | isStandardEstimator (const EstimatorType estimator) |
Returns whether an estimator is the standard square error estimator. More... | |
static bool | needSigma (const EstimatorType estimator) |
Returns whether a given estimator needs a standard deviation for computation. More... | |
template<EstimatorType tEstimator> | |
static Scalar | robustError (const Scalar value, const Scalar sigma=0) |
Returns the robust error of a residual error for a specified estimator. More... | |
static Scalar | robustError (const Scalar value, const Scalar sigma, const EstimatorType estimator) |
Returns the robust error of a given residual error for a specified estimator. More... | |
template<EstimatorType tEstimator> | |
static Scalar | robustErrorSquare (const Scalar sqrValue, const Scalar sqrSigma=0) |
Returns the robust error of a squared residual error for a specified estimator. More... | |
static Scalar | robustErrorSquare (const Scalar sqrValue, const Scalar sqrSigma, const EstimatorType estimator) |
Returns the robust error of a given squared residual error for a specified estimator. More... | |
template<EstimatorType tEstimator> | |
static Scalar | robustWeight (const Scalar value, const Scalar sigma=0) |
Returns the weight in relation to a error for a given residual error and a specified estimator. More... | |
static Scalar | robustWeight (const Scalar value, const Scalar sigma, const EstimatorType estimator) |
Returns the weight in relation to a error for a given residual error and a specified estimator. More... | |
template<EstimatorType tEstimator> | |
static Scalar | robustWeightSquare (const Scalar sqrValue, const Scalar sqrSigma=0) |
Returns the weight in relation to a squared error for a given residual error and a specified estimator. More... | |
static Scalar | robustWeightSquare (const Scalar sqrValue, const Scalar sqrSigma, const EstimatorType estimator) |
Returns the weight in relation to a squared error for a given residual error and a specified estimator. More... | |
template<EstimatorType tEstimator> | |
static Scalar | determineSigma (const Scalar *errors, const size_t number, const size_t modelParameters) |
Determines the sigma for a specific set of residual errors and a specified estimator. More... | |
static Scalar | determineSigma (const Scalar *errors, const size_t number, const size_t modelParameters, const EstimatorType estimator) |
Determines the sigma for a specific set of residual errors and a specified estimator. More... | |
template<EstimatorType tEstimator> | |
static Scalar | determineSigma (const Scalar *errors, const unsigned int *indices, const size_t numberIndices, const size_t modelParameters) |
Determines the sigma for a specific subset of residual errors and a specified estimator. More... | |
static Scalar | determineSigma (const Scalar *errors, const unsigned int *indices, const size_t numberIndices, const size_t modelParameters, const EstimatorType estimator) |
Determines the sigma for a specific subset of residual errors and a specified estimator. More... | |
template<EstimatorType tEstimator> | |
static Scalar | determineSigmaSquare (const Scalar *sqrErrors, const size_t number, const size_t modelParameters) |
Determines the squared sigma for a specific set of squared residual errors and a specified estimator. More... | |
static Scalar | determineSigmaSquare (const Scalar *sqrErrors, const size_t number, const size_t modelParameters, const EstimatorType estimator) |
Determines the squared sigma for a specific set of squared residual errors and a specified estimator. More... | |
template<EstimatorType tEstimator> | |
static Scalar | determineSigmaSquare (const Scalar *sqrErrors, const unsigned int *indices, const size_t numberIndices, const size_t modelParameters) |
Determines the squared sigma for a specific set of squared residual errors and a specified estimator. More... | |
static Scalar | determineSigmaSquare (const Scalar *sqrErrors, const unsigned int *indices, const size_t numberIndices, const size_t modelParameters, const EstimatorType estimator) |
Determines the squared sigma for a specific set of squared residual errors and a specified estimator. More... | |
template<Estimator::EstimatorType tEstimator> | |
static Scalar | determineRobustError (const Scalar *sqrErrors, const size_t number, const size_t modelParameters) |
Determines the overall robust error for set of given squared errors, a specified estimator and the dimension of the model. More... | |
static constexpr Scalar | maximalWeight () |
Returns the maximal weight for any estimator which is used to clamp extremely high weights (for tiny errors). More... | |
static constexpr Scalar | invMaximalWeight () |
Returns the inverse maximal weight for any estimator which is used to clamp extremely high weights (for tiny errors). More... | |
static std::string | translateEstimatorType (const EstimatorType estimatorType) |
Translates a given estimator type into a readable string. More... | |
static EstimatorType | translateEstimatorType (const std::string &estimatorType) |
Translates a readable name of an estimator type to it's value. More... | |
static const EstimatorTypes & | estimatorTypes () |
Returns all existing valid estimator types. More... | |
Static Protected Member Functions | |
template<EstimatorType tEstimator> | |
static Scalar | sigmaTuningContstant () |
Returns the tuning constant allowing to determine a 95 percent efficiency on the standard normal distribution for individual estimators. More... | |
This class implements robust estimator functions.
See 'Parameter Estimation Techniques: A Tutorial with Application to Conic Fitting', Zhengyou Zhang, 1997 for detailed information.
using Ocean::Geometry::Estimator::EstimatorTypes = std::vector<EstimatorType> |
Definition of a vector holding estimator types.
enum Ocean::Geometry::Estimator::EstimatorType : uint32_t |
Definition of individual robust estimator types.
|
inlinestatic |
Determines the overall robust error for set of given squared errors, a specified estimator and the dimension of the model.
sqrErrors | The squared error values for which the overall robust error will be determined |
number | The number of provided squared error values, with range [1, infinity) |
modelParameters | Number of parameters that define the model that has to be optimized (the dimension of the model), with range [1, infinity) |
tEstimator | Robust error estimator to be used |
|
inlinestatic |
Determines the sigma for a specific set of residual errors and a specified estimator.
errors | Residual errors for that the corresponding sigma has to be determined |
number | The number of provided residual errors, with range [1, infinity) |
modelParameters | Number of the parameter that define the model |
tEstimator | Type of the estimator to use |
|
inlinestatic |
Determines the sigma for a specific set of residual errors and a specified estimator.
errors | Residual errors for that the corresponding sigma has to be determined |
number | The number of provided residual errors, with range [1, infinity) |
modelParameters | Number of the parameter that define the model |
estimator | Type of the estimator to use |
|
inlinestatic |
Determines the sigma for a specific subset of residual errors and a specified estimator.
errors | Residual errors for that the corresponding sigma has to be determined |
indices | Indices of the subset of the residual errors, beware: no range check is applied |
numberIndices | Number of provided indices, with range [1, infinity) |
modelParameters | Number of the parameter that define the model, with range [1, infinity) |
tEstimator | Type of the estimator to use |
|
inlinestatic |
Determines the sigma for a specific subset of residual errors and a specified estimator.
errors | Residual errors for that the corresponding sigma has to be determined |
indices | Indices of the subset of the residual errors, beware: no range check is applied |
numberIndices | Number of provided indices, with range [1, infinity) |
modelParameters | Number of the parameter that define the model |
estimator | Type of the estimator to use |
|
inlinestatic |
Determines the squared sigma for a specific set of squared residual errors and a specified estimator.
sqrErrors | Squared residual errors for that the corresponding sigma has to be determined |
number | The number of provided residual errors, with range [1, infinity) |
modelParameters | Number of the parameter that define the model |
tEstimator | Type of the estimator to use |
|
inlinestatic |
Determines the squared sigma for a specific set of squared residual errors and a specified estimator.
sqrErrors | Squared residual errors for that the corresponding sigma has to be determined |
number | The number of provided residual errors, with range [1, infinity) |
modelParameters | Number of the parameter that define the model |
estimator | Type of the estimator to use |
|
inlinestatic |
Determines the squared sigma for a specific set of squared residual errors and a specified estimator.
sqrErrors | Squared residual errors for that the corresponding sigma has to be determined |
indices | Indices of the subset of the residual errors, beware: no range check is applied |
numberIndices | Number of provided indices, with range [1, infinity) |
modelParameters | Number of the parameter that define the model |
tEstimator | Type of the estimator to use |
|
inlinestatic |
Determines the squared sigma for a specific set of squared residual errors and a specified estimator.
sqrErrors | Squared residual errors for that the corresponding sigma has to be determined |
indices | Indices of the subset of the residual errors, beware: no range check is applied |
numberIndices | Number of provided indices, with range [1, infinity) |
modelParameters | Number of the parameter that define the model |
estimator | Type of the estimator to use |
|
static |
Returns all existing valid estimator types.
|
staticconstexpr |
Returns the inverse maximal weight for any estimator which is used to clamp extremely high weights (for tiny errors).
|
staticconstexpr |
Returns whether an estimator is the standard square error estimator.
tEstimator | Estimator to check |
|
inlinestatic |
Returns whether an estimator is the standard square error estimator.
estimator | The estimator to check |
|
staticconstexpr |
Returns the maximal weight for any estimator which is used to clamp extremely high weights (for tiny errors).
|
staticconstexpr |
Returns whether an estimator needs a standard deviation for computation.
tEstimator | Estimator for that the dependency is requested |
|
inlinestatic |
Returns whether a given estimator needs a standard deviation for computation.
estimator | The estimator for that the dependency is requested |
|
inlinestatic |
Returns the robust error of a given residual error for a specified estimator.
value | Residual error to return the robust error for, with range (-infinity, infinity) |
sigma | Standard deviation of the expected residual error, with range (0, infinity) if 'needSigma(estimator) == false', otherwise 0 |
estimator | Type of the estimator to use |
|
inlinestatic |
Returns the robust error of a residual error for a specified estimator.
value | Residual error to return the robust error for, with range (-infinity, infinity) |
sigma | Standard deviation of the expected residual error, with range (0, infinity) if 'needSigma<tEstimator>() == false', otherwise 0 |
tEstimator | Type of the estimator to use |
|
inlinestatic |
Returns the robust error of a given squared residual error for a specified estimator.
sqrValue | Residual error to return the robust error for, with range [0, infinity) |
sqrSigma | Standard deviation of the expected residual error, with range (0, infinity) if 'needSigma(estimator) == false', otherwise 0 |
estimator | Type of the estimator to use |
|
inlinestatic |
Returns the robust error of a squared residual error for a specified estimator.
sqrValue | Squared residual error to return the robust error for, with range [0, infinity) |
sqrSigma | Standard deviation of the expected residual error, with range (0, infinity) if 'needSigma<tEstimator>() == false', otherwise 0 |
tEstimator | Type of the estimator to use |
|
inlinestatic |
Returns the weight in relation to a error for a given residual error and a specified estimator.
value | Residual error to return the weight for |
sigma | Standard deviation of the expected residual error |
estimator | Type of the estimator to use |
|
inlinestatic |
Returns the weight in relation to a error for a given residual error and a specified estimator.
value | Residual error to return the weight for |
sigma | Standard deviation of the expected residual error, beware: provide a valid standard deviation if necessary with range (0, infinity) |
tEstimator | Type of the estimator to use |
|
inlinestatic |
Returns the weight in relation to a squared error for a given residual error and a specified estimator.
sqrValue | Squared residual error to return the weight for |
sqrSigma | Squared standard deviation of the expected residual error |
estimator | Type of the estimator to use |
|
inlinestatic |
Returns the weight in relation to a squared error for a given residual error and a specified estimator.
sqrValue | Squared residual error to return the weight for |
sqrSigma | Squared standard deviation of the expected residual error, beware: provide a valid standard deviation if necessary with range (0, infinity) |
tEstimator | Type of the estimator to use |
|
inlinestaticprotected |
Returns the tuning constant allowing to determine a 95 percent efficiency on the standard normal distribution for individual estimators.
|
static |
Translates a given estimator type into a readable string.
estimatorType | The type of the estimator to translate |
|
static |
Translates a readable name of an estimator type to it's value.
estimatorType | The name of the estimator type for which the value will be returned |