Ocean
PatchTracker.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_TRACKING_MAPBUILDING_PATCH_TRACKER_H
9 #define META_OCEAN_TRACKING_MAPBUILDING_PATCH_TRACKER_H
10 
14 
16 #include "ocean/base/Worker.h"
17 
18 #include "ocean/cv/FramePyramid.h"
19 
21 
23 
25 
26 #include "ocean/math/AnyCamera.h"
27 
29 
30 namespace Ocean
31 {
32 
33 namespace Tracking
34 {
35 
36 namespace MapBuilding
37 {
38 
39 /**
40  * This class implements a tracker for 3D feature points in an image sequence (offline) or a live video with SLAM (online).
41  * Feature points are tracked with a patch tracking approach.<br>
42  * The tracker relies on a precise 6-DOF camera pose for each individual frame.
43  *
44  * Two tracking modes exist:<br>
45  * 1) 2D features are tracked from frame-to-frame and their corresponding 3D location is eventually determined<br>
46  * 2) 3D features are tracked from frame-to-frame while using the projected image location as prediction to reduce the search radius
47  *
48  * The tracker creates a database with the topology of all detected and tracked features.
49  * @ingroup trackingmapbuilding
50  */
51 class OCEAN_TRACKING_MAPBUILDING_EXPORT PatchTracker : public DescriptorHandling
52 {
53  public:
54 
55  /**
56  * Definition of a shared FramePyramid.
57  */
58  typedef std::shared_ptr<CV::FramePyramid> SharedFramePyramid;
59 
60  /**
61  * This class implement a container holding options for the tracker.
62  */
63  class Options
64  {
65  public:
66 
67  /**
68  * Creates new options.
69  * @param maximalFeaturesPerFrame The maximal number of features which will be managed in each frame, with range [1, infinity)
70  * @param newFeaturesInterval The time interval between frames in which new feature points will be added to the tracker, in seconds, with range [0, infinity)
71  * @param keepUnlocatedFeatures True, to keep unlocated features in the database; False, to keep only located features (with known 3D location)
72  * @param minimalNumberObservationsPerFeature The minimal number of observations a feature must have, with range [2, infinity)
73  * @param minimalBoxDiagonalForLocatedFeature The minimal diagonal of the bounding box of all camera poses observing an object point necessary so that the point will be located, with range [0, infinity)
74  */
75  inline Options(const size_t maximalFeaturesPerFrame, const double newFeaturesInterval, const bool keepUnlocatedFeatures, const size_t minimalNumberObservationsPerFeature, const Scalar minimalBoxDiagonalForLocatedFeature);
76 
77  /**
78  * Creates default options for realtime execution.
79  * @return Options with realtime execution purpose
80  */
81  static inline Options realtimeOptions();
82 
83  /**
84  * Creates default options for offline execution.
85  * @return Options with offline execution purpose
86  */
87  static inline Options offlineOptions();
88 
89  public:
90 
91  /// The maximal number of features which will be managed in each frame.
92  size_t maximalFeaturesPerFrame_ = 0;
93 
94  /// The time interval between frames in which new feature points will be added to the tracker, in seconds.
95  double newFeaturesInterval_ = -1.0;
96 
97  /// True, to keep unlocated features in the database; False, to keep only located features (with known 3D location).
98  bool keepUnlocatedFeatures_ = false;
99 
100  /// The minimal number of observations a feature must have, with range [2, infinity).
101  size_t minimalNumberObservationsPerFeature_ = 0;
102 
103  /// The minimal diagonal of the bounding box of all camera poses observing an object point necessary so that the point will be located.
104  Scalar minimalBoxDiagonalForLocatedFeature_ = 0;
105  };
106 
107  protected:
108 
109  /**
110  * Definition of individual location results.
111  */
112  enum LocationResult : uint32_t
113  {
114  /// The location could not yet be determined.
116  /// The location is flaky and thus the object point should not be used.
118  /// The location is precise.
119  LR_PRECISE
120  };
121 
122  /**
123  * This class implements the base class for all tracking data objects.
124  */
125  class OCEAN_TRACKING_MAPBUILDING_EXPORT TrackingData
126  {
127  public:
128 
129  /**
130  * Destructs the object.
131  */
132  virtual ~TrackingData() = default;
133 
134  /**
135  * Returns whether this object holds valid data.
136  * @return True, if so
137  */
138  virtual bool isValid() const;
139 
140  protected:
141 
142  /// The image pyramid associated with this tracking data.
144 
145  /// The ids of the object points associated with this tracking data.
147 
148  /// the 2D image points associated with this tracking data.
150  };
151 
152  /**
153  * This class holds the tracking data for feature points for which the 3D location is not yet known.
154  */
156  {
157  friend class PatchTracker;
158 
159  protected:
160 
161  /// A vector with Harris corners, can be re-used for each new frame.
163 
164  /// The timestamp when the last time new unlocated features have been added.
166  };
167 
168  /**
169  * This class holds the tracking data for feature points for which the 3D location is know.
170  */
172  {
173  friend class PatchTracker;
174 
175  public:
176 
177  /**
178  * Returns whether this object holds valid data.
179  * @return True, if so
180  */
181  bool isValid() const override;
182 
183  protected:
184 
185  /// The 3D locations of all feature points.
187 
188  /// The translational part of the camera pose for each 3D object point in the moment the initial location of the 3D object point was determined.
190 
191  /// A vector with 2D image points, can be re-used for each new frame.
193 
194  /// The number of consecutive frames without good tracking (e.g., because of quick camera movements).
195  unsigned int framesWithoutGoodTracking_ = 0u;
196  };
197 
198  public:
199 
200  /**
201  * Creates a new tracker object with specified descriptor extractor.
202  * @param unifiedDescriptorExtractor The feature extractor to be used, must be valid
203  * @param options The options to be used
204  */
205  explicit inline PatchTracker(const std::shared_ptr<UnifiedDescriptorExtractor>& unifiedDescriptorExtractor, const Options& options = Options::offlineOptions());
206 
207  /**
208  * Tracks the features from the previous frame to the current frame.
209  * @param frameIndex The index of the current frame, with range [0, infinity)
210  * @param anyCamera The camera profile of the current image, must be valid
211  * @param world_T_camera The known precise camera pose for the current frame, with default viewing direction towards the negative z-space with y-axis up, must be valid
212  * @param yCurrentFramePyramid The image pyramid of the current image, with pixel FORMAT_Y8
213  * @param frameTimestamp The timestamp of the current frame, must be valid
214  * @param worker Optional worker to distribute the computation
215  * @param debugFrame Optional resulting debug frame visualizing the current state, nullptr if not of interest
216  * @return True, if succeeded
217  */
218  bool trackFrame(const Index32 frameIndex, const AnyCamera& anyCamera, const HomogenousMatrix4& world_T_camera, const SharedFramePyramid& yCurrentFramePyramid, const Timestamp& frameTimestamp, Worker* worker = nullptr, Frame* debugFrame = nullptr);
219 
220  /**
221  * Returns the current database of the tracker.
222  * @return The tracker's current database
223  */
224  inline const Database& database() const;
225 
226  /**
227  * Returns the current descriptor map of the tracker.
228  * @return The tracker's current descriptor map
229  */
230  inline std::shared_ptr<UnifiedDescriptorMap> unifiedDescriptorMap() const;
231 
232  /**
233  * Returns the 3D locations of all currently known located 3D object points.
234  * @return All 3D object points
235  */
236  Vectors3 latestObjectPoints(Indices32* objectPointIds = nullptr) const;
237 
238  /**
239  * Resets the tracker so that it can be used for a new tracking session.
240  * @param database Optional resulting database of the tracker
241  * @param unifiedDescriptorMap Optional resulting descriptor map of the tracker
242  */
243  void reset(Database* database = nullptr, std::shared_ptr<UnifiedDescriptorMap>* unifiedDescriptorMap = nullptr);
244 
245  /**
246  * Runs the tracker on a recording provided through a device player.
247  * @param devicePlayer The device player providing the recording information, must be valid
248  * @param worldTrackerNames The names of world tracker which may be available in the recording and which will be used, at least one
249  * @param database The resulting database holding the topology of the tracked features
250  * @param anyCamera The resulting camera profile for the entire sequence
251  * @param descriptorMap The resulting map mapping object point ids to descriptors
252  * @param unifiedDescriptorExtractor The feature extractor to be used, must be valid
253  * @return True, if succeeded
254  */
255  static bool trackRecording(Devices::DevicePlayer& devicePlayer, const std::vector<std::string>& worldTrackerNames, Database& database, SharedAnyCamera& anyCamera, std::shared_ptr<UnifiedDescriptorMap>& descriptorMap, const std::shared_ptr<UnifiedDescriptorExtractor>& unifiedDescriptorExtractor);
256 
257  /**
258  * Removes flaky object points from the database.
259  * @param database The database from which the flaky object points will be removed
260  * @param minimalNumberObservations The minimal number of observations each object point must have to count as not-flaky, with range [1, infinity)
261  * @param mimimalBoxDiagonal The minimal diagonal of the bounding box of all camera poses (in which the object point is visible) so that the object point does not count as flaky, with range (0, infinity)
262  * @param removedObjectPointIds Optional resulting ids of all object points which have been removed, nullptr if not of interest
263  * @return The number of removed object points
264  */
265  static size_t removeFlakyObjectPoints(Database& database, const size_t minimalNumberObservations, const Scalar mimimalBoxDiagonal, Indices32* removedObjectPointIds = nullptr);
266 
267  protected:
268 
269  /**
270  * Tracks the unlocated feature points from the previous frame to the current frame.
271  * @param frameIndex The index of the current frame, with range [0, infinity)
272  * @param yCurrentFramePyramid The frame pyramid of the current frame, with format FORMAT_Y8
273  * @param occupancyArray The occupancy array containing all currently tracked 2D feature points
274  * @param worker Optional worker to distribute the computation
275  */
276  void trackUnlocatedPoints(const Index32 frameIndex, const SharedFramePyramid& yCurrentFramePyramid, Geometry::SpatialDistribution::OccupancyArray& occupancyArray, Worker* worker);
277 
278  /**
279  * Tracks the located feature points from the previous frame to the current frame.
280  * @param frameIndex The index of the current frame, with range [0, infinity)
281  * @param currentAnyCamera The current camera profile defining the projection, must be valid
282  * @param world_T_currentCamera The current camera pose, transforming camera to world, with default viewing direction into the negative z-space and y-axis up, must be valid
283  * @param yCurrentFramePyramid The frame pyramid of the current frame, with format FORMAT_Y8
284  * @param occupancyArray The occupancy array containing all currently tracked 2D feature points
285  * @param worker Optional worker to distribute the computation
286  */
287  void trackLocatedPoints(const Index32 frameIndex, const AnyCamera& currentAnyCamera, const HomogenousMatrix4& world_T_currentCamera, const SharedFramePyramid& yCurrentFramePyramid, Geometry::SpatialDistribution::OccupancyArray& occupancyArray, Worker* worker);
288 
289  /**
290  * Adds new unlocated 2D feature points into image regions without feature points.
291  * @param frameIndex The index of the current frame, with range [0, infinity)
292  * @param currentAnyCamera The current camera profile defining the projection, must be valid
293  * @param yCurrentFramePyramid The frame pyramid of the current frame, with format FORMAT_Y8
294  * @param frameTimestamp The timestamp of the frame, must be valid
295  * @param occupancyArray The occupancy array containing all currently tracked 2D feature points
296  * @param worker Optional worker to distribute the computation
297  */
298  void addUnlocatedPoints(const Index32 frameIndex, const AnyCamera& currentAnyCamera, const CV::FramePyramid& yCurrentFramePyramid, const Timestamp& frameTimestamp, Geometry::SpatialDistribution::OccupancyArray& occupancyArray, Worker* worker);
299 
300  /**
301  * Converts unlocated 2D feature points to located 3D feature points.
302  * @param currentAnyCamera The current camera profile defining the projection, must be valid
303  * @param world_T_currentCamera The current camera pose, transforming camera to world, with default viewing direction into the negative z-space and y-axis up, must be valid
304  */
305  void convertUnlocatedPointsToLocatedPoints(const AnyCamera& currentAnyCamera, const HomogenousMatrix4& world_T_currentCamera);
306 
307  /**
308  * Determines the location of a 3D feature point.
309  * @param currentAnyCamera The current camera profile defining the projection, must be valid
310  * @param objectPointId The id of the object point for which the location will be determined, must be valid
311  * @param estimatorType The robust estimator to be used when optimizing the 3D location
312  * @param objectPoint The resulting 3D location of the object point
313  * @return The location result
314  */
315  LocationResult determineObjectPointLocation(const AnyCamera& currentAnyCamera, const Index32 objectPointId, const Geometry::Estimator::EstimatorType estimatorType, Vector3& objectPoint);
316 
317  protected:
318 
319  /// The tracker's options.
321 
322  /// The database holding the topology of the tracked features.
324 
325  /// The tracking data for all unlocated feature points.
327 
328  /// The tracking data for all located feature points (for which a 3D location is known).
330 
331  /// An occupancy array, can be reused for each new frame.
333 
334  /// True, if the image pyramid from which descriptors will be extracted needs to be updated; False, if no update is necessary.
335  bool needToUpdateFramePyramidForDescriptors_ = true;
336 
337  /// The image pyramid for descriptor extraction, can be reused for each new frame.
339 
340  /// The map mapping object point ids to feature descriptors.
341  std::shared_ptr<UnifiedDescriptorMap> unifiedDescriptorMap_;
342 
343  /// The feature extractor to be used.
344  std::shared_ptr<UnifiedDescriptorExtractor> unifiedDescriptorExtractor_;
345 
346  /// The random generator to be used.
348 
349  /// Reusable indices.
351 
352  /// Reusable 2D points.
354 
355  /// Reusable pose indices.
357 
358  /// Reusable point indices.
360 
361  /// Reusable 2D points.
363 };
364 
365 inline PatchTracker::Options::Options(const size_t maximalFeaturesPerFrame, const double newFeaturesInterval, const bool keepUnlocatedFeatures, const size_t minimalNumberObservationsPerFeature, const Scalar minimalBoxDiagonalForLocatedFeature) :
366  maximalFeaturesPerFrame_(maximalFeaturesPerFrame),
367  newFeaturesInterval_(newFeaturesInterval),
368  keepUnlocatedFeatures_(keepUnlocatedFeatures),
369  minimalNumberObservationsPerFeature_(minimalNumberObservationsPerFeature),
370  minimalBoxDiagonalForLocatedFeature_(minimalBoxDiagonalForLocatedFeature)
371 {
372  ocean_assert(maximalFeaturesPerFrame_ >= 1);
373  ocean_assert(newFeaturesInterval_ >= 0.0);
374  ocean_assert(minimalNumberObservationsPerFeature_ >= 2);
375  ocean_assert(minimalBoxDiagonalForLocatedFeature_ >= 0);
376 }
377 
379 {
380  constexpr size_t maximalFeaturesPerFrame_ = 400;
381  constexpr double newFeaturesInterval = 0.25;
382 
383  constexpr bool keepUnlocatedFeatures = false;
384  constexpr size_t minimalNumberObservationsPerFeature = 30;
385  constexpr Scalar minimalBoxDiagonalForLocatedFeature = Scalar(0.1); // 10cm
386 
387  return Options(maximalFeaturesPerFrame_, newFeaturesInterval, keepUnlocatedFeatures, minimalNumberObservationsPerFeature, minimalBoxDiagonalForLocatedFeature);
388 }
389 
391 {
392  constexpr size_t maximalFeaturesPerFrame_ = 1200;
393  constexpr double newFeaturesInterval = 0.0;
394 
395  constexpr bool keepUnlocatedFeatures = true;
396  constexpr size_t minimalNumberObservationsPerFeature = 30;
397  constexpr Scalar minimalBoxDiagonalForLocatedFeature = Scalar(0.05); // 5cm
398 
399  return Options(maximalFeaturesPerFrame_, newFeaturesInterval, keepUnlocatedFeatures, minimalNumberObservationsPerFeature, minimalBoxDiagonalForLocatedFeature);
400 }
401 
402 inline PatchTracker::PatchTracker(const std::shared_ptr<UnifiedDescriptorExtractor>& unifiedDescriptorExtractor, const Options& options) :
403  options_(options),
404  unifiedDescriptorExtractor_(std::move(unifiedDescriptorExtractor))
405 {
406  unifiedDescriptorMap_ = unifiedDescriptorExtractor_->createUnifiedDescriptorMap();
407 }
408 
409 inline const Database& PatchTracker::database() const
410 {
411  return database_;
412 }
413 
414 inline std::shared_ptr<UnifiedDescriptorMap> PatchTracker::unifiedDescriptorMap() const
415 {
416  return unifiedDescriptorMap_;
417 }
418 
419 }
420 
421 }
422 
423 }
424 
425 #endif // META_OCEAN_TRACKING_MAPBUILDING_PATCH_TRACKER_H
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
This class implements the abstract base class for all device players.
Definition: DevicePlayer.h:41
This class implements Ocean's image class.
Definition: Frame.h:1760
EstimatorType
Definition of individual robust estimator types.
Definition: Estimator.h:34
This class implements an occupancy array.
Definition: SpatialDistribution.h:370
This class implements a generator for random numbers.
Definition: RandomGenerator.h:42
This class implements a timestamp.
Definition: Timestamp.h:36
This class implements a database for 3D object points, 2D image points and 6DOF camera poses.
Definition: Database.h:67
This class implements functions necessary when handling descriptors.
Definition: DescriptorHandling.h:32
This class holds the tracking data for feature points for which the 3D location is know.
Definition: PatchTracker.h:172
bool isValid() const override
Returns whether this object holds valid data.
Vectors3 objectPoints_
The 3D locations of all feature points.
Definition: PatchTracker.h:186
Vectors2 reusablePredictedCurrentImagePoints_
A vector with 2D image points, can be re-used for each new frame.
Definition: PatchTracker.h:192
Vectors3 poseTranslationsWhenDeterminedObjectPoints_
The translational part of the camera pose for each 3D object point in the moment the initial location...
Definition: PatchTracker.h:189
This class implement a container holding options for the tracker.
Definition: PatchTracker.h:64
Scalar minimalBoxDiagonalForLocatedFeature_
The minimal diagonal of the bounding box of all camera poses observing an object point necessary so t...
Definition: PatchTracker.h:104
size_t maximalFeaturesPerFrame_
The maximal number of features which will be managed in each frame.
Definition: PatchTracker.h:92
double newFeaturesInterval_
The time interval between frames in which new feature points will be added to the tracker,...
Definition: PatchTracker.h:95
static Options offlineOptions()
Creates default options for offline execution.
Definition: PatchTracker.h:390
Options(const size_t maximalFeaturesPerFrame, const double newFeaturesInterval, const bool keepUnlocatedFeatures, const size_t minimalNumberObservationsPerFeature, const Scalar minimalBoxDiagonalForLocatedFeature)
Creates new options.
Definition: PatchTracker.h:365
size_t minimalNumberObservationsPerFeature_
The minimal number of observations a feature must have, with range [2, infinity).
Definition: PatchTracker.h:101
static Options realtimeOptions()
Creates default options for realtime execution.
Definition: PatchTracker.h:378
This class implements the base class for all tracking data objects.
Definition: PatchTracker.h:126
virtual bool isValid() const
Returns whether this object holds valid data.
Vectors2 previousImagePoints_
the 2D image points associated with this tracking data.
Definition: PatchTracker.h:149
Indices32 objectPointIds_
The ids of the object points associated with this tracking data.
Definition: PatchTracker.h:146
SharedFramePyramid yPreviousFramePyramid_
The image pyramid associated with this tracking data.
Definition: PatchTracker.h:143
virtual ~TrackingData()=default
Destructs the object.
This class holds the tracking data for feature points for which the 3D location is not yet known.
Definition: PatchTracker.h:156
CV::Detector::HarrisCorners reusableHarrisCorners_
A vector with Harris corners, can be re-used for each new frame.
Definition: PatchTracker.h:162
Timestamp lastNewFeaturesAddedTimestamp_
The timestamp when the last time new unlocated features have been added.
Definition: PatchTracker.h:165
This class implements a tracker for 3D feature points in an image sequence (offline) or a live video ...
Definition: PatchTracker.h:52
Database database_
The database holding the topology of the tracked features.
Definition: PatchTracker.h:323
void convertUnlocatedPointsToLocatedPoints(const AnyCamera &currentAnyCamera, const HomogenousMatrix4 &world_T_currentCamera)
Converts unlocated 2D feature points to located 3D feature points.
RandomGenerator randomGenerator_
The random generator to be used.
Definition: PatchTracker.h:347
bool trackFrame(const Index32 frameIndex, const AnyCamera &anyCamera, const HomogenousMatrix4 &world_T_camera, const SharedFramePyramid &yCurrentFramePyramid, const Timestamp &frameTimestamp, Worker *worker=nullptr, Frame *debugFrame=nullptr)
Tracks the features from the previous frame to the current frame.
std::shared_ptr< UnifiedDescriptorExtractor > unifiedDescriptorExtractor_
The feature extractor to be used.
Definition: PatchTracker.h:344
Indices32 reusableValidIndices_
Reusable indices.
Definition: PatchTracker.h:350
Indices32 reusableImagePointIds_
Reusable point indices.
Definition: PatchTracker.h:359
LocatedTrackingData locatedTrackingData_
The tracking data for all located feature points (for which a 3D location is known).
Definition: PatchTracker.h:329
std::shared_ptr< UnifiedDescriptorMap > unifiedDescriptorMap_
The map mapping object point ids to feature descriptors.
Definition: PatchTracker.h:341
Vectors2 reusableImagePoints_
Reusable 2D points.
Definition: PatchTracker.h:362
CV::FramePyramid yReusableFramePyramidForDescriptors_
The image pyramid for descriptor extraction, can be reused for each new frame.
Definition: PatchTracker.h:338
const Database & database() const
Returns the current database of the tracker.
Definition: PatchTracker.h:409
static bool trackRecording(Devices::DevicePlayer &devicePlayer, const std::vector< std::string > &worldTrackerNames, Database &database, SharedAnyCamera &anyCamera, std::shared_ptr< UnifiedDescriptorMap > &descriptorMap, const std::shared_ptr< UnifiedDescriptorExtractor > &unifiedDescriptorExtractor)
Runs the tracker on a recording provided through a device player.
LocationResult
Definition of individual location results.
Definition: PatchTracker.h:113
@ LR_NOT_YET
The location could not yet be determined.
Definition: PatchTracker.h:115
@ LR_FLAKY
The location is flaky and thus the object point should not be used.
Definition: PatchTracker.h:117
void trackLocatedPoints(const Index32 frameIndex, const AnyCamera &currentAnyCamera, const HomogenousMatrix4 &world_T_currentCamera, const SharedFramePyramid &yCurrentFramePyramid, Geometry::SpatialDistribution::OccupancyArray &occupancyArray, Worker *worker)
Tracks the located feature points from the previous frame to the current frame.
void reset(Database *database=nullptr, std::shared_ptr< UnifiedDescriptorMap > *unifiedDescriptorMap=nullptr)
Resets the tracker so that it can be used for a new tracking session.
Indices32 reusabledPoseIds_
Reusable pose indices.
Definition: PatchTracker.h:356
Vectors2 reusableCurrentImagePoints_
Reusable 2D points.
Definition: PatchTracker.h:353
Options options_
The tracker's options.
Definition: PatchTracker.h:320
void trackUnlocatedPoints(const Index32 frameIndex, const SharedFramePyramid &yCurrentFramePyramid, Geometry::SpatialDistribution::OccupancyArray &occupancyArray, Worker *worker)
Tracks the unlocated feature points from the previous frame to the current frame.
std::shared_ptr< UnifiedDescriptorMap > unifiedDescriptorMap() const
Returns the current descriptor map of the tracker.
Definition: PatchTracker.h:414
Vectors3 latestObjectPoints(Indices32 *objectPointIds=nullptr) const
Returns the 3D locations of all currently known located 3D object points.
Geometry::SpatialDistribution::OccupancyArray reusableOccupancyArray_
An occupancy array, can be reused for each new frame.
Definition: PatchTracker.h:332
static size_t removeFlakyObjectPoints(Database &database, const size_t minimalNumberObservations, const Scalar mimimalBoxDiagonal, Indices32 *removedObjectPointIds=nullptr)
Removes flaky object points from the database.
void addUnlocatedPoints(const Index32 frameIndex, const AnyCamera &currentAnyCamera, const CV::FramePyramid &yCurrentFramePyramid, const Timestamp &frameTimestamp, Geometry::SpatialDistribution::OccupancyArray &occupancyArray, Worker *worker)
Adds new unlocated 2D feature points into image regions without feature points.
UnlocatedTrackingData unlocatedTrackingData_
The tracking data for all unlocated feature points.
Definition: PatchTracker.h:326
PatchTracker(const std::shared_ptr< UnifiedDescriptorExtractor > &unifiedDescriptorExtractor, const Options &options=Options::offlineOptions())
Creates a new tracker object with specified descriptor extractor.
Definition: PatchTracker.h:402
std::shared_ptr< CV::FramePyramid > SharedFramePyramid
Definition of a shared FramePyramid.
Definition: PatchTracker.h:58
LocationResult determineObjectPointLocation(const AnyCamera &currentAnyCamera, const Index32 objectPointId, const Geometry::Estimator::EstimatorType estimatorType, Vector3 &objectPoint)
Determines the location of a 3D feature point.
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
uint32_t Index32
Definition of a 32 bit index value.
Definition: Base.h:84
std::vector< HarrisCorner > HarrisCorners
Definition of a vector holding Harris corners.
Definition: HarrisCorner.h:24
float Scalar
Definition of a scalar type.
Definition: Math.h:128
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