Ocean
|
This class implements least square or robust optimization algorithms optimizing the locations of 3D object points (sometimes in combination with e.g., 3-DOF camera orientations or 6-DOF camera poses). More...
Data Structures | |
class | ObjectPointsOnePoseProvider |
Forward declaration of a highly optimized provider object allowing to optimize one camera pose and several 3D object point locations concurrently. More... | |
class | ObjectPointsOrientationalPosesProvider |
Forward declaration of a highly optimized provider object allowing to optimize the orientations of several camera pose and several 3D object point locations concurrently. More... | |
class | ObjectPointsPosesProvider |
Forward declaration of a highly optimized provider object allowing to optimize several camera pose and several 3D object point locations concurrently. More... | |
Static Public Member Functions | |
static bool | optimizeObjectPointForFixedPoses (const AnyCamera &camera, const ConstIndexedAccessor< HomogenousMatrix4 > &world_T_cameras, const Vector3 &worldObjectPoint, const ConstIndexedAccessor< Vector2 > &imagePoints, Vector3 &optimizedWorldObjectPoint, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, const bool onlyFrontObjectPoints=true, Scalar *initialRobustError=nullptr, Scalar *finalRobustError=nullptr, Scalars *intermediateRobustErrors=nullptr) |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) camera images, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointForFixedPosesIF (const AnyCamera &camera, const ConstIndexedAccessor< HomogenousMatrix4 > &flippedCameras_T_world, const Vector3 &worldObjectPoint, const ConstIndexedAccessor< Vector2 > &imagePoints, Vector3 &optimizedWorldObjectPoint, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, const bool onlyFrontObjectPoints=true, Scalar *initialRobustError=nullptr, Scalar *finalRobustError=nullptr, Scalars *intermediateRobustErrors=nullptr) |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) camera images, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointForFixedPoses (const ConstIndexedAccessor< const AnyCamera * > &cameras, const ConstIndexedAccessor< HomogenousMatrix4 > &world_T_cameras, const Vector3 &worldObjectPoint, const ConstIndexedAccessor< Vector2 > &imagePoints, Vector3 &optimizedWorldObjectPoint, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, const bool onlyFrontObjectPoints=true, Scalar *initialRobustError=nullptr, Scalar *finalRobustError=nullptr, Scalars *intermediateRobustErrors=nullptr) |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) camera images, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointForFixedPosesIF (const ConstIndexedAccessor< const AnyCamera * > &cameras, const ConstIndexedAccessor< HomogenousMatrix4 > &flippedCameras_T_world, const Vector3 &worldObjectPoint, const ConstIndexedAccessor< Vector2 > &imagePoints, Vector3 &optimizedWorldObjectPoint, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, const bool onlyFrontObjectPoints=true, Scalar *initialRobustError=nullptr, Scalar *finalRobustError=nullptr, Scalars *intermediateRobustErrors=nullptr) |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) camera images, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointForFixedStereoPoses (const AnyCamera &anyCameraA, const AnyCamera &anyCameraB, const ConstIndexedAccessor< HomogenousMatrix4 > &world_T_camerasA, const ConstIndexedAccessor< HomogenousMatrix4 > &world_T_camerasB, const Vector3 &worldObjectPoint, const ConstIndexedAccessor< Vector2 > &imagePointAccessorA, const ConstIndexedAccessor< Vector2 > &imagePointAccessorB, Vector3 &optimizedWorldObjectPoint, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, const bool onlyFrontObjectPoints=true, Scalar *initialRobustError=nullptr, Scalar *finalRobustError=nullptr, Scalars *intermediateRobustErrors=nullptr) |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) stereo fisheye camera frames, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointForFixedStereoPosesIF (const AnyCamera &anyCameraA, const AnyCamera &anyCameraB, const ConstIndexedAccessor< HomogenousMatrix4 > &flippedCamerasA_T_world, const ConstIndexedAccessor< HomogenousMatrix4 > &flippedCamerasB_T_world, const Vector3 &worldObjectPoint, const ConstIndexedAccessor< Vector2 > &imagePointAccessorA, const ConstIndexedAccessor< Vector2 > &imagePointAccessorB, Vector3 &optimizedWorldObjectPoint, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, const bool onlyFrontObjectPoints=true, Scalar *initialRobustError=nullptr, Scalar *finalRobustError=nullptr, Scalars *intermediateRobustErrors=nullptr) |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) stereo fisheye camera frames, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointsForFixedPoses (const PinholeCamera &pinholeCamera, const ConstIndexedAccessor< HomogenousMatrix4 > &poseAccessor, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, const bool distortImagePoints, NonconstIndexedAccessor< Vector3 > &optimizedObjectPoints, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, const bool onlyFrontObjectPoints=true, Worker *worker=nullptr) |
Minimizes the projection errors of given 3D object points, visible in several individual (fixed) camera frames, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointsForFixedPosesIF (const PinholeCamera &pinholeCamera, const ConstIndexedAccessor< HomogenousMatrix4 > &invertedFlippedPoses, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, const bool distortImagePoints, NonconstIndexedAccessor< Vector3 > &optimizedObjectPoints, const unsigned int iterations=5u, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=10, const bool onlyFrontObjectPoints=true, Worker *worker=nullptr) |
Minimizes the projection errors of given 3D object points, visible in several individual (fixed) camera frames, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointForFixedOrientations (const AnyCamera &camera, const ConstIndexedAccessor< SquareMatrix3 > &world_R_cameras, const ConstIndexedAccessor< Vector2 > &imagePoints, const Vector3 &objectPoint, const Scalar objectPointDistance, Vector3 &optimizedObjectPoint, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoint=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of one 3D object point visible in individual (fixed) camera poses all located at the origin with individual orientations by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointForFixedOrientationsIF (const AnyCamera &camera, const ConstIndexedAccessor< SquareMatrix3 > &flippedCameras_R_world, const ConstIndexedAccessor< Vector2 > &imagePoints, const Vector3 &objectPoint, const Scalar objectPointDistance, Vector3 &optimizedObjectPoint, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoint=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of one 3D object point visible in individual (fixed) camera poses all located at the origin with individual orientations by minimizing the projection error between the 3D object point and the 2D image points. More... | |
static bool | optimizeObjectPointsAndOrientations (const PinholeCamera &pinholeCamera, const ConstIndexedAccessor< SquareMatrix3 > &orientations, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, const Scalar objectPointDistance, NonconstIndexedAccessor< SquareMatrix3 > *optimizedOrientations, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in individual camera poses all located at the origin with individual orientations by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndOnePose (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &firstPose, const HomogenousMatrix4 &secondPose, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &firstImagePoints, const ConstIndexedAccessor< Vector2 > &secondImagePoints, const bool useDistortionParameters, HomogenousMatrix4 *optimizedSecondPose, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in two individual camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndOnePoseIF (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &firstPoseIF, const HomogenousMatrix4 &secondPoseIF, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &firstImagePoints, const ConstIndexedAccessor< Vector2 > &secondImagePoints, const bool useDistortionParameters, HomogenousMatrix4 *optimizedSecondPoseIF, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in two individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndTwoPoses (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &firstPose, const HomogenousMatrix4 &secondPose, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &firstImagePoints, const ConstIndexedAccessor< Vector2 > &secondImagePoints, const bool useDistortionParameters, HomogenousMatrix4 *optimizedFirstPose, HomogenousMatrix4 *optimizedSecondPose, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, const Matrix *invertedFirstCovariances=nullptr, const Matrix *invertedSecondCovariances=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in two individual camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndTwoPosesIF (const PinholeCamera &pinholeCamera, const HomogenousMatrix4 &firstPoseIF, const HomogenousMatrix4 &secondPoseIF, const ConstIndexedAccessor< Vector3 > &objectPoints, const ConstIndexedAccessor< Vector2 > &firstImagePoints, const ConstIndexedAccessor< Vector2 > &secondImagePoints, const bool useDistortionParameters, HomogenousMatrix4 *optimizedFirstPoseIF, HomogenousMatrix4 *optimizedSecondPoseIF, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Estimator::EstimatorType estimator=Estimator::ET_SQUARE, Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, const Matrix *invertedFirstCovariances=nullptr, const Matrix *invertedSecondCovariances=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in two individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndPoses (const AnyCamera &camera, const ConstIndexedAccessor< HomogenousMatrix4 > &world_T_cameras, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, NonconstIndexedAccessor< HomogenousMatrix4 > *world_T_optimizedCameras, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in individual camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndPosesIF (const AnyCamera &camera, const ConstIndexedAccessor< HomogenousMatrix4 > &flippedCameras_T_world, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, NonconstIndexedAccessor< HomogenousMatrix4 > *flippedOptimizedCameras_T_world, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndPoses (const ConstIndexedAccessor< const AnyCamera * > &cameras, const ConstIndexedAccessor< HomogenousMatrix4 > &world_T_cameras, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, NonconstIndexedAccessor< HomogenousMatrix4 > *world_T_optimizedCameras, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in individual camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndPosesIF (const ConstIndexedAccessor< const AnyCamera * > &cameras, const ConstIndexedAccessor< HomogenousMatrix4 > &flippedCameras_T_world, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, NonconstIndexedAccessor< HomogenousMatrix4 > *flippedOptimizedCameras_T_world, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndOrientationalPoses (const ConstIndexedAccessor< const AnyCamera * > &cameras, const ConstIndexedAccessor< HomogenousMatrix4 > &world_T_cameras, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, NonconstIndexedAccessor< HomogenousMatrix4 > *world_T_optimizedCameras, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in individual camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
static bool | optimizeObjectPointsAndOrientationalPosesIF (const ConstIndexedAccessor< const AnyCamera * > &cameras, const ConstIndexedAccessor< HomogenousMatrix4 > &flippedCameras_T_world, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, NonconstIndexedAccessor< HomogenousMatrix4 > *flippedOptimizedCameras_T_world, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Optimizes the locations of 3D object points visible in individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points. More... | |
Protected Types | |
typedef StaticMatrix< Scalar, 3, 3 > | StaticMatrix3x3 |
Definition of a 3x3 matrix. More... | |
typedef StaticMatrix< Scalar, 3, 6 > | StaticMatrix3x6 |
Definition of a 3x6 matrix. More... | |
typedef StaticMatrix< Scalar, 6, 3 > | StaticMatrix6x3 |
Definition of a 6x3 matrix. More... | |
typedef StaticMatrix< Scalar, 6, 6 > | StaticMatrix6x6 |
Definition of a 6x6 matrix. More... | |
typedef std::vector< StaticMatrix3x3 > | StaticMatrices3x3 |
Definition of a vector holding 3x3 matrices. More... | |
typedef std::vector< StaticMatrix6x3 > | StaticMatrices6x3 |
Definition of a vector holding 6x3 matrices. More... | |
typedef std::vector< StaticMatrix6x6 > | StaticMatrices6x6 |
Definition of a vector holding 6x6 matrices. More... | |
Static Protected Member Functions | |
static bool | slowOptimizeObjectPointsAndPoses (const AnyCamera &camera, const ConstIndexedAccessor< HomogenousMatrix4 > &world_T_cameras, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, NonconstIndexedAccessor< HomogenousMatrix4 > *world_T_optimizedCameras, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
This function is a slow implementation and has been replaced by a faster implementation. More... | |
static bool | slowOptimizeObjectPointsAndPosesIF (const AnyCamera &camera, const ConstIndexedAccessor< HomogenousMatrix4 > &flippedCameras_T_world, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, NonconstIndexedAccessor< HomogenousMatrix4 > *flippedOptimizedCameras_T_world, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
This function is a slow implementation and has been replaced by a faster implementation. More... | |
static bool | slowOptimizeObjectPointsAndPoses (const PinholeCamera &pinholeCamera, const ConstIndexedAccessor< HomogenousMatrix4 > &poses, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, const bool useDistortionParameters, NonconstIndexedAccessor< HomogenousMatrix4 > *optimizedPoses, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Deprecated. More... | |
static bool | slowOptimizeObjectPointsAndPosesIF (const PinholeCamera &pinholeCamera, const ConstIndexedAccessor< HomogenousMatrix4 > &posesIF, const ConstIndexedAccessor< Vector3 > &objectPoints, const ObjectPointGroupsAccessor &correspondenceGroups, const bool useDistortionParameters, NonconstIndexedAccessor< HomogenousMatrix4 > *optimizedPosesIF, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Geometry::Estimator::EstimatorType estimator=Geometry::Estimator::ET_SQUARE, const Scalar lambda=Scalar(0.001), const Scalar lambdaFactor=Scalar(5), const bool onlyFrontObjectPoints=true, Scalar *initialError=nullptr, Scalar *finalError=nullptr, Scalars *intermediateErrors=nullptr) |
Deprecated. More... | |
static void | optimizeObjectPointsForFixedPosesIFSubset (const PinholeCamera *pinholeCamera, const ConstIndexedAccessor< HomogenousMatrix4 > *invertedFlippedPoses, const ConstIndexedAccessor< Vector3 > *objectPoints, const ObjectPointGroupsAccessor *correspondenceGroups, const bool distortImagePoints, NonconstIndexedAccessor< Vector3 > *optimizedObjectPoints, const unsigned int iterations, const Estimator::EstimatorType estimator, Scalar lambda, const Scalar lambdaFactor, const bool onlyFrontObjectPoints, const unsigned int firstObjectPoint, const unsigned int numberObjectPoints) |
Minimizes the projection errors of a subset of given 3D object points, visible in several individual (fixed) camera frames, by minimizing the projection error between the 3D object point and the 2D image points. More... | |
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... | |
This class implements least square or robust optimization algorithms optimizing the locations of 3D object points (sometimes in combination with e.g., 3-DOF camera orientations or 6-DOF camera poses).
Therefore, this class implements typical Bundle Adjustment tasks e.g., for 3D object points and 6-DOF camera poses.
|
protected |
Definition of a vector holding 3x3 matrices.
|
protected |
Definition of a vector holding 6x3 matrices.
|
protected |
Definition of a vector holding 6x6 matrices.
|
protected |
Definition of a 3x3 matrix.
|
protected |
Definition of a 3x6 matrix.
|
protected |
Definition of a 6x3 matrix.
|
protected |
Definition of a 6x6 matrix.
|
inlinestatic |
Optimizes the locations of one 3D object point visible in individual (fixed) camera poses all located at the origin with individual orientations by minimizing the projection error between the 3D object point and the 2D image points.
camera | The camera profile defining the projection, must be valid |
world_R_cameras | The accessor for the orientations of the individual cameras, with default camera pointing towards the negative z-space with y-axis upwards, at least two |
imagePoints | The accessor for the image points which are projections of the 3D object points, one image point for each orientation |
objectPoint | The rough object point location to optimize |
objectPointDistance | The distance between the origin and the 3D object points, with range (0, infinity) |
optimizedObjectPoint | The resulting optimized 3D object points locations |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoint | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
static |
Optimizes the locations of one 3D object point visible in individual (fixed) camera poses all located at the origin with individual orientations by minimizing the projection error between the 3D object point and the 2D image points.
camera | The camera profile defining the projection, must be valid |
flippedCameras_R_world | The accessor for the inverted and flipped orientations of the individual cameras, with default flipped camera pointing towards the positive z-space with y-axis downwards, at least two |
imagePoints | The accessor for the image points which are projections of the 3D object points, one image point for each orientation |
objectPoint | The rough object point location to optimize |
objectPointDistance | The distance between the origin and the 3D object points, with range (0, infinity) |
optimizedObjectPoint | The resulting optimized 3D object points locations |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoint | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
inlinestatic |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) camera images, by minimizing the projection error between the 3D object point and the 2D image points.
camera | The camera profile defining the projection between 3D object points and 2D image points, must be valid |
world_T_cameras | The accessor for 6-DOF camera poses of the camera frames, with default camera pointing towards the negative z-space with y-axis upwards, at least two |
worldObjectPoint | The 3D object point to be projected into the camera plane and for that the projection error is minimized, defined in world |
imagePoints | The accessor for the image points that are visible in individual camera frames (with world_T_cameras.size() == imagePoints.size()) |
optimizedWorldObjectPoint | Resulting optimized 3D object point, defined in world |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialRobustError | Optional resulting averaged robust pixel error for the given initial parameters |
finalRobustError | Optional resulting averaged robust pixel error for the final optimized parameters |
intermediateRobustErrors | Optional resulting averaged robust pixel errors for intermediate optimization iterations |
|
inlinestatic |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) camera images, by minimizing the projection error between the 3D object point and the 2D image points.
cameras | The camera profiles defining the projection between 3D object points and 2D image points, one individual provide for each observation, must be valid |
world_T_cameras | The accessor for 6-DOF camera poses of the camera frames, with default camera pointing towards the negative z-space with y-axis upwards, at least two |
worldObjectPoint | The 3D object point to be projected into the camera plane and for that the projection error is minimized, defined in world |
imagePoints | The accessor for the image points that are visible in individual camera frames (with world_T_cameras.size() == imagePoints.size()) |
optimizedWorldObjectPoint | Resulting optimized 3D object point, defined in world |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialRobustError | Optional resulting averaged robust pixel error for the given initial parameters |
finalRobustError | Optional resulting averaged robust pixel error for the final optimized parameters |
intermediateRobustErrors | Optional resulting averaged robust pixel errors for intermediate optimization iterations |
|
static |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) camera images, by minimizing the projection error between the 3D object point and the 2D image points.
Beware: The given inverted and flipped 6DOF poses are not equivalent to a standard extrinsic camera matrix.
camera | The camera profile defining the projection between 3D object points and 2D image points, must be valid |
flippedCameras_T_world | The accessor for (inverted and flipped) 6-DOF camera poses of the camera frames, with default flipped camera pointing towards the positive z-space with y-axis downwards, at least two |
worldObjectPoint | The 3D object point to be projected into the camera plane and for that the projection error is minimized, defined in world |
imagePoints | The accessor for the image points that are visible in individual camera frames (with flippedCameras_T_world.size() == imagePoints.size()) |
optimizedWorldObjectPoint | Resulting optimized 3D object point, defined in world |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialRobustError | Optional resulting averaged robust pixel error for the given initial parameters |
finalRobustError | Optional resulting averaged robust pixel error for the final optimized parameters |
intermediateRobustErrors | Optional resulting averaged robust pixel errors for intermediate optimization iterations |
|
static |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) camera images, by minimizing the projection error between the 3D object point and the 2D image points.
Beware: The given inverted and flipped 6DOF poses are not equivalent to a standard extrinsic camera matrix.
cameras | The camera profiles defining the projection between 3D object points and 2D image points, one individual provide for each observation, must be valid |
flippedCameras_T_world | The accessor for (inverted and flipped) 6-DOF camera poses of the camera frames, with default flipped camera pointing towards the positive z-space with y-axis downwards, at least two |
worldObjectPoint | The 3D object point to be projected into the camera plane and for that the projection error is minimized, defined in world |
imagePoints | The accessor for the image points that are visible in individual camera frames (with flippedCameras_T_world.size() == imagePoints.size()) |
optimizedWorldObjectPoint | Resulting optimized 3D object point, defined in world |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialRobustError | Optional resulting averaged robust pixel error for the given initial parameters |
finalRobustError | Optional resulting averaged robust pixel error for the final optimized parameters |
intermediateRobustErrors | Optional resulting averaged robust pixel errors for intermediate optimization iterations |
|
inlinestatic |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) stereo fisheye camera frames, by minimizing the projection error between the 3D object point and the 2D image points.
The number of provided observations from the first (e.g., left) stereo camera can be different from the number of observations from the second (e.g., right) stereo camera.
anyCameraA | The fisheye camera profile of first (e.g., left) stereo images defining the projection between 3D object points and 2D image points, must be valid |
anyCameraB | The fisheye camera profile of second (e.g., right) stereo images defining the projection between 3D object points and 2D image points, must be valid |
world_T_camerasA | The accessor for 6-DOF camera poses of the first stereo camera frames, with poseAccessor_world_T_cameraA.size() + poseAccessor_world_T_cameraB.size() >= 2 |
world_T_camerasB | The accessor for 6-DOF camera poses of the second stereo camera frames, with poseAccessor_world_T_cameraA.size() + poseAccessor_world_T_cameraB.size() >= 2 |
worldObjectPoint | The 3D object point to be optimized, defined in world |
imagePointAccessorA | The accessor for the image points that are visible in individual first stereo camera frames (with poseAccessor_world_T_cameraA.size() == imagePointAccessorA.size()) |
imagePointAccessorB | The accessor for the image points that are visible in individual second stereo camera frames (with poseAccessor_world_T_cameraB.size() == imagePointAccessorB.size()) |
optimizedWorldObjectPoint | Resulting optimized 3D object point, defined in world |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialRobustError | Optional resulting averaged robust pixel error for the given initial parameters |
finalRobustError | Optional resulting averaged robust pixel error for the final optimized parameters |
intermediateRobustErrors | Optional resulting averaged robust pixel errors for intermediate optimization iterations |
|
static |
Minimizes the projection errors for one given 3D object point, visible in several individual (fixed) stereo fisheye camera frames, by minimizing the projection error between the 3D object point and the 2D image points.
The number of provided observations from the first (e.g., left) stereo camera can be different from the number of observations from the second (e.g., right) stereo camera. Beware: The given inverted and flipped 6DOF poses are not equivalent to a standard extrinsic camera matrix.
anyCameraA | The fisheye camera profile of first (e.g., left) stereo images defining the projection between 3D object points and 2D image points, must be valid |
anyCameraB | The fisheye camera profile of second (e.g., right) stereo images defining the projection between 3D object points and 2D image points, must be valid |
flippedCamerasA_T_world | The accessor for (inverted and flipped) 6-DOF camera poses of the first stereo camera frames, with poseAccessor_flippedCameraA_T_world.size() + poseAccessor_flippedCameraB_T_world.size() >= 2 |
flippedCamerasB_T_world | The accessor for (inverted and flipped) 6-DOF camera poses of the second stereo camera frames, with poseAccessor_flippedCameraA_T_world.size() + poseAccessor_flippedCameraB_T_world.size() >= 2 |
worldObjectPoint | The 3D object point to be optimized, defined in world |
imagePointAccessorA | The accessor for the image points that are visible in individual first stereo camera frames (with poseAccessor_flippedCameraA_T_world.size() == imagePointAccessorA.size()) |
imagePointAccessorB | The accessor for the image points that are visible in individual second stereo camera frames (with poseAccessor_flippedCameraB_T_world.size() == imagePointAccessorB.size()) |
optimizedWorldObjectPoint | Resulting optimized 3D object point, defined in world |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialRobustError | Optional resulting averaged robust pixel error for the given initial parameters |
finalRobustError | Optional resulting averaged robust pixel error for the final optimized parameters |
intermediateRobustErrors | Optional resulting averaged robust pixel errors for intermediate optimization iterations |
|
inlinestatic |
Optimizes the locations of 3D object points visible in two individual camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The first pose is static while the second pose and the 3D point positions are dynamic so that they will be optimized.
The object points are visible in both frames.
pinholeCamera | The pinhole camera profile defining the projection |
firstPose | The first (static and precise) pose, must be valid |
secondPose | The second (dynamic and rough) pose, must be valid |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
firstImagePoints | The accessor for the image points visible in the first frame, one image point for each object point (and with same order) |
secondImagePoints | The accessor for the image points visible in the second frame, one image point for each object point (and with the same order) |
useDistortionParameters | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedSecondPose | Optional resulting optimized camera pose for the second frame, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used to measure the pixel errors |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
static |
Optimizes the locations of 3D object points visible in two individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The first pose is static while the second pose and the 3D point positions are dynamic so that they will be optimized.
The object points are visible in both frames.
pinholeCamera | The pinhole camera profile defining the projection |
firstPoseIF | The first (static and precise) inverted and flipped pose, must be valid |
secondPoseIF | The second (dynamic and rough) inverted and flipped pose, must be valid |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
firstImagePoints | The accessor for the image points visible in the first frame, one image point for each object point (and with same order) |
secondImagePoints | The accessor for the image points visible in the second frame, one image point for each object point (and with the same order) |
useDistortionParameters | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedSecondPoseIF | Optional resulting optimized (inverted and flipped) camera pose for the second frame, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used to measure the pixel errors |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
static |
Optimizes the locations of 3D object points visible in individual camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
This function performs a Bundle Adjustment but does not modify the translations of camera poses.
The function supports a per-image camera profile (an individual camera profile for each individual image).
cameras | The camera profiles defining the projection, one for each camera frame, must be valid |
world_T_cameras | The accessor for the known (but rough) poses of the individual camera frames, transforming cameras to world, with default camera pointing towards the negative z-space with y-axis upwards, at least two |
objectPoints | The accessor for the known (but rough) locations of the 3D object points, defined in world |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
world_T_optimizedCameras | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
static |
Optimizes the locations of 3D object points visible in individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result. This function performs a Bundle Adjustment but does not modify the translations of camera poses.
The function supports a per-image camera profile (an individual camera profile for each individual image).
cameras | The camera profiles defining the projection, one for each camera frame, must be valid |
flippedCameras_T_world | The accessor for the known (but rough) camera frames, with default camera pointing towards the positive z-space with y-axis downwards, at least two |
objectPoints | The accessor for the known (but rough) locations of the 3D object points, defined in world |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
flippedOptimizedCameras_T_world | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)s |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
static |
Optimizes the locations of 3D object points visible in individual camera poses all located at the origin with individual orientations by minimizing the projection error between the 3D object points and the 2D image points.
Further, this function optimized the orientation of the individual camera poses.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
pinholeCamera | The pinhole camera profile defining the projection |
orientations | The accessor for the known (but rough) orientations of the individual camera frames |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
objectPointDistance | The distance between the origin and the 3D object points, with range (0, infinity) |
optimizedOrientations | Optional accessor for the resulting optimized camera orientations, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
inlinestatic |
Optimizes the locations of 3D object points visible in individual camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
This function performs a classic Bundle Adjustment using a per-session camera profile (the same identical camera profile for all individual images).
camera | The camera profile defining the projection for all camera frames, must be valid |
world_T_cameras | The accessor for the known (but rough) poses of the individual camera frames, transforming cameras to world, with default camera pointing towards the negative z-space with y-axis upwards, at least two |
objectPoints | The accessor for the known (but rough) locations of the 3D object points, defined in world |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
world_T_optimizedCameras | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
static |
Optimizes the locations of 3D object points visible in individual camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
This function performs a classic Bundle Adjustment using a per-image camera profile (an individual camera profile for each individual image).
cameras | The camera profiles defining the projection, one for each camera frame, must be valid |
world_T_cameras | The accessor for the known (but rough) poses of the individual camera frames, transforming cameras to world, with default camera pointing towards the negative z-space with y-axis upwards, at least two |
objectPoints | The accessor for the known (but rough) locations of the 3D object points, defined in world |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
world_T_optimizedCameras | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
inlinestatic |
Optimizes the locations of 3D object points visible in individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
This function performs a classic Bundle Adjustment using a per-session camera profile (the same identical camera profile for all individual images).
camera | The camera profile defining the projection for all camera frames, must be valid |
flippedCameras_T_world | The accessor for the known (but rough) camera frames, with default camera pointing towards the positive z-space with y-axis downwards, at least two |
objectPoints | The accessor for the known (but rough) locations of the 3D object points, defined in world |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
flippedOptimizedCameras_T_world | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)s |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
static |
Optimizes the locations of 3D object points visible in individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result. This function performs a classic Bundle Adjustment using a per-image camera profile (an individual camera profile for each individual image).
cameras | The camera profiles defining the projection, one for each camera frame, must be valid |
flippedCameras_T_world | The accessor for the known (but rough) camera frames, with default camera pointing towards the positive z-space with y-axis downwards, at least two |
objectPoints | The accessor for the known (but rough) locations of the 3D object points, defined in world |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
flippedOptimizedCameras_T_world | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity)s |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
inlinestatic |
Optimizes the locations of 3D object points visible in two individual camera poses by minimizing the projection error between the 3D object points and the 2D image points.
Both camera poses and the 3D point positions are dynamic.
The object points are visible in both frames.
pinholeCamera | The pinhole camera object defining the projection between 3D object points and 2D image points |
firstPose | The first pose to optimize, must be valid |
secondPose | The second pose to optimize, must be valid |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
firstImagePoints | The accessor for the image points visible in the first frame, one image point for each object point (and with same order) |
secondImagePoints | The accessor for the image points visible in the second frame, one image point for each object point (and with the same order) |
useDistortionParameters | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedFirstPose | Optional resulting optimized camera pose for the first frame, nullptr otherwise |
optimizedSecondPose | Optional resulting optimized camera pose for the second frame, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used to measure the pixel errors |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
invertedFirstCovariances | Optional set of 2x2 inverted covariance matrices that represent the uncertainties of the first image points (a 2*n x 2 matrix) |
invertedSecondCovariances | Optional set of 2x2 inverted covariance matrices that represent the uncertainties of the second image points (a 2*n x 2 matrix) |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
static |
Optimizes the locations of 3D object points visible in two individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points.
Both camera poses and the 3D point positions are dynamic.
The object points are visible in both frames.
pinholeCamera | The pinhole camera object defining the projection between 3D object points and 2D image points |
firstPoseIF | The first inverted and pose to optimize, must be valid |
secondPoseIF | The second inverted and pose to optimize, must be valid |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
firstImagePoints | The accessor for the image points visible in the first frame, one image point for each object point (and with same order) |
secondImagePoints | The accessor for the image points visible in the second frame, one image point for each object point (and with the same order) |
useDistortionParameters | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedFirstPoseIF | Optional resulting optimized inverted and camera pose for the first frame, nullptr otherwise |
optimizedSecondPoseIF | Optional resulting optimized inverted and camera pose for the second frame, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used to measure the pixel errors |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
invertedFirstCovariances | Optional set of 2x2 inverted covariance matrices that represent the uncertainties of the first image points (a 2*n x 2 matrix) |
invertedSecondCovariances | Optional set of 2x2 inverted covariance matrices that represent the uncertainties of the second image points (a 2*n x 2 matrix) |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
inlinestatic |
Minimizes the projection errors of given 3D object points, visible in several individual (fixed) camera frames, by minimizing the projection error between the 3D object point and the 2D image points.
The given 6DOF poses are standard extrinsic camera matrix.
The number of correspondences can vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
pinholeCamera | The pinhole camera object defining the projection between 3D object points and 2D image points |
poseAccessor | The accessor for the known (and fixed) poses of the individual camera frames |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
distortImagePoints | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedObjectPoints | Accessor for the resulting optimized 3D object points locations |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
worker | Optional worker object to distribute the computation |
|
static |
Minimizes the projection errors of given 3D object points, visible in several individual (fixed) camera frames, by minimizing the projection error between the 3D object point and the 2D image points.
Beware: The given inverted and flipped 6DOF poses are not equivalent to a standard extrinsic camera matrix.
The number of correspondences can vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
pinholeCamera | The pinhole camera object defining the projection between 3D object points and 2D image points |
invertedFlippedPoses | The accessor for the known (and fixed) poses of the individual camera frames |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
distortImagePoints | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedObjectPoints | Accessor for the resulting optimized 3D object points locations |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
worker | Optional worker object to distribute the computation |
|
staticprotected |
Minimizes the projection errors of a subset of given 3D object points, visible in several individual (fixed) camera frames, by minimizing the projection error between the 3D object point and the 2D image points.
Beware: The given inverted and flipped 6DOF poses are not equivalent to a standard extrinsic camera matrix.
pinholeCamera | The pinhole camera object defining the projection between 3D object points and 2D image points |
invertedFlippedPoses | The accessor for the known (and fixed) poses of the individual camera frames |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
distortImagePoints | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedObjectPoints | Resulting optimized 3D object points, the caller must provide enough memory to store the optimized 3D points |
iterations | Number of iterations to be applied at most, if no convergence can be reached |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
firstObjectPoint | The first object point to be handled |
numberObjectPoints | The number of object points to be handled |
|
staticprotected |
This function is a slow implementation and has been replaced by a faster implementation.
The code remains for demonstration and evaluation purposes.
Optimizes the locations of 3D object points visible in individual camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
camera | The camera profile defining the projection, must be valid |
world_T_cameras | The accessor for the known (but rough) poses of the individual camera frames, transforming cameras to world, with default camera pointing towards the negative z-space with y-axis upwards, at least two |
objectPoints | The accessor for the known (but rough) locations of the 3D object points, defined in world |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
world_T_optimizedCameras | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
inlinestaticprotected |
Deprecated.
This function is a slow implementation and has been replaced by a faster implementation. The code remains for demonstration and evaluation purposes.
Optimizes the locations of 3D object points visible in individual camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
pinholeCamera | The pinhole camera profile defining the projection |
poses | The accessor for the known (but rough) poses of the individual camera frames |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
useDistortionParameters | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedPoses | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
staticprotected |
This function is a slow implementation and has been replaced by a faster implementation.
The code remains for demonstration and evaluation purposes.
Optimizes the locations of 3D object points visible in individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
camera | The camera profile defining the projection, must be valid |
flippedCameras_T_world | The accessor for the known (but rough) camera frames, with default camera pointing towards the positive z-space with y-axis downwards, at least two |
objectPoints | The accessor for the known (but rough) locations of the 3D object points, defined in world |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
flippedOptimizedCameras_T_world | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |
|
inlinestaticprotected |
Deprecated.
This function is a slow implementation and has been replaced by a faster implementation. The code remains for demonstration and evaluation purposes.
Optimizes the locations of 3D object points visible in individual (inverted and flipped) camera poses by minimizing the projection error between the 3D object points and the 2D image points.
The number of correspondences may vary between the individual frames (groups).
Each group may address individual object points, however the larger the intersection of sets between the individual 3D object points in the individual frames the better the optimization result.
pinholeCamera | The pinhole camera profile defining the projection |
posesIF | The accessor for the known (but rough) inverted and flipped poses of the individual camera frames |
objectPoints | The accessor for the known (but rough) locations of the 3D object points |
correspondenceGroups | The accessor for the individual groups of correspondences between pose indices and image point location, one group for each object point |
useDistortionParameters | True, to force the usage of the distortion parameters of the given camera object to distort the projected 2D image points before error determination |
optimizedPosesIF | Optional accessor for the resulting optimized camera poses, nullptr otherwise |
optimizedObjectPoints | Optional accessor for the resulting optimized 3D object points locations, nullptr otherwise |
iterations | Number of iterations to be applied at most, if no convergence can be reached, with range [1, infinity) |
estimator | Robust error estimator to be used |
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) |
onlyFrontObjectPoints | True, to avoid that the optimized 3D position lies behind any camera |
initialError | Optional resulting averaged pixel error for the given initial parameters, in relation to the defined estimator |
finalError | Optional resulting averaged pixel error for the final optimized parameters, in relation to the defined estimator |
intermediateErrors | Optional resulting intermediate (improving) errors |