8#ifndef META_OCEAN_TRACKING_SLAM_TRACKING_CORRESPONDENCES_H
9#define META_OCEAN_TRACKING_SLAM_TRACKING_CORRESPONDENCES_H
148 inline size_t size()
const;
This class implements a frame pyramid.
Definition FramePyramid.h:46
EstimatorType
Definition of individual robust estimator types.
Definition Estimator.h:34
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 tracking parameters for different tracking modes.
Definition tracking/slam/Tracker.h:167
UnorderedIndexSet32 pointIdSet_
Set of point ids for fast lookup, workaround for separation between localized object points and point...
Definition TrackingCorrespondences.h:174
Vectors2 previousImagePoints_
The 2D image points in the previous frame.
Definition TrackingCorrespondences.h:165
const Vectors2 & currentImagePoints() const
Returns the current image points.
Definition TrackingCorrespondences.h:203
const Vectors3 & objectPoints() const
Returns the 3D object points for localized correspondences.
Definition TrackingCorrespondences.h:218
const Vectors2 & previousImagePoints() const
Returns the previous image points.
Definition TrackingCorrespondences.h:198
void trackImagePoints(const Index32 currentFrameIndex, const AnyCamera &camera, const HomogenousMatrix4 &world_T_previousCamera, const CV::FramePyramid &yPreviousFramePyramid, const CV::FramePyramid &yCurrentFramePyramid, const Tracker::TrackingParameters &trackingParameters, const Quaternion &previousCamera_Q_currentCamera, const LocalizedObjectPoint::LocalizationPrecision minimalFrontPrecision)
Tracks the image points from the previous frame to the current frame.
bool optimizePreviousCameraPose(const AnyCamera &camera, const HomogenousMatrix4 &world_T_previousCamera, const size_t minimalCorrespondences, HomogenousMatrix4 &world_T_optimizedPreviousCamera, const Geometry::Estimator::EstimatorType estimatorType, const Geometry::GravityConstraints *gravityConstraints) const
Optimizes the previous camera pose using the stored correspondences.
size_t size() const
Returns the number of correspondences.
Definition TrackingCorrespondences.h:228
Index32 previousFrameIndex() const
Returns the previous frame index.
Definition TrackingCorrespondences.h:188
LocalizedObjectPoint::LocalizationPrecisions objectPointPrecisions_
The localization precisions for localized correspondences.
Definition TrackingCorrespondences.h:183
const LocalizedObjectPoint::LocalizationPrecisions & objectPointPrecisions() const
Returns the localization precisions for localized correspondences.
Definition TrackingCorrespondences.h:223
Indices32 pointIds_
The unique IDs of the points, one for each previous image point.
Definition TrackingCorrespondences.h:171
Index32 mapVersion() const
Returns the map version.
Definition TrackingCorrespondences.h:193
TrackingCorrespondences()
Creates a new tracking correspondences object with reserved memory.
ValidCorrespondences validCorrespondences_
Flags indicating which correspondences are valid after tracking.
Definition TrackingCorrespondences.h:177
Vectors3 objectPoints_
The 3D object points for localized correspondences.
Definition TrackingCorrespondences.h:180
const ValidCorrespondences & validCorrespondences() const
Returns the valid correspondences flags.
Definition TrackingCorrespondences.h:213
void update(const Index32 previousFrameIndex, const Index32 mapVersion, const LocalizedObjectPointMap &localizedObjectPointMap, PointTrackMap &pointTrackMap, const LocalizedObjectPoint::LocalizationPrecision minimalFrontPrecision)
Updates the internal data structures for a new frame.
Index32 previousFrameIndex_
The index of the previous frame.
Definition TrackingCorrespondences.h:159
Index32 mapVersion_
The map version at the time the correspondences were gathered.
Definition TrackingCorrespondences.h:162
const Indices32 & pointIds() const
Returns the point IDs.
Definition TrackingCorrespondences.h:208
bool isEmpty() const
Returns whether there are no correspondences.
Definition TrackingCorrespondences.h:235
Vectors2 currentImagePoints_
The 2D image points in the current frame, one for each previous image point.
Definition TrackingCorrespondences.h:168
size_t countValidCorrespondences() const
Counts the number of valid correspondences.
std::vector< uint8_t > ValidCorrespondences
Definition of valid correspondence flags.
Definition TrackingCorrespondences.h:44
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition Base.h:96
std::unordered_set< Index32 > UnorderedIndexSet32
Definition of an unordered_set holding 32 bit indices.
Definition Base.h:126
GravityConstraintsT< Scalar > GravityConstraints
Definition of the GravityConstraints object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either ...
Definition GravityConstraints.h:36
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition Vector2.h:64
QuaternionT< Scalar > Quaternion
Definition of the Quaternion object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with sin...
Definition Quaternion.h:40
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
AnyCameraT< Scalar > AnyCamera
Definition of an AnyCamera object with Scalar precision.
Definition AnyCamera.h:31
std::vector< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition Vector3.h:65
std::unordered_map< Index32, PointTrack > PointTrackMap
Definition of an unordered map mapping object point ids to point tracks.
Definition PointTrack.h:32
std::unordered_map< Index32, LocalizedObjectPoint > LocalizedObjectPointMap
Definition of an unordered map mapping object point ids to localized object points.
Definition LocalizedObjectPoint.h:43
Namespace of the SLAM Tracking library.
Definition BackgroundTask.h:24
Namespace of the Tracker library.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15