8#ifndef META_OCEAN_TRACKING_RMV_RMV_TRACKER_6DOF_H
9#define META_OCEAN_TRACKING_RMV_RMV_TRACKER_6DOF_H
249 static unsigned int refinePoseIF(
const HomogenousMatrix4& roughFlippedCamera_T_world,
const AnyCamera& camera,
const Vectors2& imagePoints,
const Vectors3& objectPoints,
HomogenousMatrix4& flippedCamera_T_world,
const unsigned int useNumberImagePoints,
const unsigned int useNumberObjectPoints,
const Scalar searchWindow,
const Scalar uniquenessSqrFactor,
const Scalar maxSqrDistance = Numeric::maxValue(),
Worker* worker =
nullptr);
315 ocean_assert(camera.
isValid());
This class implements the abstract base class for all AnyCamera objects.
Definition AnyCamera.h:131
virtual unsigned int width() const =0
Returns the width of the camera image.
virtual unsigned int height() const =0
Returns the height of the camera image.
virtual bool isValid() const =0
Returns whether this camera is valid.
This class implements a base class for all indexed-based accessors allowing a constant reference acce...
Definition Accessor.h:241
This class implements Ocean's image class.
Definition Frame.h:1879
This class implements a recursive lock object.
Definition Lock.h:31
This class implements a generator for random numbers.
Definition RandomGenerator.h:42
This class implements a signal.
Definition Signal.h:31
This class implements a thread.
Definition Thread.h:115
This class implements a set of pose projections.
Definition PoseProjection.h:121
DetectorType
Definition of individual feature detectors.
Definition RMVFeatureDetector.h:41
This class implements a feature map.
Definition RMVFeatureMap.h:33
This class implements a RMV feature tracker.
Definition RMVFeatureTracker6DOF.h:43
bool determinePoseWithRoughPose(const HomogenousMatrix4 &world_T_roughCamera, const AnyCamera &camera, Vectors2 &imagePoints, HomogenousMatrix4 &world_T_camera, Worker *worker)
Determines the precise camera pose based on an already known rough camera pose.
bool determinePoseWithStrongPreviousCorrespondences(const HomogenousMatrix4 &world_T_roughCamera, const AnyCamera &camera, Vectors2 &imagePoints, HomogenousMatrix4 &world_T_camera, Worker *worker)
Determines a precise pose based on a rough camera pose and mainly based on strong feature corresponde...
bool determinePoseWithAnyPreviousCorrespondences(const HomogenousMatrix4 &world_T_roughCamera, const AnyCamera &camera, Vectors2 &imagePoints, HomogenousMatrix4 &world_T_camera, Worker *worker)
Determines a precise pose based on a rough camera pose and mainly based on any feature correspondence...
Signal trackerAsynchronousSignal_
The signal used to invoke the asynchronous data processing function.
Definition RMVFeatureTracker6DOF.h:297
Scalar trackerFeatureDetectorStrength_
The current strength threshold for the feature tracker, will be adjusted as time goes by,...
Definition RMVFeatureTracker6DOF.h:270
static unsigned int refinePoseIF(const HomogenousMatrix4 &roughFlippedCamera_T_world, const AnyCamera &camera, const Vectors2 &imagePoints, const Vectors3 &objectPoints, HomogenousMatrix4 &flippedCamera_T_world, const unsigned int useNumberImagePoints, const unsigned int useNumberObjectPoints, const Scalar searchWindow, const Scalar uniquenessSqrFactor, const Scalar maxSqrDistance=Numeric::maxValue(), Worker *worker=nullptr)
Refines a rough camera pose by application of guessed feature correspondences between projected objec...
static void addUniqueCorrespondencesIF(const HomogenousMatrix4 &roughFlippedCamera_T_world, const AnyCamera &camera, const Vector2 *imagePoints, const size_t numberImagePoints, const ConstIndexedAccessor< Vector3 > &objectPointAccessor, const Scalar searchWindow, const Scalar uniquenessSqrFactor, Vectors3 &resultingObjectPoints, Vectors2 &resultingImagePoints)
Adds unique and reliable 2D/3D correspondences based on known reliable object points (e....
RMVFeatureMap trackerFeatureMap_
Feature map of this tracker.
Definition RMVFeatureTracker6DOF.h:261
RMVFeatureTracker6DOF(const RMVFeatureDetector::DetectorType detectorType)
Creates a new RMV feature tracker object.
RandomGenerator trackerRandomGenerator_
The random number generator object to be used.
Definition RMVFeatureTracker6DOF.h:282
const RMVFeatureMap & featureMap() const
Returns the feature map of this tracker.
Definition RMVFeatureTracker6DOF.h:308
bool internDeterminePose(const Frame &frame, const AnyCamera &camera, const bool frameIsUndistorted, HomogenousMatrix4 &world_T_camera, Worker *worker)
Determines the camera pose for a given frame (should be the current frame).
RMVFeatureDetector::DetectorType trackerDetectorType_
The type of the feature detector to be used.
Definition RMVFeatureTracker6DOF.h:267
Vectors2 trackerAsynchronousDataProcessingImagePoints_
The image points to be used during the asynchronous data processing function.
Definition RMVFeatureTracker6DOF.h:294
bool determinePoses(const Frames &frames, const SharedAnyCameras &anyCameras, TransformationSamples &transformations, const Quaternion &world_R_camera=Quaternion(false), Worker *worker=nullptr) override
Executes the tracking step for a collection of frames and corresponding cameras.
size_t trackerMaximalPoseProjectionFeatureNumber_
Maximal number of feature points to be used for the pose projections, with range [10,...
Definition RMVFeatureTracker6DOF.h:273
bool determinePoseWithoutKnowledgePyramid(const Frame &frame, const AnyCamera &camera, HomogenousMatrix4 &world_T_camera, Worker *worker)
Determines the camera pose if no reliable knowledge is given from any previous camera frame.
HomogenousMatrix4 trackerAsynchronousDataProcessingFlippedCamera_T_world_
The inverted and flipped camera pose to be used during the asynchronous data processing function.
Definition RMVFeatureTracker6DOF.h:288
bool refinePoseWithStrongPreviousCorrespondencesIF(const HomogenousMatrix4 &roughFlippedCamera_T_world, const AnyCamera &camera, const Vectors2 &imagePoints, HomogenousMatrix4 &flippedCamera_T_world)
Refines a rough camera pose by application of strong feature correspondences from the previous frame.
bool determineUsedFeaturesIF(const HomogenousMatrix4 &fineFlippedCamera_T_world, const AnyCamera &camera, const Vectors2 &imagePoints, const size_t minimalStrongObjectPoints, Indices32 &strongObjectPointIndices, Indices32 &moderateObjectPointIndices, Indices32 &usedObjectPointIndices)
Determines the used 3D object points using the final most accurate pose possible.
bool asynchronousDataProcessed()
Returns whether the data that is processed asynchronously (between two successive camera frame - dire...
bool determinePoses(const Frame &frame, const PinholeCamera &camera, const bool frameIsUndistorted, TransformationSamples &transformations, const Quaternion &previousCamera_R_camera=Quaternion(false), Worker *worker=nullptr) override
Deprecated.
Lock trackerAsynchronousDataProcessingLock_
The lock for the asynchronous data processing function.
Definition RMVFeatureTracker6DOF.h:300
Vectors2 detectFeatures(const Frame &yFrame, const bool frameIsUndistorted, const Box2 &boundingBox=Box2(), Worker *worker=nullptr)
Detects feature points in a given frame optional within a defined sub-region.
Scalar trackerSemiStrongCorrespondencesEmptyAreaRadius_
The radius defining the circle around each semi-strong feature point not containing more than one pro...
Definition RMVFeatureTracker6DOF.h:279
void startAsynchronousDataProcessingIF(const HomogenousMatrix4 &flippedCamera_T_world, const AnyCamera &camera, Vectors2 &&imagePoints)
Starts the asynchronous data processing for precise (inverted and flipped) pose an the corresponding ...
PoseProjectionSet trackerPoseProjectionSet_
Pose projection set.
Definition RMVFeatureTracker6DOF.h:264
void setFeatureMap(const RMVFeatureMap &featureMap, RandomGenerator &randomGenerator, const bool autoUpdateMaxPositionOffset=true)
Sets or changes the feature map for this tracker.
static Scalar cameraResolutionFactor(const AnyCamera &camera)
Returns a size factor that reflects the size of the current camera resolution.
Definition RMVFeatureTracker6DOF.h:313
bool trackerAsynchronousDataProcessingActive_
True, if the asynchronous data processing function is currently active.
Definition RMVFeatureTracker6DOF.h:285
SharedAnyCamera trackerAsynchronousDataProcessingCamera_
The camera profile to be used during the asynchronous data processing function.
Definition RMVFeatureTracker6DOF.h:291
Scalar trackerStrongCorrespondencesEmptyAreaRadius_
The radius defining the circle around each strong feature point not containing more than one projecte...
Definition RMVFeatureTracker6DOF.h:276
bool determinePoseWithoutKnowledgeDefault(const AnyCamera &camera, const Vectors2 &imagePoints, HomogenousMatrix4 &world_T_camera, Worker *worker)
Determines the camera pose if no reliable knowledge is given from any previous camera frame.
void threadRun() override
Thread run function.
RMVFeatureDetector::DetectorType detectorType() const
Returns the feature detector type of this tracker.
Definition RMVFeatureTracker6DOF.h:303
~RMVFeatureTracker6DOF()
Destructs a RMV feature tracker object.
This class implements a base class for all visual tracker objects.
Definition tracking/VisualTracker.h:45
std::vector< TransformationSample > TransformationSamples
Definition of a vector holding a transformation sample object.
Definition tracking/VisualTracker.h:98
T length() const
Returns the length of the vector.
Definition Vector2.h:627
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
std::vector< Frame > Frames
Definition of a vector holding padding frames.
Definition Frame.h:1842
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::shared_ptr< AnyCamera > SharedAnyCamera
Definition of a shared pointer holding an AnyCamera object with Scalar precision.
Definition AnyCamera.h:61
std::vector< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition Vector3.h:65
VectorT2< Scalar > Vector2
Definition of a 2D vector.
Definition Vector2.h:28
SharedAnyCamerasT< Scalar > SharedAnyCameras
Definition of a vector holding AnyCamera objects.
Definition AnyCamera.h:91
The namespace covering the entire Ocean framework.
Definition Accessor.h:15