8#ifndef META_OCEAN_TRACKING_RMV_RMV_FEATURE_MAP_H
9#define META_OCEAN_TRACKING_RMV_RMV_FEATURE_MAP_H
48 inline const Vectors3& objectPoints()
const;
56 inline const Vectors3& initializationObjectPoints()
const;
62 inline const Indices32& recentStrongObjectPointIndices()
const;
68 inline const Indices32& recentSemiStrongObjectPointIndices()
const;
74 inline const Indices32& recentUsedObjectPointIndices()
const;
82 inline Vectors3 recentUsedObjectPoints(
const size_t maxNumber =
size_t(-1))
const;
90 inline void setMostRecentObjectPointIndices(
Indices32&& strongObjectPointIndices,
Indices32&& semiStrongObjectPointIndices,
Indices32&& usedObjectPointIndices);
96 inline void clearMostRecentObjectPointIndices();
103 inline const Box3& boundingBox()
const;
130 inline const Box3& initializationBoundingBox()
const;
195 inline bool isEmpty()
const;
201 explicit inline operator bool()
const;
267 ocean_assert(maxNumber != 0);
273 for (
size_t n = 0; n < number; ++n)
288 for (Indices32::const_iterator i = strongObjectPointIndices.begin(); i != strongObjectPointIndices.end(); ++i)
292 for (Indices32::const_iterator iS = semiStrongObjectPointIndices.begin(); iS != semiStrongObjectPointIndices.end(); ++iS)
299 ocean_assert(!found);
304 for (
size_t n = 1; n < strongObjectPointIndices.size(); ++n)
305 ocean_assert(strongObjectPointIndices[n - 1] < strongObjectPointIndices[n]);
307 for (
size_t n = 1; n < semiStrongObjectPointIndices.size(); ++n)
308 ocean_assert(semiStrongObjectPointIndices[n - 1] < semiStrongObjectPointIndices[n]);
310 for (
size_t n = 1; n < usedObjectPointIndices.size(); ++n)
311 ocean_assert(usedObjectPointIndices[n - 1] < usedObjectPointIndices[n]);
358inline RMVFeatureMap::operator bool()
const
360 return !mapObjectPoints.empty();
bool isValid() const
Returns whether the bounding box is valid.
This class implements Ocean's image class.
Definition Frame.h:1808
DetectorType
Definition of individual feature detectors.
Definition RMVFeatureDetector.h:41
This class implements a feature map.
Definition RMVFeatureMap.h:35
const Box3 & initializationBoundingBox() const
Returns the bounding box of the initialization feature map.
Definition RMVFeatureMap.h:348
void setMostRecentObjectPointIndices(Indices32 &&strongObjectPointIndices, Indices32 &&semiStrongObjectPointIndices, Indices32 &&usedObjectPointIndices)
Sets or changes the indices of the most recently object points.
Definition RMVFeatureMap.h:282
Vectors3 recentUsedObjectPoints(const size_t maxNumber=size_t(-1)) const
Returns the most recently used object points.
Definition RMVFeatureMap.h:265
const Box3 & boundingBox() const
Returns the bounding box of this map.
Definition RMVFeatureMap.h:327
RMVFeatureDetector::DetectorType mapInitializationDetectorType
Detector type explicitly used for initialization features.
Definition RMVFeatureMap.h:236
PinholeCamera mapCamera
Standard camera.
Definition RMVFeatureMap.h:227
void setInitializationFeatures(Vectors3 &&objectPoints, const PinholeCamera &initializationCamera, const RMVFeatureDetector::DetectorType initializationDetectorType)
Sets or replaces the initialization features for this feature map by a given set of 3D features point...
const Indices32 & recentUsedObjectPointIndices() const
Returns the indices of the most recently used object points.
Definition RMVFeatureMap.h:259
Box3 mapInitializationBoundingBox
Bounding box covering all initialization feature points, if existing.
Definition RMVFeatureMap.h:224
Box3 mapBoundingBox
Bounding box covering all feature points.
Definition RMVFeatureMap.h:221
bool isEmpty() const
Returns whether this feature map holds no feature points.
Definition RMVFeatureMap.h:353
Indices32 mapRecentSemiStrongObjectPointIndices
Indices of the semi-strongest object points from the most recently tracking iteration.
Definition RMVFeatureMap.h:215
void clearMostRecentObjectPointIndices()
Removes / clears the indices of the most recently object points.
Definition RMVFeatureMap.h:320
Vectors3 mapInitializationObjectPoints
Object points defining the initialization feature map.
Definition RMVFeatureMap.h:209
bool setFeatures(const Frame &pattern, const Vector3 &dimension, const PinholeCamera &pinholeCamera, const size_t numberFeatures, const RMVFeatureDetector::DetectorType detectorType, Worker *worker=nullptr)
Sets or replaces the features for this feature map by a given tracking pattern.
const PinholeCamera & initializationCamera() const
Returns the initialization camera if defined.
Definition RMVFeatureMap.h:332
const Indices32 & recentStrongObjectPointIndices() const
Returns the indices of the most recently strong object points.
Definition RMVFeatureMap.h:249
const Indices32 & recentSemiStrongObjectPointIndices() const
Returns the indices of the most recently semi-strong object points.
Definition RMVFeatureMap.h:254
RMVFeatureDetector::DetectorType mapDetectorType
Detector type used for the normal feature map features.
Definition RMVFeatureMap.h:233
Indices32 mapRecentStrongObjectPointIndices
Indices of the strongest object points from the most recently tracking iteration.
Definition RMVFeatureMap.h:212
void setInitializationFeatures(const Vector3 *objectPoints, const size_t number, const PinholeCamera &initializationCamera, const RMVFeatureDetector::DetectorType initializationDetectorType)
Sets or replaces the initialization features for this feature map by a given set of 3D features point...
const Vectors3 & initializationObjectPoints() const
Returns the object points to be used during initialization iterations.
Definition RMVFeatureMap.h:244
bool setInitializationFeatures(const Frame &pattern, const Vector3 &dimension, const PinholeCamera &pinholeCamera, const size_t numberInitializationObjectPoints, const RMVFeatureDetector::DetectorType &initializationDetectorType, Worker *worker=nullptr)
Sets or replaces the features that will be used during the initialization only for this feature map b...
PinholeCamera mapInitializationCamera
PinholeCamera object explicitly used for camera initialization, if defined.
Definition RMVFeatureMap.h:230
RMVFeatureDetector::DetectorType detectorType() const
Returns the detector type for the normal feature map.
Definition RMVFeatureMap.h:343
Vectors3 mapObjectPoints
Object points defining the feature map.
Definition RMVFeatureMap.h:206
void clear()
Removes all registered map feature points.
Indices32 mapRecentUsedObjectPointIndices
Indices of the used object points from the most recently tracking iteration.
Definition RMVFeatureMap.h:218
RMVFeatureDetector::DetectorType initializationDetectorType() const
Returns the detector type for the initialization features.
Definition RMVFeatureMap.h:338
RMVFeatureMap()
Creates an empty feature map.
void setFeatures(const Vector3 *points, const size_t number, const PinholeCamera &pinholeCamera, const RMVFeatureDetector::DetectorType detectorType)
Sets or replaces the features for this feature map by a given set of 3D features points.
const Vectors3 & objectPoints() const
Returns the object positions of the registered map features.
Definition RMVFeatureMap.h:239
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< Vector3 > Vectors3
Definition of a vector holding Vector3 objects.
Definition Vector3.h:65
The namespace covering the entire Ocean framework.
Definition Accessor.h:15