8#ifndef META_OCEAN_TRACKING_SLAM_POSE_CORRESPONDENCES_H
9#define META_OCEAN_TRACKING_SLAM_POSE_CORRESPONDENCES_H
68 inline size_t size()
const;
74 inline bool isEmpty()
const;
This class implements the abstract base class for all AnyCamera objects.
Definition AnyCamera.h:131
EstimatorType
Definition of individual robust estimator types.
Definition Estimator.h:34
This class implements a container allowing to define gravity constraints during e....
Definition GravityConstraints.h:63
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
LocalizationPrecision
Definition of possible localization precisions.
Definition LocalizedObjectPoint.h:59
std::vector< LocalizationPrecision > LocalizationPrecisions
Definition of a vector holding localization precisions.
Definition LocalizedObjectPoint.h:75
This class holds 2D-3D point correspondences for camera pose estimation.
Definition PoseCorrespondences.h:39
LocalizedObjectPoint::LocalizationPrecisions precisions_
The localization precisions of the object points, one for each object point.
Definition PoseCorrespondences.h:124
Scalars imagePointSqrDistances_
The squared distances between previous and current image points (for motion estimation),...
Definition PoseCorrespondences.h:127
void applyInlierSubset()
Filters the arrays to contain only inlier correspondences.
void clear()
Clears all data for reuse.
SharedCameraPose determinePose(const AnyCamera &camera, const HomogenousMatrix4 &world_T_previousCamera, const unsigned int minimalNumberCorrespondences, RandomGenerator &randomGenerator, const Scalar maximalProjectionError, const Geometry::Estimator::EstimatorType estimatorType, const Geometry::GravityConstraints *gravityConstraints, Scalar *robustError=nullptr)
Estimates the camera pose from the correspondences.
Vectors3 objectPoints_
The 3D object points in world coordinates.
Definition PoseCorrespondences.h:115
void addCorrespondence(const Vector3 &objectPoint, const Vector2 &imagePoint, const Index32 objectPointId, const LocalizedObjectPoint::LocalizationPrecision precision, const Scalar imagePointSqrDistance=0)
Adds a correspondence.
Definition PoseCorrespondences.h:147
PoseCorrespondences()
Creates a new pose correspondences object.
void reset(const TrackingCorrespondences &trackingCorrespondences)
Resets and prepares pose correspondences from tracking correspondences.
Indices32 objectPointIds_
The unique identifiers of the object points, one for each object point.
Definition PoseCorrespondences.h:121
size_t size() const
Returns the number of correspondences.
Definition PoseCorrespondences.h:156
Indices32 inlierIndices_
The indices of inlier correspondences (into the arrays).
Definition PoseCorrespondences.h:144
void reserve(const size_t capacity)
Reserves memory for the expected number of correspondences.
UnorderedIndexSet32 preciseObjectPointIds_
The IDs of object points that contributed precisely to the pose (for debugging/visualization).
Definition PoseCorrespondences.h:133
UnorderedIndexSet32 impreciseObjectPointIds_
The IDs of object points that did not contribute precisely to the pose (for debugging/visualization).
Definition PoseCorrespondences.h:136
Vectors2 imagePoints_
The 2D image point observations, one for each object point.
Definition PoseCorrespondences.h:118
bool isEmpty() const
Returns whether no correspondences exist.
Definition PoseCorrespondences.h:164
Indices32 outlierObjectPointIds_
The IDs of object points that were outliers.
Definition PoseCorrespondences.h:130
This class holds 2D-2D point correspondences for frame-to-frame tracking.
Definition TrackingCorrespondences.h:40
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition Base.h:96
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
std::unordered_set< Index32 > UnorderedIndexSet32
Definition of an unordered_set holding 32 bit indices.
Definition Base.h:126
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition Vector2.h:64
float Scalar
Definition of a scalar type.
Definition Math.h:129
std::vector< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition Vector3.h:65
std::vector< Scalar > Scalars
Definition of a vector holding Scalar objects.
Definition Math.h:145
std::shared_ptr< CameraPose > SharedCameraPose
Definition of a shared pointer holding a CameraPose object.
Definition CameraPose.h:36
The namespace covering the entire Ocean framework.
Definition Accessor.h:15