Ocean
Ocean::Geometry::Error Class Reference

This class implements to functions to determine the error or accuracy of geometric functions and their parameter. More...

Data Structures

class  ErrorElement
 This class implements an element storing the error between to image points. More...
 

Public Types

enum  ErrorDetermination { ED_INVALID , ED_UNIQUE , ED_APPROXIMATED , ED_AMBIGUOUS }
 Definition of different error determination stages. More...
 

Static Public Member Functions

static void determineValidParameters (const Scalar *parameters, const size_t number, const Scalar threshold, Indices32 &validIndices)
 Determines the indices of a set of given parameter values that are below ore equal to a provided threshold. More...
 
static void determineInvalidParameters (const Scalar *parameters, const size_t number, const Scalar threshold, Indices32 &validIndices)
 Determines the indices of a set of given parameter values that are above a provided threshold. More...
 
static Scalar determineAverageError (const Vectors2 &firstPoints, const Vectors2 &secondPoints, Vector2 *errors=nullptr, Scalar *sqrErrors=nullptr)
 Returns the average square error between two sets of 2D positions. More...
 
static Scalar determineAverageError (const SquareMatrix3 &firstTransformation, const Vectors2 &firstPoints, const SquareMatrix3 &secondTransformation, const Vectors2 &secondPoints)
 Returns the average square error between two sets of 2D positions. More...
 
static Scalar determineAverageError (const Vectors3 &firstPoints, const Vectors3 &secondPoints)
 Returns the average square error between two sets of 3D positions. More...
 
static Scalar determineError (const Vectors2 &firstPoints, const Vectors2 &secondPoints, Scalar &sqrAverageError, Scalar &sqrMinimalError, Scalar &sqrMaximalError)
 Determining the average, minimal and maximal square error between two sets of 2D positions. More...
 
static Scalar determineError (const Vectors3 &firstPoints, const Vectors3 &secondPoints, Scalar &sqrAverageError, Scalar &sqrMinimalError, Scalar &sqrMaximalError)
 Returns the average, minimal and maximal square error between two sets of 3D positions. More...
 
static bool posesAlmostEqual (const HomogenousMatrix4 &poseFirst, const HomogenousMatrix4 &poseSecond, const Vector3 &maxTranslationOffset=Vector3(Scalar(0.1), Scalar(0.1), Scalar(0.1)), const Scalar maxOrientationOffset=Numeric::deg2rad(15))
 Returns whether the offsets between two given 6DOF poses are below specified thresholds. More...
 
static bool posesAlmostEqual (const HomogenousMatrix4 &poseFirst, const HomogenousMatrix4 &poseSecond, const Vector3 &maxTranslationOffset)
 Returns whether the offsets between two given 6DOF poses are below specified thresholds. More...
 
static bool posesAlmostEqual (const HomogenousMatrix4 &poseFirst, const HomogenousMatrix4 &poseSecond, const Scalar maxOrientationOffset)
 Returns whether the offsets between two given 6DOF poses are below specified thresholds. More...
 
static Scalar determineCameraError (const PinholeCamera &pinholeCamera, const Vector2 *normalizedObjectPoints, const Vector2 *imagePoints, const size_t correspondences, const bool useDistortionParameters, Vector2 *errors=nullptr, Scalar *sqrErrors=nullptr)
 Determines the accuracy of the intrinsic camera matrix (and camera distortion parameters if requested). More...
 
static void determineCameraError (const PinholeCamera &pinholeCamera, const Vector2 *normalizedObjectPoints, const Vector2 *imagePoints, const size_t correspondences, const bool useDistortionParameters, Scalar &sqrAveragePixelError, Scalar &sqrMinimalPixelError, Scalar &sqrMaximalPixelError)
 Determines the accuracy of the intrinsic camera matrix (and camera distortion parameters if requested). More...
 
template<typename TAccessorImagePoints , bool tResultingErrors, bool tResultingSqrErrors>
static Scalar determineHomographyError (const SquareMatrix3 &points1_H_points0, const TAccessorImagePoints &imagePointAccessor0, const TAccessorImagePoints &imagePointAccessor1, Vector2 *errors=nullptr, Scalar *sqrErrors=nullptr)
 Determines the accuracy of a given homography for a set of corresponding image points. More...
 
static Vector2 determinePoseError (const HomogenousMatrix4 &world_T_camera, const AnyCamera &camera, const Vector3 &objectPoint, const Vector2 &imagePoint)
 Determines the accuracy of the camera pose based on 2D/3D correspondences. More...
 
static Vector2 determinePoseErrorIF (const HomogenousMatrix4 &flippedCamera_T_world, const AnyCamera &camera, const Vector3 &objectPoint, const Vector2 &imagePoint)
 Determines the accuracy of the camera pose based on 2D/3D correspondences. More...
 
static Vector2 determinePoseError (const HomogenousMatrix4 &world_T_camera, const PinholeCamera &pinholeCamera, const Vector3 &objectPoint, const Vector2 &imagePoint, const bool useDistortionParameters)
 Deprecated. More...
 
static Vector2 determinePoseErrorIF (const HomogenousMatrix4 &flippedCamera_T_world, const PinholeCamera &pinholeCamera, const Vector3 &objectPoint, const Vector2 &imagePoint, const bool useDistortionParameters)
 Deprecated. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tUseBorderDistortionIfOutside, bool tResultingErrors, bool tResultingSqrErrors>
static Scalar determinePoseError (const HomogenousMatrix4 &world_T_camera, const PinholeCamera &pinholeCamera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, const bool useDistortionParameters, const Scalar zoom=Scalar(1), Vector2 *errors=nullptr, Scalar *sqrErrors=nullptr)
 Determines the accuracy of the camera pose based on 2D/3D correspondences. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tResultingErrors, bool tResultingSqrErrors>
static Scalar determinePoseError (const HomogenousMatrix4 &world_T_camera, const AnyCamera &anyCamera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, Vector2 *errors=nullptr, Scalar *sqrErrors=nullptr)
 Determines the accuracy of the camera pose based on 2D/3D correspondences. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tUseBorderDistortionIfOutside, bool tResultingErrors, bool tResultingSqrErrors>
static Scalar determinePoseErrorIF (const HomogenousMatrix4 &flippedCamera_T_world, const PinholeCamera &pinholeCamera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, const bool useDistortionParameters, const Scalar zoom=Scalar(1), Vector2 *errors=nullptr, Scalar *sqrErrors=nullptr)
 Determines the accuracy of the camera pose based on 2D/3D correspondences. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tResultingErrors, bool tResultingSqrErrors>
static Scalar determinePoseErrorIF (const HomogenousMatrix4 &flippedCamera_T_world, const AnyCamera &anyCamera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, Vector2 *errors=nullptr, Scalar *sqrErrors=nullptr)
 Determines the accuracy of the camera pose based on 2D/3D correspondences. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tOnlyFrontObjectPoints>
static bool determinePoseError (const HomogenousMatrix4 &world_T_camera, const AnyCamera &camera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, Scalar &sqrAveragePixelError, Scalar &sqrMinimalPixelError, Scalar &sqrMaximalPixelError)
 Determines the accuracy of a camera pose in combination with the corresponding camera profile. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints >
static void determinePoseError (const HomogenousMatrix4 &world_T_camera, const AnyCamera &camera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, Scalar &sqrAveragePixelError, Scalar &sqrMinimalPixelError, Scalar &sqrMaximalPixelError)
 Deprecated. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tUseBorderDistortionIfOutside>
static void determinePoseError (const HomogenousMatrix4 &world_T_camera, const PinholeCamera &pinholeCamera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, const bool useDistortionParameters, Scalar &sqrAveragePixelError, Scalar &sqrMinimalPixelError, Scalar &sqrMaximalPixelError, const Scalar zoom=Scalar(1))
 Determines the accuracy of the extrinsic and intrinsic camera matrix (and camera distortion if requested). More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tOnlyFrontObjectPoints>
static bool determinePoseErrorIF (const HomogenousMatrix4 &flippedCamera_T_world, const AnyCamera &camera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, Scalar &sqrAveragePixelError, Scalar &sqrMinimalPixelError, Scalar &sqrMaximalPixelError)
 Determines the accuracy of a camera pose in combination with the corresponding camera profile. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints >
static void determinePoseErrorIF (const HomogenousMatrix4 &flippedCamera_T_world, const AnyCamera &camera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, Scalar &sqrAveragePixelError, Scalar &sqrMinimalPixelError, Scalar &sqrMaximalPixelError)
 Deprecated. More...
 
template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tUseBorderDistortionIfOutside>
static void determinePoseErrorIF (const HomogenousMatrix4 &flippedCamera_T_world, const PinholeCamera &pinholeCamera, const TAccessorObjectPoints &objectPointAccessor, const TAccessorImagePoints &imagePointAccessor, const bool useDistortionParameters, Scalar &sqrAveragePixelError, Scalar &sqrMinimalPixelError, Scalar &sqrMaximalPixelError, const Scalar zoom=Scalar(1))
 Determines the accuracy of the extrinsic and intrinsic camera matrix (and camera distortion if requested). More...
 
template<Estimator::EstimatorType tEstimator>
static Scalar averagedRobustErrorInPointCloud (const Vector2 *imagePoints, const size_t numberImagePoints, const size_t validImagePoints, const Vector2 *candidatePoints, const size_t numberCandidatePoints, const ErrorDetermination errorDetermination, IndexPairs32 *correspondences=nullptr)
 Determines the unique robust minimal average square error between two 2D points clouds. More...
 
template<Estimator::EstimatorType tEstimator>
static Scalar uniqueAveragedRobustErrorInPointCloud (const Vector2 *imagePoints, const size_t numberImagePoints, const size_t validImagePoints, const Vector2 *candidatePoints, const size_t numberCandidatePoints, IndexPairs32 *correspondences=nullptr)
 Determines the unique robust minimal average square error between two 2D points clouds. More...
 
template<Estimator::EstimatorType tEstimator>
static Scalar approximatedAveragedRobustErrorInPointCloud (const Vector2 *imagePoints, const size_t numberImagePoints, const size_t validImagePoints, const Vector2 *candidatePoints, const size_t numberCandidatePoints, IndexPairs32 *correspondences=nullptr)
 Determines the approximated robust minimal average square error between two 2D points clouds. More...
 
template<Estimator::EstimatorType tEstimator>
static Scalar ambiguousAveragedRobustErrorInPointCloud (const Vector2 *imagePoints, const size_t numberImagePoints, const size_t validImagePoints, const Vector2 *candidatePoints, const size_t numberCandidatePoints, IndexPairs32 *correspondences=nullptr)
 Determines the ambiguous robust minimal average square error between two 2D points clouds. More...
 
template<Estimator::EstimatorType tEstimator>
static Scalar averagedRobustError (const Scalar *sqrErrors, const size_t number, const Scalar *explicitWeights=nullptr)
 Returns the averaged robust error for a given set of error values using a defined estimator. More...
 
static Scalar averagedRobustError (const Scalar *sqrErrors, const size_t number, const Estimator::EstimatorType estimator, const Scalar *explicitWeights=nullptr)
 Returns the averaged robust error for a given set of error values using a defined estimator. More...
 
template<Estimator::EstimatorType tEstimator>
static Scalar averagedRobustError (const Scalar *sqrErrors, const unsigned int *indices, const size_t numberIndices, const Scalar *explicitWeights=nullptr)
 Returns the averaged robust error for a given set of error values using a defined estimator. More...
 
static Scalar averagedRobustError (const Scalar *sqrErrors, const unsigned int *indices, const size_t numberIndices, const Estimator::EstimatorType estimator, const Scalar *explicitWeights=nullptr)
 Returns the averaged robust error for a given set of error values using a defined estimator. More...
 

Private Types

typedef std::vector< ErrorElementErrorElements
 Definition of a vector holding error elements. More...
 

Detailed Description

This class implements to functions to determine the error or accuracy of geometric functions and their parameter.

Member Typedef Documentation

◆ ErrorElements

Definition of a vector holding error elements.

Member Enumeration Documentation

◆ ErrorDetermination

Definition of different error determination stages.

Enumerator
ED_INVALID 

Invalid stage.

ED_UNIQUE 

Unique error determination.

ED_APPROXIMATED 

Approximated error determination.

ED_AMBIGUOUS 

Ambiguous error determination.

Member Function Documentation

◆ ambiguousAveragedRobustErrorInPointCloud()

template<Estimator::EstimatorType tEstimator>
Scalar Ocean::Geometry::Error::ambiguousAveragedRobustErrorInPointCloud ( const Vector2 imagePoints,
const size_t  numberImagePoints,
const size_t  validImagePoints,
const Vector2 candidatePoints,
const size_t  numberCandidatePoints,
IndexPairs32 correspondences = nullptr 
)
static

Determines the ambiguous robust minimal average square error between two 2D points clouds.

The given point clouds may not have the same size, and therefore the point order does not define any correspondences.
However, the number of given image points must be smaller or equal to the number of given candidate points.
The minimal error is found by determining the absolute minimal error between image points and candidate points.

Beware: Candidate points already used may be used for any further correspondences also making ambiguous correspondences.
Thus, in a worst case all points may be assigned to one unique candidate point.

Parameters
imagePointsImage points to determine the minimal errors for, must be valid
numberImagePointsNumber of given image points, with range [1, numberCandidatePoints]
validImagePointsThe number of image points which can be expected to have a unique corresponding point inside the candidate set, with range [1, numberImagePoints]
candidatePointsPossible candidate image points to be used for finding the minimal error, must be valid
numberCandidatePointsNumber of given candidate points, with range [1, infinity)
correspondencesOptional resulting point correspondences, for each index of an image point one corresponding candidate point index will be returned
Returns
Robust averaged minimal square error
See also
uniqueAveragedRobustErrorInPointCloud(), approximatedAveragedRobustErrorInPointCloud().
Template Parameters
tEstimatorEstimator type to be applied

◆ approximatedAveragedRobustErrorInPointCloud()

template<Estimator::EstimatorType tEstimator>
Scalar Ocean::Geometry::Error::approximatedAveragedRobustErrorInPointCloud ( const Vector2 imagePoints,
const size_t  numberImagePoints,
const size_t  validImagePoints,
const Vector2 candidatePoints,
const size_t  numberCandidatePoints,
IndexPairs32 correspondences = nullptr 
)
static

Determines the approximated robust minimal average square error between two 2D points clouds.

The given point clouds may not have the same size, and therefore the point order does not define any correspondences.
However, the number of given image points must be smaller or equal to the number of given candidate points.
The minimal error is found by determining the approximated absolute minimal error between image points and candidate points.

Candidate points already used will not be used for any further correspondences creating unique correspondences.
Instead of using a brute force method this function flags already used candidate points to avoid the second usage, however the result may not be the global optimum.

Parameters
imagePointsImage points to determine the minimal errors for, must be valid
numberImagePointsNumber of given image points, with range [1, numberCandidatePoints]
validImagePointsThe number of image points which can be expected to have a unique corresponding point inside the candidate set, with range [1, numberImagePoints]
candidatePointsPossible candidate image points to be used for finding the minimal error, must be valid
numberCandidatePointsNumber of given candidate points, with range [1, infinity)
correspondencesOptional resulting point correspondences, for each index of an image point one corresponding candidate point index will be returned
Returns
Robust averaged minimal square error
Template Parameters
tEstimatorEstimator type to be applied
See also
uniqueAveragedRobustErrorInPointCloud(), ambiguousAveragedRobustErrorInPointCloud().

◆ averagedRobustError() [1/4]

Scalar Ocean::Geometry::Error::averagedRobustError ( const Scalar sqrErrors,
const size_t  number,
const Estimator::EstimatorType  estimator,
const Scalar explicitWeights = nullptr 
)
inlinestatic

Returns the averaged robust error for a given set of error values using a defined estimator.

Parameters
sqrErrorsSpecified squared error values to return the averaged error for
numberThe number of given error values
estimatorRobust estimator to be used for error calculation
explicitWeightsOptional additional weight values individual for each error to be applied to the resulting average robust error only
Returns
Averaged robust error

◆ averagedRobustError() [2/4]

template<Estimator::EstimatorType tEstimator>
Scalar Ocean::Geometry::Error::averagedRobustError ( const Scalar sqrErrors,
const size_t  number,
const Scalar explicitWeights = nullptr 
)
static

Returns the averaged robust error for a given set of error values using a defined estimator.

Parameters
sqrErrorsSpecified squared error values to return the averaged error for
numberThe number of given error values
explicitWeightsOptional additional weight values individual for each error to be applied to the resulting average robust error only
Returns
Averaged robust error
Template Parameters
tEstimatorRobust estimator to be used for error calculation

◆ averagedRobustError() [3/4]

Scalar Ocean::Geometry::Error::averagedRobustError ( const Scalar sqrErrors,
const unsigned int *  indices,
const size_t  numberIndices,
const Estimator::EstimatorType  estimator,
const Scalar explicitWeights = nullptr 
)
inlinestatic

Returns the averaged robust error for a given set of error values using a defined estimator.

Not all error values are used but those defined as indices.

Parameters
sqrErrorsSpecified squared error values to return the summed error for
indicesIndices of the given error values to be used for error calculation
numberIndicesNumber of given indices
estimatorRobust estimator to be used for error calculation
explicitWeightsOptional additional weight values individual for each error to be applied to the resulting average robust error only
Returns
Averaged robust error

◆ averagedRobustError() [4/4]

template<Estimator::EstimatorType tEstimator>
Scalar Ocean::Geometry::Error::averagedRobustError ( const Scalar sqrErrors,
const unsigned int *  indices,
const size_t  numberIndices,
const Scalar explicitWeights = nullptr 
)
static

Returns the averaged robust error for a given set of error values using a defined estimator.

Not all error values are used but those defined as indices.

Parameters
sqrErrorsSpecified squared error values to return the summed error for
indicesIndices of the given error values to be used for error calculation
numberIndicesNumber of given indices
explicitWeightsOptional additional weight values individual for each error to be applied to the resulting average robust error only
Returns
Averaged robust error
Template Parameters
tEstimatorRobust estimator to be used for error calculation

◆ averagedRobustErrorInPointCloud()

template<Estimator::EstimatorType tEstimator>
Scalar Ocean::Geometry::Error::averagedRobustErrorInPointCloud ( const Vector2 imagePoints,
const size_t  numberImagePoints,
const size_t  validImagePoints,
const Vector2 candidatePoints,
const size_t  numberCandidatePoints,
const ErrorDetermination  errorDetermination,
IndexPairs32 correspondences = nullptr 
)
static

Determines the unique robust minimal average square error between two 2D points clouds.

This function calls uniqueAveragedRobustErrorInPointCloud() or ambiguousAveragedRobustErrorInPointCloud() depending on the uniqueCorrespondences parameter.

Parameters
imagePointsImage points to determine the minimal errors for, must be valid
numberImagePointsNumber of given image points, with range [1, numberCandidatePoints]
validImagePointsThe number of image points which can be expected to have a unique corresponding point inside the candidate set, with range [1, numberImagePoints]
candidatePointsPossible candidate image points to be used for finding the minimal error, must be valid
numberCandidatePointsNumber of given candidate points, with range [1, infinity)
errorDeterminationDepending on this flag uniqueAveragedRobustErrorInPointCloud, approximatedAveragedRobustErrorInPointCloud() or ambiguousAveragedRobustErrorInPointCloud() will be used
correspondencesOptional resulting point correspondences, for each index of an image point one corresponding candidate point index will be returned
Returns
Robust averaged square error
Template Parameters
tEstimatorEstimator type to be applied
See also
uniqueAveragedRobustErrorInPointCloud(), approximatedAveragedRobustErrorInPointCloud(), ambiguousAveragedRobustErrorInPointCloud().

◆ determineAverageError() [1/3]

static Scalar Ocean::Geometry::Error::determineAverageError ( const SquareMatrix3 firstTransformation,
const Vectors2 firstPoints,
const SquareMatrix3 secondTransformation,
const Vectors2 secondPoints 
)
static

Returns the average square error between two sets of 2D positions.

Each point in the first point set correspond to a point in the second point set with same index.

Parameters
firstTransformationTransformation that will be applied for all image points from the first set
firstPointsFirst set of 2D points, each point has a corresponding point in the second set
secondTransformationTransformation that will be applied for all image points from the second set
secondPointsSecond set of 2D points
Returns
Average square error between all point correspondences

◆ determineAverageError() [2/3]

static Scalar Ocean::Geometry::Error::determineAverageError ( const Vectors2 firstPoints,
const Vectors2 secondPoints,
Vector2 errors = nullptr,
Scalar sqrErrors = nullptr 
)
static

Returns the average square error between two sets of 2D positions.

Each point in the first point set correspond to a point in the second point set with same index.

Parameters
firstPointsFirst set of 2D points, each point has a corresponding point in the second set
secondPointsSecond set of 2D points
errorsOptional resulting errors individual for each provided point pair, make sure that the provided buffer is large enough
sqrErrorsOptional resulting squared errors individual for each provided point pair, make sure that the provided buffer is large enough
Returns
Average square error between all point correspondences

◆ determineAverageError() [3/3]

static Scalar Ocean::Geometry::Error::determineAverageError ( const Vectors3 firstPoints,
const Vectors3 secondPoints 
)
static

Returns the average square error between two sets of 3D positions.

Each point in the first point set correspond to a point in the second point set with same index.

Parameters
firstPointsFirst set of 3D points, each point has a corresponding point in the second set
secondPointsSecond set of 3D points
Returns
Average square error between all point correspondences

◆ determineCameraError() [1/2]

static void Ocean::Geometry::Error::determineCameraError ( const PinholeCamera pinholeCamera,
const Vector2 normalizedObjectPoints,
const Vector2 imagePoints,
const size_t  correspondences,
const bool  useDistortionParameters,
Scalar sqrAveragePixelError,
Scalar sqrMinimalPixelError,
Scalar sqrMaximalPixelError 
)
static

Determines the accuracy of the intrinsic camera matrix (and camera distortion parameters if requested).

The accuracy is determined by transforming the normalized 3D image points (3D object points transformed by the flipped and inverted extrinsic matrix) to the image plane.

Parameters
pinholeCameraThe pinhole camera object to be tested
normalizedObjectPointsNormalized object points
imagePointsImage points, each point corresponds to one normalized object point
correspondencesNumber of correspondences to be checked
useDistortionParametersTrue, to respect the distortion parameters of the given camera during object point projection
sqrAveragePixelErrorAverage square projection pixel error
sqrMinimalPixelErrorMinimal square projection pixel error
sqrMaximalPixelErrorMaximal square projection pixel error

◆ determineCameraError() [2/2]

static Scalar Ocean::Geometry::Error::determineCameraError ( const PinholeCamera pinholeCamera,
const Vector2 normalizedObjectPoints,
const Vector2 imagePoints,
const size_t  correspondences,
const bool  useDistortionParameters,
Vector2 errors = nullptr,
Scalar sqrErrors = nullptr 
)
static

Determines the accuracy of the intrinsic camera matrix (and camera distortion parameters if requested).

The accuracy is determined by transforming the normalized 3D image points (3D object points transformed by the flipped and inverted extrinsic matrix) to the image plane.

Parameters
pinholeCameraThe pinhole camera object to be tested
normalizedObjectPointsNormalized object points
imagePointsImage points, each point corresponds to one normalized object point
correspondencesNumber of correspondences to be checked
useDistortionParametersTrue, to respect the distortion parameters of the given camera during object point projection
errorsOptional resulting error values individually for each given point correspondence
sqrErrorsOptional resulting squared error values individually for each given point correspondence
Returns
Returns the average square projection pixel error

◆ determineError() [1/2]

static Scalar Ocean::Geometry::Error::determineError ( const Vectors2 firstPoints,
const Vectors2 secondPoints,
Scalar sqrAverageError,
Scalar sqrMinimalError,
Scalar sqrMaximalError 
)
static

Determining the average, minimal and maximal square error between two sets of 2D positions.

Each point in the first point set correspond to a point in the second point set with same index.

Parameters
firstPointsFirst set of 2D points, each point has a corresponding point in the second set
secondPointsSecond set of 2D points
sqrAverageErrorAverage square error of all point correspondences
sqrMinimalErrorMinimal square error of all point correspondences
sqrMaximalErrorMaximal square error of all point correspondences
Returns
Sum of square errors of all point correspondences

◆ determineError() [2/2]

static Scalar Ocean::Geometry::Error::determineError ( const Vectors3 firstPoints,
const Vectors3 secondPoints,
Scalar sqrAverageError,
Scalar sqrMinimalError,
Scalar sqrMaximalError 
)
static

Returns the average, minimal and maximal square error between two sets of 3D positions.

Each point in the first point set correspond to a point in the second point set with same index.

Parameters
firstPointsFirst set of 3D points, each point has a corresponding point in the second set
secondPointsSecond set of 3D points
sqrAverageErrorAverage square error of all point correspondences
sqrMinimalErrorMinimal square error of all point correspondences
sqrMaximalErrorMaximal square error of all point correspondences
Returns
Sum of square errors of all point correspondences

◆ determineHomographyError()

template<typename TAccessorImagePoints , bool tResultingErrors, bool tResultingSqrErrors>
Scalar Ocean::Geometry::Error::determineHomographyError ( const SquareMatrix3 points1_H_points0,
const TAccessorImagePoints &  imagePointAccessor0,
const TAccessorImagePoints &  imagePointAccessor1,
Vector2 errors = nullptr,
Scalar sqrErrors = nullptr 
)
static

Determines the accuracy of a given homography for a set of corresponding image points.

The given homography H transforms a point p0 from the first set of image points to the corresponding point p1 from the second set of image points: p1 = H * p0 In case, a transformed point cannot be normalized (de-homogenized) by the z-component, the individual errors will be set to Numeric::maxValue() and the resulting average error will be accordingly.

Parameters
points1_H_points0The homography transforming points0 to points1, must be valid
imagePointAccessor0The first set of image points, may be empty
imagePointAccessor1The second set of image points, each point has a corresponding point in the first set
errorsOptional resulting error values individually for each given point correspondence
sqrErrorsOptional resulting squared error values individually for each given point correspondence
Returns
Returns the average square pixel error
Template Parameters
TAccessorImagePointsThe template type of the accessor for the image points
tResultingErrorsTrue, if errors is defined
tResultingSqrErrorsTrue, if sqrErrors is defined

◆ determineInvalidParameters()

static void Ocean::Geometry::Error::determineInvalidParameters ( const Scalar parameters,
const size_t  number,
const Scalar  threshold,
Indices32 validIndices 
)
static

Determines the indices of a set of given parameter values that are above a provided threshold.

Parameters
parametersParameter values that have to be investigated
numberThe number of provided values, with range [1, infinity)
thresholdThe threshold that is used to filter the parameter values
validIndicesResulting indices of the provided parameter values that are above the specified threshold

◆ determinePoseError() [1/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tResultingErrors, bool tResultingSqrErrors>
Scalar Ocean::Geometry::Error::determinePoseError ( const HomogenousMatrix4 world_T_camera,
const AnyCamera anyCamera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
Vector2 errors = nullptr,
Scalar sqrErrors = nullptr 
)
inlinestatic

Determines the accuracy of the camera pose based on 2D/3D correspondences.

The accuracy is determined based on the projection errors between projected 3D points and their corresponding 2D image points.

Parameters
world_T_cameraThe camera pose, transforming camera to world, must be valid
anyCameraThe camera profile defining the projection, must be valid
objectPointAccessorThe accessor providing the 3D object points corresponding to the given pose
imagePointAccessorThe accessor providing the 2D image points corresponding to the image points, one image point for each object point
errorsOptional resulting error values individually for each given point correspondence
sqrErrorsOptional resulting squared error values individually for each given point correspondence
Returns
Returns the average squared projection pixel error
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points
tResultingErrorsTrue, if errors is defined
tResultingSqrErrorsTrue, if sqrErrors is defined

◆ determinePoseError() [2/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tOnlyFrontObjectPoints>
bool Ocean::Geometry::Error::determinePoseError ( const HomogenousMatrix4 world_T_camera,
const AnyCamera camera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
Scalar sqrAveragePixelError,
Scalar sqrMinimalPixelError,
Scalar sqrMaximalPixelError 
)
inlinestatic

Determines the accuracy of a camera pose in combination with the corresponding camera profile.

The accuracy is determined by transforming the given 3D object points using the extrinsic camera parameter and projecting these points onto the image plane.

Parameters
world_T_cameraThe camera pose, transforming camera to world, with default camera pointing towards the negative z-space, with y-axis upwards, must be valid
cameraThe camera profile defining the projection, must be valid
objectPointAccessorAccessor providing the 3D object points corresponding to the given pose
imagePointAccessorAccessor providing the 2D image points corresponding to the image points
sqrAveragePixelErrorAverage square projection pixel error
sqrMinimalPixelErrorMinimal square projection pixel error
sqrMaximalPixelErrorMaximal square projection pixel error
Returns
True, if the error could be determined for all point correspondences; False, if the input was invalid or e.g., a 3D object point is located behind the camera and 'tOnlyFrontObjectPoints == true'
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points
tOnlyFrontObjectPointsTrue, to fail in case a 3D object point is not in front of the camera; False, to ignore whether 3D object points are in front of behind the camera

◆ determinePoseError() [3/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints >
void Ocean::Geometry::Error::determinePoseError ( const HomogenousMatrix4 world_T_camera,
const AnyCamera camera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
Scalar sqrAveragePixelError,
Scalar sqrMinimalPixelError,
Scalar sqrMaximalPixelError 
)
inlinestatic

Deprecated.

Determines the accuracy of a camera pose in combination with the corresponding camera profile. The accuracy is determined by transforming the given 3D object points using the extrinsic camera parameter and projecting these points onto the image plane.

Parameters
world_T_cameraThe camera pose, transforming camera to world, with default camera pointing towards the negative z-space, with y-axis upwards, must be valid
cameraThe camera profile defining the projection, must be valid
objectPointAccessorAccessor providing the 3D object points corresponding to the given pose
imagePointAccessorAccessor providing the 2D image points corresponding to the image points
sqrAveragePixelErrorAverage square projection pixel error
sqrMinimalPixelErrorMinimal square projection pixel error
sqrMaximalPixelErrorMaximal square projection pixel error
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points

◆ determinePoseError() [4/7]

Vector2 Ocean::Geometry::Error::determinePoseError ( const HomogenousMatrix4 world_T_camera,
const AnyCamera camera,
const Vector3 objectPoint,
const Vector2 imagePoint 
)
inlinestatic

Determines the accuracy of the camera pose based on 2D/3D correspondences.

The accuracy is determined based on the projection errors between projected 3D points and their corresponding 2D image points.

Parameters
world_T_cameraThe camera pose transforming camera to world, with default camera pointing towards the negative z-space, with y-axis upwards, must be valid
cameraThe camera model defining the projection, must be valid
objectPointThe 3D Object point, defined in world
imagePointThe 2D image point corresponding to the object point, defined in the camera pixel domain
Returns
The resulting error value

◆ determinePoseError() [5/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tUseBorderDistortionIfOutside, bool tResultingErrors, bool tResultingSqrErrors>
Scalar Ocean::Geometry::Error::determinePoseError ( const HomogenousMatrix4 world_T_camera,
const PinholeCamera pinholeCamera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
const bool  useDistortionParameters,
const Scalar  zoom = Scalar(1),
Vector2 errors = nullptr,
Scalar sqrErrors = nullptr 
)
inlinestatic

Determines the accuracy of the camera pose based on 2D/3D correspondences.

The accuracy is determined based on the projection errors between projected 3D points and their corresponding 2D image points.

Parameters
world_T_cameraThe camera pose transforming camera to world, must be valid
pinholeCameraThe pinhole camera model defining the projection, must be valid
objectPointAccessorThe accessor providing the 3D object points defined in world
imagePointAccessorThe accessor providing the 2D image points corresponding to the image points, one image point for each object point
useDistortionParametersTrue, to respect the distortion parameters of the given camera during object point projection
zoomThe zoom factor of the camera, with range (0, infinity), with 1 the default zoom factor
errorsOptional resulting error values individually for each given point correspondence
sqrErrorsOptional resulting squared error values individually for each given point correspondence
Returns
Returns the average squared projection pixel error
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points
tUseBorderDistortionIfOutsideTrue, to apply the camera distortion from the nearest point lying on the frame border if the point lies outside the visible camera area; False, to apply the distortion from the given position
tResultingErrorsTrue, if errors is defined
tResultingSqrErrorsTrue, if sqrErrors is defined

◆ determinePoseError() [6/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tUseBorderDistortionIfOutside>
void Ocean::Geometry::Error::determinePoseError ( const HomogenousMatrix4 world_T_camera,
const PinholeCamera pinholeCamera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
const bool  useDistortionParameters,
Scalar sqrAveragePixelError,
Scalar sqrMinimalPixelError,
Scalar sqrMaximalPixelError,
const Scalar  zoom = Scalar(1) 
)
inlinestatic

Determines the accuracy of the extrinsic and intrinsic camera matrix (and camera distortion if requested).

The accuracy is determined by transforming the given 3D object points using the extrinsic camera parameter and projecting these points onto the image plane.

Parameters
world_T_cameraThe camera pose, transforming camera to world, must be valid
pinholeCameraThe pinhole camera specifying the internal camera parameters and optionally distortion
objectPointAccessorAccessor providing the 3D object points corresponding to the given pose
imagePointAccessorAccessor providing the 2D image points corresponding to the image points
useDistortionParametersTrue, to respect the distortion parameters of the given camera during object point projection
sqrAveragePixelErrorAverage square projection pixel error
sqrMinimalPixelErrorMinimal square projection pixel error
sqrMaximalPixelErrorMaximal square projection pixel error
zoomThe zoom factor of the camera, with range (0, infinity), with 1 the default zoom factor
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points
tUseBorderDistortionIfOutsideTrue, to apply the camera distortion from the nearest point lying on the frame border if the point lies outside the visible camera area; False, to apply the distortion from the given position

◆ determinePoseError() [7/7]

Vector2 Ocean::Geometry::Error::determinePoseError ( const HomogenousMatrix4 world_T_camera,
const PinholeCamera pinholeCamera,
const Vector3 objectPoint,
const Vector2 imagePoint,
const bool  useDistortionParameters 
)
inlinestatic

Deprecated.

Determines the accuracy of the camera pose based on 2D/3D correspondences. The accuracy is determined based on the projection errors between projected 3D points and their corresponding 2D image points.

Parameters
world_T_cameraThe camera pose transforming camera to world, must be valid
pinholeCameraThe pinhole camera model defining the projection, must be valid
objectPoint3D Object point defined in world
imagePoint2D Image point corresponding to the object point
useDistortionParametersTrue, to respect the distortion parameters of the given camera during object point projection
Returns
Resulting error value

◆ determinePoseErrorIF() [1/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tResultingErrors, bool tResultingSqrErrors>
Scalar Ocean::Geometry::Error::determinePoseErrorIF ( const HomogenousMatrix4 flippedCamera_T_world,
const AnyCamera anyCamera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
Vector2 errors = nullptr,
Scalar sqrErrors = nullptr 
)
static

Determines the accuracy of the camera pose based on 2D/3D correspondences.

The accuracy is determined based on the projection errors between projected 3D points and their corresponding 2D image points.

Parameters
flippedCamera_T_worldThe inverted and flipped camera pose, transforming world to flipped camera, must be valid
anyCameraThe camera profile defining the projection, must be valid
objectPointAccessorThe accessor providing the 3D object points corresponding to the given pose
imagePointAccessorThe accessor providing the 2D image points corresponding to the image points, one image point for each object point
errorsOptional resulting error values individually for each given point correspondence
sqrErrorsOptional resulting squared error values individually for each given point correspondence
Returns
Returns the average squared projection pixel error
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points
tResultingErrorsTrue, if errors is defined
tResultingSqrErrorsTrue, if sqrErrors is defined

◆ determinePoseErrorIF() [2/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tOnlyFrontObjectPoints>
bool Ocean::Geometry::Error::determinePoseErrorIF ( const HomogenousMatrix4 flippedCamera_T_world,
const AnyCamera camera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
Scalar sqrAveragePixelError,
Scalar sqrMinimalPixelError,
Scalar sqrMaximalPixelError 
)
static

Determines the accuracy of a camera pose in combination with the corresponding camera profile.

The accuracy is determined by transforming the given 3D object points using the extrinsic camera parameter and projecting these points onto the image plane.

Parameters
flippedCamera_T_worldThe inverted and flipped camera pose, transforming world to flipped camera, with default flipped camera pointing towards the positive z-space, with y-axis downwards, must be valid
cameraThe camera profile defining the projection, must be valid
objectPointAccessorAccessor providing the 3D object points defined in world
imagePointAccessorAccessor providing the 2D image points corresponding to the image points
sqrAveragePixelErrorAverage square projection pixel error
sqrMinimalPixelErrorMinimal square projection pixel error
sqrMaximalPixelErrorMaximal square projection pixel error
Returns
True, if the error could be determined for all point correspondences; False, if the input was invalid or e.g., a 3D object point is located behind the camera and 'tOnlyFrontObjectPoints == true'
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points
tOnlyFrontObjectPointsTrue, to fail in case a 3D object point is not in front of the camera; False, to ignore whether 3D object points are in front of behind the camera

◆ determinePoseErrorIF() [3/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints >
void Ocean::Geometry::Error::determinePoseErrorIF ( const HomogenousMatrix4 flippedCamera_T_world,
const AnyCamera camera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
Scalar sqrAveragePixelError,
Scalar sqrMinimalPixelError,
Scalar sqrMaximalPixelError 
)
static

Deprecated.

Determines the accuracy of a camera pose in combination with the corresponding camera profile. The accuracy is determined by transforming the given 3D object points using the extrinsic camera parameter and projecting these points onto the image plane.

Parameters
flippedCamera_T_worldThe inverted and flipped camera pose, transforming world to flipped camera, with default flipped camera pointing towards the positive z-space, with y-axis downwards, must be valid
cameraThe camera profile defining the projection, must be valid
objectPointAccessorAccessor providing the 3D object points defined in world
imagePointAccessorAccessor providing the 2D image points corresponding to the image points
sqrAveragePixelErrorAverage square projection pixel error
sqrMinimalPixelErrorMinimal square projection pixel error
sqrMaximalPixelErrorMaximal square projection pixel error
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points

◆ determinePoseErrorIF() [4/7]

Vector2 Ocean::Geometry::Error::determinePoseErrorIF ( const HomogenousMatrix4 flippedCamera_T_world,
const AnyCamera camera,
const Vector3 objectPoint,
const Vector2 imagePoint 
)
inlinestatic

Determines the accuracy of the camera pose based on 2D/3D correspondences.

The accuracy is determined based on the projection errors between projected 3D points and their corresponding 2D image points.

Parameters
flippedCamera_T_worldThe inverted and flipped camera pose, transforming world to flipped camera, with default flipped camera pointing towards the positive z-space, with y-axis downwards, must be valid
cameraThe camera profile defining the projection, must be valid
objectPointThe 3D Object point, defined in world
imagePointThe 2D image point corresponding to the object point, defined in the camera pixel domain
Returns
The resulting error value

◆ determinePoseErrorIF() [5/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tUseBorderDistortionIfOutside, bool tResultingErrors, bool tResultingSqrErrors>
Scalar Ocean::Geometry::Error::determinePoseErrorIF ( const HomogenousMatrix4 flippedCamera_T_world,
const PinholeCamera pinholeCamera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
const bool  useDistortionParameters,
const Scalar  zoom = Scalar(1),
Vector2 errors = nullptr,
Scalar sqrErrors = nullptr 
)
static

Determines the accuracy of the camera pose based on 2D/3D correspondences.

The accuracy is determined based on the projection errors between projected 3D points and their corresponding 2D image points.

Parameters
flippedCamera_T_worldInverted and flipped extrinsic camera pose, transforming world to flipped camera, must be valid
pinholeCameraThe pinhole camera model defining the projection, must be valid
objectPointAccessorThe accessor providing the 3D object points defined in world
imagePointAccessorThe accessor providing the 2D image points corresponding to the image points, one image point for each object point
useDistortionParametersTrue, to respect the distortion parameters of the given camera during object point projection
zoomThe zoom factor of the camera, with range (0, infinity), with 1 the default zoom factor
errorsOptional resulting error values individually for each given point correspondence
sqrErrorsOptional resulting squared error values individually for each given point correspondence
Returns
Returns the average squared projection pixel error
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points
tUseBorderDistortionIfOutsideTrue, to apply the camera distortion from the nearest point lying on the frame border if the point lies outside the visible camera area; False, to apply the distortion from the given position
tResultingErrorsTrue, if errors is defined
tResultingSqrErrorsTrue, if sqrErrors is defined

◆ determinePoseErrorIF() [6/7]

template<typename TAccessorObjectPoints , typename TAccessorImagePoints , bool tUseBorderDistortionIfOutside>
void Ocean::Geometry::Error::determinePoseErrorIF ( const HomogenousMatrix4 flippedCamera_T_world,
const PinholeCamera pinholeCamera,
const TAccessorObjectPoints &  objectPointAccessor,
const TAccessorImagePoints &  imagePointAccessor,
const bool  useDistortionParameters,
Scalar sqrAveragePixelError,
Scalar sqrMinimalPixelError,
Scalar sqrMaximalPixelError,
const Scalar  zoom = Scalar(1) 
)
static

Determines the accuracy of the extrinsic and intrinsic camera matrix (and camera distortion if requested).

The accuracy is determined by transforming the given 3D object points using the extrinsic camera parameter and projecting these points onto the image plane.
Beware: The given camera matrix is not equal to a extrinsic matrix.
Instead, camera matrix is the extrinsic camera matrix flipped around the x-axis and inverted afterwards.

Parameters
flippedCamera_T_worldInverted and flipped camera pose, transforming world to flipped camera, must be valid
pinholeCameraThe pinhole camera specifying the internal camera parameters and optionally distortion
objectPointAccessorAccessor providing the 3D object points defined in world
imagePointAccessorAccessor providing the 2D image points corresponding to the image points
useDistortionParametersTrue, to respect the distortion parameters of the given camera during object point projection
sqrAveragePixelErrorAverage square projection pixel error
sqrMinimalPixelErrorMinimal square projection pixel error
sqrMaximalPixelErrorMaximal square projection pixel error
zoomThe zoom factor of the camera, with range (0, infinity), with 1 the default zoom factor
Template Parameters
TAccessorObjectPointsThe template type of the accessor for the object points
TAccessorImagePointsThe template type of the accessor for the image points
tUseBorderDistortionIfOutsideTrue, to apply the camera distortion from the nearest point lying on the frame border if the point lies outside the visible camera area; False, to apply the distortion from the given position

◆ determinePoseErrorIF() [7/7]

Vector2 Ocean::Geometry::Error::determinePoseErrorIF ( const HomogenousMatrix4 flippedCamera_T_world,
const PinholeCamera pinholeCamera,
const Vector3 objectPoint,
const Vector2 imagePoint,
const bool  useDistortionParameters 
)
inlinestatic

Deprecated.

Determines the accuracy of the camera pose based on 2D/3D correspondences. The accuracy is determined based on the projection errors between projected 3D points and their corresponding 2D image points.

Parameters
flippedCamera_T_worldInverted and flipped camera pose, transforming world to flipped camera, must be valid
pinholeCameraThe pinhole camera specifying the internal camera parameters and optionally distortion
objectPoint3D Object point defined in world
imagePoint2D Image point corresponding to the object point
useDistortionParametersTrue, to respect the distortion parameters of the given camera during object point projection
Returns
Resulting error value

◆ determineValidParameters()

static void Ocean::Geometry::Error::determineValidParameters ( const Scalar parameters,
const size_t  number,
const Scalar  threshold,
Indices32 validIndices 
)
static

Determines the indices of a set of given parameter values that are below ore equal to a provided threshold.

Parameters
parametersParameter values that have to be investigated
numberThe number of provided values, with range [1, infinity)
thresholdThe threshold that is used to filter the parameter values
validIndicesResulting indices of the provided parameter values that are below the specified threshold

◆ posesAlmostEqual() [1/3]

bool Ocean::Geometry::Error::posesAlmostEqual ( const HomogenousMatrix4 poseFirst,
const HomogenousMatrix4 poseSecond,
const Scalar  maxOrientationOffset 
)
inlinestatic

Returns whether the offsets between two given 6DOF poses are below specified thresholds.

Parameters
poseFirstFirst pose to be checked
poseSecondSecond poses to be checked
maxOrientationOffsetMaximal allowed orientation offset, defined in radian, might be Numeric::deg2rad(15)
Returns
True, if so

◆ posesAlmostEqual() [2/3]

bool Ocean::Geometry::Error::posesAlmostEqual ( const HomogenousMatrix4 poseFirst,
const HomogenousMatrix4 poseSecond,
const Vector3 maxTranslationOffset 
)
inlinestatic

Returns whether the offsets between two given 6DOF poses are below specified thresholds.

Parameters
poseFirstFirst pose to be checked
poseSecondSecond poses to be checked
maxTranslationOffsetMaximal allowed translation offset, with positive values for the individual translation axes, might be Vector3(Scalar(0.1), Scalar(0.1), Scalar(0.1))
Returns
True, if so

◆ posesAlmostEqual() [3/3]

static bool Ocean::Geometry::Error::posesAlmostEqual ( const HomogenousMatrix4 poseFirst,
const HomogenousMatrix4 poseSecond,
const Vector3 maxTranslationOffset = Vector3(Scalar(0.1), Scalar(0.1), Scalar(0.1)),
const Scalar  maxOrientationOffset = Numeric::deg2rad(15) 
)
static

Returns whether the offsets between two given 6DOF poses are below specified thresholds.

Parameters
poseFirstFirst pose to be checked
poseSecondSecond poses to be checked
maxTranslationOffsetMaximal allowed translation offset, with positive values for the individual translation axes
maxOrientationOffsetMaximal allowed orientation offset, defined in radian
Returns
True, if so

◆ uniqueAveragedRobustErrorInPointCloud()

template<Estimator::EstimatorType tEstimator>
Scalar Ocean::Geometry::Error::uniqueAveragedRobustErrorInPointCloud ( const Vector2 imagePoints,
const size_t  numberImagePoints,
const size_t  validImagePoints,
const Vector2 candidatePoints,
const size_t  numberCandidatePoints,
IndexPairs32 correspondences = nullptr 
)
static

Determines the unique robust minimal average square error between two 2D points clouds.

The given point clouds may not have the same size, and therefore the point order does not define any correspondences.
However, the number of given image points must be smaller or equal to the number of given candidate points.
The minimal error is found by determining the absolute minimal error between image points and candidate points.

Candidate points already used will not be used for any further correspondences creating unique correspondences.
The uniqueness is guaranteed due to a brute force calculation of all possible distances.

Parameters
imagePointsImage points to determine the minimal errors for, must be valid
numberImagePointsNumber of given image points, with range [1, numberCandidatePoints]
validImagePointsThe number of image points which can be expected to have a unique corresponding point inside the candidate set, with range [1, numberImagePoints]
candidatePointsPossible candidate image points to be used for finding the minimal error, must be valid
numberCandidatePointsNumber of given candidate points, with range [1, infinity)
correspondencesOptional resulting point correspondences, for each index of an image point one corresponding candidate point index will be returned
Returns
Robust averaged minimal square error
Template Parameters
tEstimatorEstimator type to be applied
See also
approximatedAveragedRobustErrorInPointCloud(), ambiguousAveragedRobustErrorInPointCloud().

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