|
Ocean
|
This class implements the basic functions for least square or robust optimization algorithms for non linear functions. More...
#include <NonLinearOptimization.h>
Data Structures | |
| class | AdvancedDenseOptimizationProvider |
| This class implements the base for an advanced dense optimization provider. More... | |
| class | AdvancedSparseOptimizationProvider |
| This class implements the base class for an advanced sparse optimization provider. More... | |
| class | CorrespondenceGroupsAccessor |
| This class implements the base class for an accessor of groups of pairs. More... | |
| class | ObjectPointGroupsAccessor |
| This class implements an abstract specialization of the accessor for groups of pairs for object points. More... | |
| class | ObjectPointToPoseIndexImagePointCorrespondenceAccessor |
| This class implements a group accessor providing access to pairs of poses and image points. More... | |
| class | OptimizationProvider |
| This class implements the base optimization provider. More... | |
| class | PoseGroupsAccessor |
| This class implements an abstract specialization of the accessor for groups of pairs for poses. More... | |
Static Public Member Functions | |
| template<typename T > | |
| static bool | denseOptimization (T &provider, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), Scalar *initialError=nullptr, Scalar *finalError=nullptr, const Matrix *invertedCovariances=nullptr, Scalars *intermediateErrors=nullptr) |
| Invokes the optimization of a dense (matrix) optimization problem. | |
| template<typename T , Estimator::EstimatorType tEstimator> | |
| static bool | denseOptimization (T &provider, const unsigned int iterations=5u, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), Scalar *initialError=nullptr, Scalar *finalError=nullptr, const Matrix *invertedCovariances=nullptr, Scalars *intermediateErrors=nullptr) |
| Invokes the optimization of a dense (matrix) optimization problem. | |
| template<typename T > | |
| static bool | sparseOptimization (T &provider, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), Scalar *initialError=nullptr, Scalar *finalError=nullptr, const Matrix *invertedCovariances=nullptr, Scalars *intermediateErrors=nullptr) |
| Invokes the optimization of a sparse (matrix) optimization problem. | |
| template<typename T , Estimator::EstimatorType tEstimator> | |
| static bool | sparseOptimization (T &provider, const unsigned int iterations=5u, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), Scalar *initialError=nullptr, Scalar *finalError=nullptr, const Matrix *invertedCovariances=nullptr, Scalars *intermediateErrors=nullptr) |
| Invokes the optimization of a sparse (matrix) optimization problem. | |
| template<typename T > | |
| static bool | advancedDenseOptimization (T &advancedDenseProvider, const unsigned int iterations, Scalar lambda, const Scalar lambdaFactor, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
| Invokes the optimization of a dense (matrix) optimization problem using an advanced optimization provider. | |
| template<typename T > | |
| static bool | advancedSparseOptimization (T &advancedSparseProvider, const unsigned int iterations, Scalar lambda, const Scalar lambdaFactor, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
| Invokes the optimization of a sparse (matrix) optimization problem using an advanced optimization provider. | |
| template<Estimator::EstimatorType tEstimator> | |
| static Scalar | sqrErrors2robustErrors2 (const Scalars &sqrErrors, const size_t modelParameters, Vector2 *weightedErrors, Vector2 *weightVectors, const SquareMatrix2 *transposedInvertedCovariances) |
| Translates the n/2 squared errors that correspond to n elements in the error vector to robust errors. | |
| template<Estimator::EstimatorType tEstimator, size_t tDimension> | |
| static Scalar | sqrErrors2robustErrors (const Scalars &sqrErrors, const size_t modelParameters, StaticBuffer< Scalar, tDimension > *weightedErrors, StaticBuffer< Scalar, tDimension > *weightVectors, const Matrix *transposedInvertedCovariances) |
| Translates the n/i squared errors that correspond to n elements in the error vector to robust errors. | |
| template<Estimator::EstimatorType tEstimator> | |
| static Scalar | sqrErrors2robustErrors_i (const Scalars &sqrErrors, const size_t modelParameters, const size_t dimension, Scalar *weightedErrors_i, Scalar *weightVectors_i, const Matrix *transposedInvertedCovariances_i) |
| Translates the n/i squared errors that correspond to n elements in the error vector to robust errors. | |
| static Scalar | sqrErrors2robustErrors2 (const Estimator::EstimatorType estimator, const Scalars &sqrErrors, const size_t modelParameters, Vector2 *weightedErrors, Vector2 *weightVectors, const SquareMatrix2 *transposedInvertedCovariances) |
| Translates the n/2 squared errors that correspond to n elements in the error vector to robust errors. | |
| template<size_t tDimension> | |
| static Scalar | sqrErrors2robustErrors (const Estimator::EstimatorType estimator, const Scalars &sqrErrors, const size_t modelParameters, StaticBuffer< Scalar, tDimension > *weightedErrors, StaticBuffer< Scalar, tDimension > *weightVectors, const Matrix *transposedInvertedCovariances) |
| Translates the n/i squared errors that correspond to n elements in the error vector to robust errors. | |
| static Scalar | sqrErrors2robustErrors_i (const Estimator::EstimatorType estimator, const Scalars &sqrErrors, const size_t modelParameters, const size_t dimension, Scalar *weightedErrors_i, Scalar *weightVectors_i, const Matrix *transposedInvertedCovariances_i) |
| Translates the n/i squared errors that correspond to n elements in the error vector to robust errors. | |
Friends | |
| template<unsigned int , unsigned int , unsigned int > | |
| class | NonLinearUniversalOptimizationDense |
This class implements the basic functions for least square or robust optimization algorithms for non linear functions.
The actual optimization algorithms are located in derived functions.
|
static |
Invokes the optimization of a dense (matrix) optimization problem using an advanced optimization provider.
The optimization can use a Levenberg-Marquardt approach or a Gauss-Newton approach.
| advancedDenseProvider | The advanced dense optimization provider that is used during the optimization |
| iterations | Number of optimization iterations |
| lambda | Initial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity), 0 to apply a Gauss-Newton optimization approach |
| lambdaFactor | Levenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity), 1 to apply a Gauss-Newton optimization approach |
| initialError | Optional resulting averaged robust (depending on estimator) pixel error for the given initial parameters |
| finalError | Optional resulting averaged robust (depending on estimator) pixel error for the final optimized parameters |
| intermediateErrors | Optional resulting intermediate (improving) errors |
| T | Data type of the advanced dense optimization provider, must be derived from AdvancedDenseOptimizationProvider |
Now the provider will determine the (n x n) Hessian matrix and the (n x 1) Jacobian-Error matrix, may be the approximated Hessian. The Hessian matrix is calculated by J^T * J. The Jacobian-Error matrix is calculated by J^T * E, with E the error vector. The model has dimension n.
|
static |
Invokes the optimization of a sparse (matrix) optimization problem using an advanced optimization provider.
The optimization can use a Levenberg-Marquardt approach or a Gauss-Newton approach.
| advancedSparseProvider | The advanced sparse optimization provider that is used during the optimization |
| iterations | Number of optimization iterations |
| lambda | Initial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity), 0 to apply a Gauss-Newton optimization approach |
| lambdaFactor | Levenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity), 1 to apply a Gauss-Newton optimization approach |
| initialError | Optional resulting averaged robust (depending on estimator) pixel error for the given initial parameters |
| finalError | Optional resulting averaged robust (depending on estimator) pixel error for the final optimized parameters |
| intermediateErrors | Optional resulting intermediate (improving) errors |
| T | Data type of the advanced sparse optimization provider, must be derived from AdvancedSparseOptimizationProvider |
Now the provider will determine all parameters like the Jacobian, the transposed Jacobian, the Hessian and the Jacobian-Error matrix. However, the provider may also determine parts of the values or abstract information as long as the provider is able to solve the linear equation later.
|
inlinestatic |
Invokes the optimization of a dense (matrix) optimization problem.
| provider | The optimization provider that is used during the optimization |
| iterations | Number of optimization iterations |
| estimator | Robust estimator to be applied |
| lambda | Initial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity) |
| lambdaFactor | Levenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity) |
| initialError | Optional resulting averaged robust (depending on estimator) pixel error for the given initial parameters |
| finalError | Optional resulting averaged robust (depending on estimator) pixel error for the final optimized parameters |
| invertedCovariances | Optional set of inverted covariances that define the individual uncertainties of the measurements |
| intermediateErrors | Optional resulting intermediate (improving) errors in relation to the defined estimator |
| T | Data type of the optimization provider |
|
static |
Invokes the optimization of a dense (matrix) optimization problem.
| provider | The optimization provider that is used during the optimization |
| iterations | Number of optimization iterations |
| lambda | Initial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity) |
| lambdaFactor | Levenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity) |
| initialError | Optional resulting averaged robust (depending on estimator) pixel error for the given initial parameters |
| finalError | Optional resulting averaged robust (depending on estimator) pixel error for the final optimized parameters |
| invertedCovariances | Optional set of inverted covariances that define the individual uncertainties of the measurements |
| intermediateErrors | Optional resulting intermediate (improving) errors |
| T | Data type of the optimization provider |
| tEstimator | Type of the robust estimator to be applied |
|
static |
Invokes the optimization of a sparse (matrix) optimization problem.
| provider | The optimization provider that is used during the optimization |
| iterations | Number of optimization iterations |
| estimator | Robust estimator to be applied |
| lambda | Initial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity) |
| lambdaFactor | Levenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity) |
| initialError | Optional resulting averaged robust (depending on estimator) pixel error for the given initial parameters |
| finalError | Optional resulting averaged robust (depending on estimator) pixel error for the final optimized parameters |
| invertedCovariances | Optional set of inverted covariances that define the individual uncertainties of the measurements |
| intermediateErrors | Optional resulting intermediate (improving) errors |
| T | Data type of the optimization provider |
|
static |
Invokes the optimization of a sparse (matrix) optimization problem.
| provider | The optimization provider that is used during the optimization |
| iterations | Number of optimization iterations |
| lambda | Initial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity) |
| lambdaFactor | Levenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity) |
| initialError | Optional resulting averaged robust (depending on estimator) pixel error for the given initial parameters |
| finalError | Optional resulting averaged robust (depending on estimator) pixel error for the final optimized parameters |
| invertedCovariances | Optional set of inverted covariances that define the individual uncertainties of the measurements |
| intermediateErrors | Optional resulting intermediate (improving) errors |
| T | Data type of the optimization provider |
| tEstimator | Type of the robust estimator to be applied |
|
inlinestatic |
Translates the n/i squared errors that correspond to n elements in the error vector to robust errors.
| estimator | Robust error estimator to be used |
| sqrErrors | The n/i squared errors |
| modelParameters | Number of parameters that define the model that has to be optimized |
| weightedErrors | Initial n errors that will be translated to robust errors |
| weightVectors | The n individual weights that have been applied to the errors |
| transposedInvertedCovariances | Optional transposed ixi inverted covariance matrices, one for each pair of errors |
| tDimension | Dimension of one error element |
|
static |
Translates the n/i squared errors that correspond to n elements in the error vector to robust errors.
| sqrErrors | The n/i squared errors |
| modelParameters | Number of parameters that define the model that has to be optimized |
| weightedErrors | Initial n errors that will be translated to robust errors |
| weightVectors | The n individual weights that have been applied to the errors |
| transposedInvertedCovariances | Optional transposed ixi inverted covariance matrices, one for each pair of errors |
| tEstimator | Robust error estimator to be used |
| tDimension | Dimension of one error element |
|
inlinestatic |
Translates the n/2 squared errors that correspond to n elements in the error vector to robust errors.
| estimator | Robust error estimator to be used |
| sqrErrors | The n/2 squared errors |
| modelParameters | Number of parameters that define the model that has to be optimized |
| weightedErrors | Initial n errors that will be translated to robust errors |
| weightVectors | The n individual weights that have been applied to the errors |
| transposedInvertedCovariances | Optional transposed 2x2 inverted covariance matrices, one for each pair of errors |
|
static |
Translates the n/2 squared errors that correspond to n elements in the error vector to robust errors.
| sqrErrors | The n/2 squared errors |
| modelParameters | Number of parameters that define the model that has to be optimized |
| weightedErrors | Initial n errors that will be translated to robust errors |
| weightVectors | The n individual weights that have been applied to the errors |
| transposedInvertedCovariances | Optional transposed 2x2 inverted covariance matrices, one for each pair of errors |
| tEstimator | Robust error estimator to be used |
|
inlinestatic |
Translates the n/i squared errors that correspond to n elements in the error vector to robust errors.
| estimator | Robust error estimator to be used |
| sqrErrors | The n/i squared errors |
| modelParameters | Number of parameters that define the model that has to be optimized |
| dimension | The dimension of one error element, with range [1, infinity) |
| weightedErrors_i | Initial n errors that will be translated to robust errors |
| weightVectors_i | The n individual weights that have been applied to the errors |
| transposedInvertedCovariances_i | Optional transposed ixi inverted covariance matrices, one for each pair of errors |
|
static |
Translates the n/i squared errors that correspond to n elements in the error vector to robust errors.
| sqrErrors | The n/i squared errors |
| modelParameters | Number of parameters that define the model that has to be optimized |
| dimension | The dimension of one error element, with range [1, infinity) |
| weightedErrors_i | Initial n errors that will be translated to robust errors |
| weightVectors_i | The n individual weights that have been applied to the errors |
| transposedInvertedCovariances_i | Optional transposed ixi inverted covariance matrices, one for each pair of errors |
| tEstimator | Robust error estimator to be used |
|
friend |