8#ifndef META_OCEAN_DEVICES_SLAM_TRACKER_6DOF_H
9#define META_OCEAN_DEVICES_SLAM_TRACKER_6DOF_H
92 static inline std::string deviceNameSLAMTracker6DOF();
98 static inline DeviceType deviceTypeSLAMTracker6DOF();
146 template <
unsigned int tSize>
237 size_t initializationImagePointsDetermined_ = 0;
266 return std::string(
"SLAM Feature Based 6DOF Tracker");
This class implements the abstract base class for all AnyCamera objects.
Definition AnyCamera.h:130
This class implements a frame pyramid.
Definition FramePyramid.h:37
Definition of a class holding the major and minor device type.
Definition devices/Device.h:62
unsigned int ObjectId
Definition of an object id.
Definition Measurement.h:46
This class implements a device for the SLAM library.
Definition SLAMDevice.h:29
This class implements a device factory for the SLAM feature based tracking system.
Definition SLAMFactory.h:29
This class implements an SLAM feature based tracker.
Definition SLAMTracker6DOF.h:42
static Indices32 extractLocatedImagePointIndices(const size_t numberLocatedPreviousImagePoints, const Indices32 &validIndices)
Extracts the indices of the combined image points belonging to the group of image points for which a ...
static void extendTrackingDatabase(const AnyCamera &camera, ObservationGroups &observationGroups, Vectors3 &objectPoints, Vectors2 &imagePoints, const unsigned int minimalObservations=20u)
Extends the tracking database by determining the locations of 3D object points based on the observati...
bool stop() override
Stops the device.
bool isStarted() const override
Returns whether this device is active.
static Vectors2 combineImagePointGroups(const Vectors2 &locatedPreviousImagePoints, const ObservationGroups &unlocatedObservationGroups, const Vectors2 &newObservations)
Combines three groups of image points to one large set of image points.
static std::string deviceNameSLAMTracker6DOF()
Returns the name of this tracker.
Definition SLAMTracker6DOF.h:264
Timestamp initializationTimestamp_
The timestamp after which the first stereo vision frame may be used.
Definition SLAMTracker6DOF.h:240
static void extractUnlocatedImagePoints(const Vectors2 &combinedImagePoints, const size_t numberLocatedPreviousImagePoints, const Indices32 &validIndices, const HomogenousMatrix4 &world_T_camera, ObservationGroups &observationGroups)
Extracts the image points for which no known 3D object point location has been determined already fro...
Timestamp recentFrameTimestamp_
Most recent sample timestamp.
Definition SLAMTracker6DOF.h:225
~SLAMTracker6DOF() override
Destructs an SLAM feature based 6DOF tracker object.
CV::FramePyramid previousFramePyramid_
The frame pyramid of the previous frame.
Definition SLAMTracker6DOF.h:252
std::pair< HomogenousMatrix4, Vector2 > Observation
Definition of a pair holding a camera pose and image point.
Definition SLAMTracker6DOF.h:50
std::vector< Observation > Observations
Definition of a vector holding observations.
Definition SLAMTracker6DOF.h:55
static Scalar medianObservationAngle(const AnyCamera &camera, const Observations &observations)
Determines the median angle between the mean viewing ray and all individual viewing rays of an object...
SharedAnyCamera camera_
The camera profile defining the projection.
Definition SLAMTracker6DOF.h:228
std::vector< Observations > ObservationGroups
Definition of a vector holding observation groups.
Definition SLAMTracker6DOF.h:60
static bool determineInitialObjectPoints(const AnyCamera &camera, const Vectors2 &firstImagePoints, const Vectors2 &secondImagePoints, HomogenousMatrix4 &world_T_camera, Vectors3 &objectPoints, Indices32 &validImagePoints)
Determines the locations of initial 3D object points from two sets of corresponding image points from...
Vectors2 initializationFirstImagePoints_
The 2D image points located in the first stereo vision frame which will be used for initialization.
Definition SLAMTracker6DOF.h:231
SLAMTracker6DOF()
Creates a new SLAM feature based 6DOF tracker object.
static Vectors2 extractLocatedImagePoints(const Vectors2 &combinedImagePoints, const size_t numberLocatedPreviousImagePoints, const Indices32 &validIndices)
Extracts the image points of already located 3D object points from the set of combined image points.
static void determineFeaturePoints(const Frame &frame, const Vectors2 &alreadyKnownFeaturePoints, Vectors2 &newFeaturePoints, const unsigned int binSize=50u, Worker *worker=nullptr)
Determines feature points in a given camera frame, scatters the feature points into individual bins w...
Vectors2 initializationRecentImagePoints_
The 2D image points located in the recent stereo vision frame which will be used for initialization.
Definition SLAMTracker6DOF.h:234
CV::FramePyramid currentFramePyramid_
The frame pyramid of the current frame.
Definition SLAMTracker6DOF.h:249
void threadRun() override
Thread function.
void postPose(const HomogenousMatrix4 &world_T_camera, const Timestamp ×tamp)
Posts a new camera pose.
static DeviceType deviceTypeSLAMTracker6DOF()
Returns the type of this tracker.
Definition SLAMTracker6DOF.h:269
Vectors2 imagePoints_
The 2D image points currently used for tracking.
Definition SLAMTracker6DOF.h:246
ObservationGroups observationGroups_
The observation groups of feature point candidates.
Definition SLAMTracker6DOF.h:258
bool start() override
Starts the device.
bool isObjectTracked(const ObjectId &objectId) const override
Returns whether a specific object is currently actively tracked by this tracker.
static bool trackPoints(const CV::FramePyramid &previousFramePyramid, const CV::FramePyramid ¤tFramePyramid, const Vectors2 &previousImagePoints, Vectors2 ¤tImagePoints, Indices32 &validIndices, Worker *worker=nullptr)
Tracks feature points from a previous frame to the current frame.
Timestamp frameTimestamp_
Frame timestamp.
Definition SLAMTracker6DOF.h:222
Vectors3 objectPoints_
The 3D object points currently used for tracking.
Definition SLAMTracker6DOF.h:243
This class implements the base for all 6DOF trackers.
Definition Tracker6DOF.h:39
static DeviceType deviceTypeTracker6DOF()
Definition of this device type.
Definition Tracker6DOF.h:100
@ TRACKER_VISUAL
Tracker using a visual input for their measurements.
Definition devices/Tracker.h:62
This class is the base class for all tracker using visual input to create the tracking results.
Definition devices/VisualTracker.h:41
This class implements Ocean's image class.
Definition Frame.h:1808
This class implements a thread.
Definition Thread.h:115
This class implements a timestamp.
Definition Timestamp.h:36
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition Base.h:96
float Scalar
Definition of a scalar type.
Definition Math.h:129
std::shared_ptr< AnyCamera > SharedAnyCamera
Definition of a shared pointer holding an AnyCamera object with Scalar precision.
Definition AnyCamera.h:60
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition Vector2.h:64
std::vector< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition Vector3.h:65
The namespace covering the entire Ocean framework.
Definition Accessor.h:15