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& roughPoseIF,
const PinholeCamera& pinholeCamera,
const Vectors2& imagePoints,
const Vectors3& objectPoints,
HomogenousMatrix4& poseIF,
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(pinholeCamera.
isValid());
This class implements Ocean's image class.
Definition: Frame.h:1792
This class implements a recursive lock object.
Definition: Lock.h:31
static constexpr T maxValue()
Returns the max scalar value.
Definition: Numeric.h:3244
unsigned int width() const
Returns the width of the camera image.
Definition: PinholeCamera.h:1300
bool isValid() const
Returns whether this camera is valid.
Definition: PinholeCamera.h:1572
unsigned int height() const
Returns the height of the camera image.
Definition: PinholeCamera.h:1306
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:131
DetectorType
Definition of individual feature detectors.
Definition: RMVFeatureDetector.h:41
This class implements a feature map.
Definition: RMVFeatureMap.h:35
This class implements a RMV feature tracker.
Definition: RMVFeatureTracker6DOF.h:43
Scalar trackerSemiStrongCorrespondencesEmptyAreaRadius
The radius defining the circle around each semi-strong feature point not containing more than one pro...
Definition: RMVFeatureTracker6DOF.h:279
bool determinePoseWithAnyPreviousCorrespondences(const HomogenousMatrix4 &roughPose, const PinholeCamera &pinholeCamera, Vectors2 &imagePoints, HomogenousMatrix4 &pose, Worker *worker)
Determines a precise pose based on a rough camera pose and mainly based on any feature correspondence...
RMVFeatureTracker6DOF(const RMVFeatureDetector::DetectorType detectorType)
Creates a new RMV feature tracker object.
static Scalar cameraResolutionFactor(const PinholeCamera &pinholeCamera)
Returns a size factor that reflects the size of the current camera resolution.
Definition: RMVFeatureTracker6DOF.h:313
void startAsynchronousDataProcessingIF(const HomogenousMatrix4 &poseIF, const PinholeCamera &pinholeCamera, Vectors2 &&imagePoints)
Starts the asynchronous data processing for precise (inverted and flipped) pose an the corresponding ...
const RMVFeatureMap & featureMap() const
Returns the feature map of this tracker.
Definition: RMVFeatureTracker6DOF.h:308
Lock trackerAsynchronousDataProcessingLock
The lock for the asynchronous data processing function.
Definition: RMVFeatureTracker6DOF.h:300
PinholeCamera trackerAsynchronousDataProcessingCamera
The camera profile to be used during the asynchronous data processing function.
Definition: RMVFeatureTracker6DOF.h:291
bool determinePoses(const Frame &frame, const PinholeCamera &pinholeCamera, const bool frameIsUndistorted, TransformationSamples &transformations, const Quaternion &previousCamera_R_camera=Quaternion(false), Worker *worker=nullptr) override
Deprecated.
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.
Signal trackerAsynchronousSignal
The signal used to invoke the asynchronous data processing function.
Definition: RMVFeatureTracker6DOF.h:297
RMVFeatureDetector::DetectorType trackerDetectorType
The type of the feature detector to be used.
Definition: RMVFeatureTracker6DOF.h:267
static unsigned int refinePoseIF(const HomogenousMatrix4 &roughPoseIF, const PinholeCamera &pinholeCamera, const Vectors2 &imagePoints, const Vectors3 &objectPoints, HomogenousMatrix4 &poseIF, 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 coorespondences between projected objec...
bool asynchronousDataProcessed()
Returns whether the data that is processed asynchronously (between two successive camera frame - dire...
bool trackerAsynchronousDataProcessingActive
True, if the asynchronous data processing function is currently active.
Definition: RMVFeatureTracker6DOF.h:285
bool determineUsedFeaturesIF(const HomogenousMatrix4 &finePoseIF, const PinholeCamera &pinholeCamera, 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.
RandomGenerator trackerRandomGenerator
The random number generator object to be used.
Definition: RMVFeatureTracker6DOF.h:282
Vectors2 trackerAsynchronousDataProcessingImagePoints
The image points to be used during the asynchronous data processing function.
Definition: RMVFeatureTracker6DOF.h:294
bool determinePoseWithoutKnowledgeDefault(const PinholeCamera &pinholeCamera, const Vectors2 &imagePoints, HomogenousMatrix4 &pose, Worker *worker)
Determines the camera pose if no reliable knowledge is given from any previous camera frame.
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 trackerFeatureDetectorStrength
The current strength threshold for the feature tracker, will be adjusted as time goes by,...
Definition: RMVFeatureTracker6DOF.h:270
Scalar trackerStrongCorrespondencesEmptyAreaRadius
The radius defining the circle around each strong feature point not containing more than one projecte...
Definition: RMVFeatureTracker6DOF.h:276
void setFeatureMap(const RMVFeatureMap &featureMap, RandomGenerator &randomGenerator, const bool autoUpdateMaxPositionOffset=true)
Sets or changes the feature map for this tracker.
PoseProjectionSet trackerPoseProjectionSet
Pose projection set.
Definition: RMVFeatureTracker6DOF.h:264
bool refinePoseWithStrongPreviousCorrespondencesIF(const HomogenousMatrix4 &roughPoseIF, const PinholeCamera &pinholeCamera, const Vectors2 &imagePoints, HomogenousMatrix4 &poseIF)
Refines a rough camera pose by application of strong feature correspondences from the previous frame.
RMVFeatureMap trackerFeatureMap
Feature map of this tracker.
Definition: RMVFeatureTracker6DOF.h:261
bool determinePoseWithStrongPreviousCorrespondences(const HomogenousMatrix4 &roughPose, const PinholeCamera &pinholeCamera, Vectors2 &imagePoints, HomogenousMatrix4 &pose, Worker *worker)
Determines a precise pose based on a rough camera pose and mainly based on strong feature corresponde...
void threadRun() override
Thread run function.
RMVFeatureDetector::DetectorType detectorType() const
Returns the feature detector type of this tracker.
Definition: RMVFeatureTracker6DOF.h:303
bool internDeterminePose(const Frame &frame, const PinholeCamera &pinholeCamera, const bool frameIsUndistorted, HomogenousMatrix4 &pose, Worker *worker)
Determines the camera pose for a given frame (should be the current frame).
size_t trackerMaximalPoseProjectionFeatureNumber
Maximal number of feature points to be used for the pose projections, with range [10,...
Definition: RMVFeatureTracker6DOF.h:273
~RMVFeatureTracker6DOF()
Destructs a RMV feature tracker object.
bool determinePoseWithRoughPose(const HomogenousMatrix4 &roughPose, const PinholeCamera &pinholeCamera, Vectors2 &imagePoints, HomogenousMatrix4 &pose, Worker *worker)
Determines the precise camera pose based on an already known rough camera pose.
static void addUniqueCorrespondencesIF(const HomogenousMatrix4 &roughPoseIF, const PinholeCamera &pinholeCamera, 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....
bool determinePoseWithoutKnowledgePyramid(const Frame &frame, const PinholeCamera &pinholeCamera, HomogenousMatrix4 &pose, Worker *worker)
Determines the camera pose if no reliable knowledge is given from any previous camera frame.
HomogenousMatrix4 trackerAsynchronousDataProcessingPoseIF
The inverted and flipped camera pose to be used during the asynchronous data processing function.
Definition: RMVFeatureTracker6DOF.h:288
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:615
This class implements a worker able to distribute function calls over different threads.
Definition: Worker.h:33
std::vector< Frame > Frames
Definition of a vector holding padding frames.
Definition: Frame.h:1755
std::vector< Index32 > Indices32
Definition of a vector holding 32 bit index values.
Definition: Base.h:96
QuaternionT< Scalar > Quaternion
Definition of the Quaternion object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with sin...
Definition: Quaternion.h:33
float Scalar
Definition of a scalar type.
Definition: Math.h:128
std::vector< Vector2 > Vectors2
Definition of a vector holding Vector2 objects.
Definition: Vector2.h:64
SharedAnyCamerasT< Scalar > SharedAnyCameras
Definition of a vector holding AnyCamera objects.
Definition: AnyCamera.h:90
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:21
BoxT2< Scalar > Box2
Definition of the Box2 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single or...
Definition: Box2.h:22
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15