Ocean
Ocean::Geometry::NonLinearOptimizationPose Class Reference

This class implements non linear optimization algorithms for camera poses. More...

Inheritance diagram for Ocean::Geometry::NonLinearOptimizationPose:

Static Public Member Functions

static bool optimizePose (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &world_T_camera, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, const bool distortImagePoints, HomogenousMatrix4 &world_T_optimizedCamera, const unsigned int iterations=20u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, Scalar *initialError=nullptr, Scalar *finalError=nullptr)
 Deprecated. More...
 
static bool optimizePose (const AnyCamera &anyCamera, const HomogenousMatrix4 &world_T_camera, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, HomogenousMatrix4 &world_T_optimizedCamera, const unsigned int iterations=20u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, Scalar *initialError=nullptr, Scalar *finalError=nullptr)
 Minimizes the projection error of a given 6DOF pose holding orientation and translation parameters for any camera. More...
 
static bool optimizePose (const AnyCamera &camera, const HomogenousMatrix4 &world_T_camera, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, HomogenousMatrix4 &world_T_optimizedCamera, const unsigned int iterations, const Estimator::EstimatorType estimator, Scalar lambda, const Scalar lambdaFactor, Scalar *initialError, Scalar *finalError, const Matrix *invertedCovariances)
 Minimizes the projection error of a given 6-DOF camera pose. More...
 
static bool optimizePose (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &world_T_camera, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, const bool distortImagePoints, HomogenousMatrix4 &world_T_optimizedCamera, const unsigned int iterations, const Estimator::EstimatorType estimator, Scalar lambda, const Scalar lambdaFactor, Scalar *initialError, Scalar *finalError, const Matrix *invertedCovariances)
 Deprecated. More...
 
static bool optimizePoseZoom (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &world_T_camera, const Scalar zoom, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, const bool distortImagePoints, HomogenousMatrix4 &world_T_optimizedCamera, Scalar &optimizedZoom, const unsigned int iterations=20u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, Scalar *initialError=nullptr, Scalar *finalError=nullptr, const Matrix *invertedCovariances=nullptr)
 Minimizes the projection error of a given 6DOF pose holding orientation and translation parameters together with a flexible zoom. More...
 
static bool optimizePoseIF (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &flippedCamera_T_world, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, const bool distortImagePoints, HomogenousMatrix4 &optimizedInvertedFlippedPose, const unsigned int iterations=20u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, Scalar *initialError=nullptr, Scalar *finalError=nullptr)
 Deprecated. More...
 
static bool optimizePoseIF (const AnyCamera &anyCamera, const HomogenousMatrix4 &flippedCamera_T_world, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, HomogenousMatrix4 &optimizedPose_flippedCamera_T_world, const unsigned int iterations=20u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, Scalar *initialError=nullptr, Scalar *finalError=nullptr)
 Minimizes the projection error of a given inverted and flipped 6DOF pose holding orientation and translation parameters for any camera. More...
 
static bool optimizePoseIF (const AnyCamera &camera, const HomogenousMatrix4 &flippedCamera_T_world, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, HomogenousMatrix4 &optimizedFlippedCamera_T_world, const unsigned int iterations, const Estimator::EstimatorType estimator, Scalar lambda, const Scalar lambdaFactor, Scalar *initialError, Scalar *finalError, const Matrix *invertedCovariances)
 Minimizes the projection error of a given 6-DOF camera pose. More...
 
static bool optimizePoseIF (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &flippedCamera_T_world, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, const bool distortImagePoints, HomogenousMatrix4 &optimizedInvertedFlippedPose, const unsigned int iterations, const Estimator::EstimatorType estimator, Scalar lambda, const Scalar lambdaFactor, Scalar *initialError, Scalar *finalError, const Matrix *invertedCovariances)
 Deprecated. More...
 
static bool optimizePoseZoomIF (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &flippedCamera_T_world, const Scalar zoom, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &imagePoints, const bool distortImagePoints, HomogenousMatrix4 &optimizedInvertedFlippedPose, Scalar &optimizedZoom, const unsigned int iterations=20u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, Scalar *initialError=nullptr, Scalar *finalError=nullptr, const Matrix *invertedCovariances=nullptr)
 Minimizes the projection error of a given inverted and flipped 6DOF pose holding orientation and translation parameters together with a flexible zoom. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from Ocean::Geometry::NonLinearOptimization
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

This class implements non linear optimization algorithms for camera poses.

Member Function Documentation

◆ optimizePose() [1/4]

bool Ocean::Geometry::NonLinearOptimizationPose::optimizePose ( const AnyCamera anyCamera,
const HomogenousMatrix4 world_T_camera,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
HomogenousMatrix4 world_T_optimizedCamera,
const unsigned int  iterations = 20u,
const Estimator::EstimatorType  estimator = Estimator::ET_SQUARE,
Scalar  lambda = Scalar(0.001),
const Scalar  lambdaFactor = 10,
Scalar initialError = nullptr,
Scalar finalError = nullptr 
)
inlinestatic

Minimizes the projection error of a given 6DOF pose holding orientation and translation parameters for any camera.

The given 6DOF pose is a standard extrinsic camera matrix.

Parameters
anyCameraThe camera profile defining the projection, must be valid
world_T_camera6DOF pose to minimized the projection error for, must be valid
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
world_T_optimizedCameraResulting optimized 6DOF pose
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator
Returns
True, if the optimization succeeded
See also
optimizePoseIF().

◆ optimizePose() [2/4]

bool Ocean::Geometry::NonLinearOptimizationPose::optimizePose ( const AnyCamera camera,
const HomogenousMatrix4 world_T_camera,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
HomogenousMatrix4 world_T_optimizedCamera,
const unsigned int  iterations,
const Estimator::EstimatorType  estimator,
Scalar  lambda,
const Scalar  lambdaFactor,
Scalar initialError,
Scalar finalError,
const Matrix invertedCovariances 
)
inlinestatic

Minimizes the projection error of a given 6-DOF camera pose.

Beware: There is another optimizePose() function with almost identical functionality/parameter layout.
However, this function here supports covariance parameters and thus creates a bigger binary footprint.

Parameters
cameraThe camera profile defining the projection, must be valid
world_T_cameraThe camera pose to optimized, transforming camera points to world points, with default camera pointing towards the negative z-space with y-axis upwards, must be valid
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
world_T_optimizedCameraThe resulting optimized 6-DOF camera pose, transforming camera points to world points, with default camera pointing towards the negative z-space with y-axis upwards, must be valid
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator, nullptr to avoid the usage of the return value
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator, nullptr to avoid the usage of the return value
invertedCovariancesOptional 2x2 inverted covariance matrices which represent the uncertainties of the image points, one for each image point (a (2*n)x2 matrix)
Returns
True, if the optimization succeeded
See also
optimizePoseIF().

◆ optimizePose() [3/4]

bool Ocean::Geometry::NonLinearOptimizationPose::optimizePose ( const PinholeCamera pinholeCamera,
const HomogenousMatrix4 world_T_camera,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
const bool  distortImagePoints,
HomogenousMatrix4 world_T_optimizedCamera,
const unsigned int  iterations,
const Estimator::EstimatorType  estimator,
Scalar  lambda,
const Scalar  lambdaFactor,
Scalar initialError,
Scalar finalError,
const Matrix invertedCovariances 
)
inlinestatic

Deprecated.

Minimizes the projection error of a given 6DOF pose holding orientation and translation parameters. The given 6DOF pose is a standard extrinsic camera matrix.
Beware: There is another optimizePose() function with almost identical functionality/parameter layout.
However, this function here supports covariance parameters and thus creates a bigger binary footprint.

Parameters
pinholeCameraThe pinhole camera object defining the projection between 3D object points and 2D image points
world_T_camera6DOF pose to minimized the projection error for, must be valid
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
distortImagePointsTrue, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination
world_T_optimizedCameraResulting optimized 6DOF pose
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator, nullptr to avoid the usage of the return value
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator, nullptr to avoid the usage of the return value
invertedCovariancesSet of 2x2 inverted covariance matrices that represent the uncertainties of the image points (a 2*n x 2 matrix)
Returns
True, if the optimization succeeded
See also
optimizePoseIF().

◆ optimizePose() [4/4]

bool Ocean::Geometry::NonLinearOptimizationPose::optimizePose ( const PinholeCamera pinholeCamera,
const HomogenousMatrix4 world_T_camera,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
const bool  distortImagePoints,
HomogenousMatrix4 world_T_optimizedCamera,
const unsigned int  iterations = 20u,
const Estimator::EstimatorType  estimator = Estimator::ET_SQUARE,
Scalar  lambda = Scalar(0.001),
const Scalar  lambdaFactor = 10,
Scalar initialError = nullptr,
Scalar finalError = nullptr 
)
inlinestatic

Deprecated.

Minimizes the projection error of a given 6DOF pose holding orientation and translation parameters for a pinhole camera. The given 6DOF pose is a standard extrinsic camera matrix.
Beware: There is another optimizePose() function with almost identical functionality/parameter layout.
However, this function here does not support covariance parameters and thus creates a smaller binary footprint.
In case binary size matters, try to use this function only, and do not mix the usage of both options.

Parameters
pinholeCameraThe pinhole camera object defining the projection between 3D object points and 2D image points, must be valid
world_T_camera6DOF pose to minimized the projection error for, must be valid
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
distortImagePointsTrue, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination
world_T_optimizedCameraResulting optimized 6DOF pose
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator
Returns
True, if the optimization succeeded
See also
optimizePoseIF().

◆ optimizePoseIF() [1/4]

static bool Ocean::Geometry::NonLinearOptimizationPose::optimizePoseIF ( const AnyCamera anyCamera,
const HomogenousMatrix4 flippedCamera_T_world,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
HomogenousMatrix4 optimizedPose_flippedCamera_T_world,
const unsigned int  iterations = 20u,
const Estimator::EstimatorType  estimator = Estimator::ET_SQUARE,
Scalar  lambda = Scalar(0.001),
const Scalar  lambdaFactor = 10,
Scalar initialError = nullptr,
Scalar finalError = nullptr 
)
static

Minimizes the projection error of a given inverted and flipped 6DOF pose holding orientation and translation parameters for any camera.

Beware: The given inverted and flipped 6DOF pose is not equivalent to a standard extrinsic camera matrix.

Parameters
anyCameraThe camera profile defining the projection, must be valid
flippedCamera_T_world6DOF pose to minimized the projection error for (inverted and flipped), must be valid
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
optimizedPose_flippedCamera_T_worldResulting optimized 6DOF pose (inverted and flipped)
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator
Returns
True, if succeeded
See also
optimizePose().

◆ optimizePoseIF() [2/4]

static bool Ocean::Geometry::NonLinearOptimizationPose::optimizePoseIF ( const AnyCamera camera,
const HomogenousMatrix4 flippedCamera_T_world,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
HomogenousMatrix4 optimizedFlippedCamera_T_world,
const unsigned int  iterations,
const Estimator::EstimatorType  estimator,
Scalar  lambda,
const Scalar  lambdaFactor,
Scalar initialError,
Scalar finalError,
const Matrix invertedCovariances 
)
static

Minimizes the projection error of a given 6-DOF camera pose.

Beware: There is another optimizePose() function with almost identical functionality/parameter layout.
However, this function here supports covariance parameters and thus creates a bigger binary footprint.

Parameters
cameraThe camera profile defining the projection, must be valid
flippedCamera_T_worldThe inverted and flipped camera pose to optimized, transforming world points to flipped camera points, with default camera pointing towards the positive z-space with y-axis downwards, must be valid
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
optimizedFlippedCamera_T_worldThe resulting optimized inverted and flipped camera pose, transforming world points to flipped camera points, with default camera pointing towards the positive z-space with y-axis downwards, must be valid
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator, nullptr to avoid the usage of the return value
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator, nullptr to avoid the usage of the return value
invertedCovariancesOptional 2x2 inverted covariance matrices which represent the uncertainties of the image points, one for each image point (a (2*n)x2 matrix)
Returns
True, if the optimization succeeded
See also
optimizePose().

◆ optimizePoseIF() [3/4]

static bool Ocean::Geometry::NonLinearOptimizationPose::optimizePoseIF ( const PinholeCamera pinholeCamera,
const HomogenousMatrix4 flippedCamera_T_world,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
const bool  distortImagePoints,
HomogenousMatrix4 optimizedInvertedFlippedPose,
const unsigned int  iterations,
const Estimator::EstimatorType  estimator,
Scalar  lambda,
const Scalar  lambdaFactor,
Scalar initialError,
Scalar finalError,
const Matrix invertedCovariances 
)
static

Deprecated.

Minimizes the projection error of a given inverted and flipped 6DOF pose holding orientation and translation parameters. Beware: The given inverted and flipped 6DOF pose is not equivalent to a standard extrinsic camera matrix.
Beware: There is another optimizePoseIF() function with almost identical functionality/parameter layout.
However, this function here supports covariance parameters and thus creates a bigger binary footprint.

Parameters
pinholeCameraThe pinhole camera object defining the projection between 3D object points and 2D image points
flippedCamera_T_world6DOF pose to minimized the projection error for (inverted and flipped), must be valid
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
distortImagePointsTrue, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination
optimizedInvertedFlippedPoseResulting optimized 6DOF pose (inverted and flipped)
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator, nullptr to avoid the usage of the return value
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator, nullptr to avoid the usage of the return value
invertedCovariancesOptional set of 2x2 inverted covariance matrices that represent the uncertainties of the image points (a 2*n x 2 matrix)
Returns
True, if succeeded
See also
optimizePose().

◆ optimizePoseIF() [4/4]

static bool Ocean::Geometry::NonLinearOptimizationPose::optimizePoseIF ( const PinholeCamera pinholeCamera,
const HomogenousMatrix4 flippedCamera_T_world,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
const bool  distortImagePoints,
HomogenousMatrix4 optimizedInvertedFlippedPose,
const unsigned int  iterations = 20u,
const Estimator::EstimatorType  estimator = Estimator::ET_SQUARE,
Scalar  lambda = Scalar(0.001),
const Scalar  lambdaFactor = 10,
Scalar initialError = nullptr,
Scalar finalError = nullptr 
)
static

Deprecated.

Minimizes the projection error of a given inverted and flipped 6DOF pose holding orientation and translation parameters for a pinhole camera. Beware: The given inverted and flipped 6DOF pose is not equivalent to a standard extrinsic camera matrix.
Beware: There is another optimizePoseIF() function with almost identical functionality/parameter layout.
However, this function here does not support covariance parameters and thus creates a smaller binary footprint.
In case binary size matters, try to use this function only, and do not mix the usage of both options.

Parameters
pinholeCameraThe pinhole camera object defining the projection between 3D object points and 2D image points
flippedCamera_T_world6DOF pose to minimized the projection error for (inverted and flipped), must be valid
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
distortImagePointsTrue, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination
optimizedInvertedFlippedPoseResulting optimized 6DOF pose (inverted and flipped)
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator
Returns
True, if succeeded
See also
optimizePose().

◆ optimizePoseZoom()

bool Ocean::Geometry::NonLinearOptimizationPose::optimizePoseZoom ( const PinholeCamera pinholeCamera,
const HomogenousMatrix4 world_T_camera,
const Scalar  zoom,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
const bool  distortImagePoints,
HomogenousMatrix4 world_T_optimizedCamera,
Scalar optimizedZoom,
const unsigned int  iterations = 20u,
const Estimator::EstimatorType  estimator = Estimator::ET_SQUARE,
Scalar  lambda = Scalar(0.001),
const Scalar  lambdaFactor = 10,
Scalar initialError = nullptr,
Scalar finalError = nullptr,
const Matrix invertedCovariances = nullptr 
)
inlinestatic

Minimizes the projection error of a given 6DOF pose holding orientation and translation parameters together with a flexible zoom.

The given 6DOF pose is a standard extrinsic camera matrix.

Parameters
pinholeCameraThe pinhole camera object defining the projection between 3D object points and 2D image points
world_T_camera6DOF pose to minimized the projection error for, must be valid
zoomThe scalar zoom factor matching to the given pose, with range (0, infinity)
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
distortImagePointsTrue, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination
world_T_optimizedCameraResulting optimized 6DOF pose
optimizedZoomResulting optimized zoom factor matching to the resulting optimized pose, with range (0, infinity)
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator
invertedCovariancesOptional set of 2x2 inverted covariance matrices that represent the uncertainties of the image points (a 2*n x 2 matrix)
Returns
True, if the optimization succeeded
See also
optimizePoseIF().

◆ optimizePoseZoomIF()

static bool Ocean::Geometry::NonLinearOptimizationPose::optimizePoseZoomIF ( const PinholeCamera pinholeCamera,
const HomogenousMatrix4 flippedCamera_T_world,
const Scalar  zoom,
const ConstIndexedAccessor< Vector3 > &  objectPoints,
const ConstIndexedAccessor< Vector2 > &  imagePoints,
const bool  distortImagePoints,
HomogenousMatrix4 optimizedInvertedFlippedPose,
Scalar optimizedZoom,
const unsigned int  iterations = 20u,
const Estimator::EstimatorType  estimator = Estimator::ET_SQUARE,
Scalar  lambda = Scalar(0.001),
const Scalar  lambdaFactor = 10,
Scalar initialError = nullptr,
Scalar finalError = nullptr,
const Matrix invertedCovariances = nullptr 
)
static

Minimizes the projection error of a given inverted and flipped 6DOF pose holding orientation and translation parameters together with a flexible zoom.

Beware: The given inverted and flipped 6DOF pose is not equivalent to a standard extrinsic camera matrix.

Parameters
pinholeCameraThe pinhole camera object defining the projection between 3D object points and 2D image points
flippedCamera_T_world6DOF pose to minimized the projection error for (inverted and flipped), must be valid
zoomThe scalar zoom factor matching to the given pose, with range (0, infinity)
objectPoints3D object points to be projected into the camera plane
imagePoints2D image points corresponding to the object points, the image points may be distorted or undistorted depending on the usage of the distortImagePoints state
distortImagePointsTrue, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination
optimizedInvertedFlippedPoseResulting optimized 6DOF pose (inverted and flipped)
optimizedZoomResulting optimized zoom factor matching to the resulting optimized pose, with range (0, infinity)
iterationsNumber of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)
estimatorRobust error estimator to be used
lambdaInitial Levenberg-Marquardt damping value which may be changed after each iteration using the damping factor, with range [0, infinity)
lambdaFactorLevenberg-Marquardt damping factor to be applied to the damping value, with range [1, infinity)
initialErrorOptional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator
finalErrorOptional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator
invertedCovariancesOptional set of 2x2 inverted covariance matrices that represent the uncertainties of the image points (a 2*n x 2 matrix)
Returns
True, if succeeded
See also
optimizePose().

The documentation for this class was generated from the following file: