MRPT  1.9.9
COccupancyGridMapFeatureExtractor.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #ifndef COccupancyGridMapFeatureExtractor_H
10 #define COccupancyGridMapFeatureExtractor_H
11 
15 
16 #include <mrpt/system/CObserver.h>
17 
18 namespace mrpt::slam
19 {
20 /** A class for detecting features from occupancy grid maps.
21  * The main method is "COccupancyGridMapFeatureExtractor::extractFeatures()",
22  * which makes use
23  * of an advanced cache mechanism to avoid redoing work when applied several
24  * times on the same
25  * occupancy grid maps (unless they changed in the meanwhile).
26  *
27  * For an uncached version (which is a static method that can be called
28  * without instantiating COccupancyGridMapFeatureExtractor)
29  * see COccupancyGridMapFeatureExtractor::uncached_extractFeatures()
30  *
31  * \ingroup mrpt_slam_grp
32  */
34 {
35  public:
36  /** Computes a set of distinctive landmarks from an occupancy grid, and
37  * store them (previous content is not erased!) into the given landmarks
38  * map.
39  * Landmarks type can be any declared in
40  * mrpt::vision::CFeatureExtraction::TOptions
41  *
42  * \note See the paper "..."
43  * \sa uncached_extractFeatures
44  */
45  void extractFeatures(
47  mrpt::maps::CLandmarksMap& outMap, const size_t number_of_features,
48  const mrpt::vision::TDescriptorType descriptors,
49  const mrpt::vision::CFeatureExtraction::TOptions& feat_options);
50 
51  /** Computes a set of distinctive landmarks from an occupancy grid, and
52  * store them (previous content is not erased!) into the given landmarks
53  * map.
54  * Landmarks type can be any declared in
55  * mrpt::vision::CFeatureExtraction::TOptions
56  *
57  * \note See the paper "..."
58  * \sa uncached_extractFeatures
59  */
60  static void uncached_extractFeatures(
62  mrpt::maps::CLandmarksMap& outMap, const size_t number_of_features,
63  const mrpt::vision::TDescriptorType descriptors,
64  const mrpt::vision::CFeatureExtraction::TOptions& feat_options);
65 
66  protected:
67  /** This will receive the events from maps in order to purge the cache. */
68  void OnEvent(const mrpt::system::mrptEvent& e);
69  using TCache = std::map<
71  /** A cache of already computed maps. */
73 
74 }; // End of class def.
75 
76 }
77 #endif
78 
79 
The basic event type for the observer-observable pattern in MRPT.
Definition: mrptEvent.h:32
void OnEvent(const mrpt::system::mrptEvent &e)
This will receive the events from maps in order to purge the cache.
The set of parameters for all the detectors & descriptor algorithms.
std::map< const mrpt::maps::COccupancyGridMap2D *, mrpt::maps::CLandmarksMap::Ptr > TCache
static void uncached_extractFeatures(const mrpt::maps::COccupancyGridMap2D &grid, mrpt::maps::CLandmarksMap &outMap, const size_t number_of_features, const mrpt::vision::TDescriptorType descriptors, const mrpt::vision::CFeatureExtraction::TOptions &feat_options)
Computes a set of distinctive landmarks from an occupancy grid, and store them (previous content is n...
A class for storing a map of 3D probabilistic landmarks.
Definition: CLandmarksMap.h:75
Inherit from this class to get notified about events from any CObservable object after subscribing to...
Definition: CObserver.h:34
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
void extractFeatures(const mrpt::maps::COccupancyGridMap2D &grid, mrpt::maps::CLandmarksMap &outMap, const size_t number_of_features, const mrpt::vision::TDescriptorType descriptors, const mrpt::vision::CFeatureExtraction::TOptions &feat_options)
Computes a set of distinctive landmarks from an occupancy grid, and store them (previous content is n...
A class for storing an occupancy grid map.
A class for detecting features from occupancy grid maps.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020