Main MRPT website > C++ reference for 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-2017, 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/utils/CObserver.h>
17 
18 namespace mrpt
19 {
20 namespace slam
21 {
22 /** A class for detecting features from occupancy grid maps.
23  * The main method is "COccupancyGridMapFeatureExtractor::extractFeatures()",
24  * which makes use
25  * of an advanced cache mechanism to avoid redoing work when applied several
26  * times on the same
27  * occupancy grid maps (unless they changed in the meanwhile).
28  *
29  * For an uncached version (which is a static method that can be called
30  * without instantiating COccupancyGridMapFeatureExtractor)
31  * see COccupancyGridMapFeatureExtractor::uncached_extractFeatures()
32  *
33  * \ingroup mrpt_slam_grp
34  */
36 {
37  public:
38  /** Default ctor */
40  /** Destructor */
42 
43  /** Computes a set of distinctive landmarks from an occupancy grid, and
44  * store them (previous content is not erased!) into the given landmarks
45  * map.
46  * Landmarks type can be any declared in
47  * mrpt::vision::CFeatureExtraction::TOptions
48  *
49  * \note See the paper "..."
50  * \sa uncached_extractFeatures
51  */
52  void extractFeatures(
54  mrpt::maps::CLandmarksMap& outMap, const size_t number_of_features,
55  const mrpt::vision::TDescriptorType descriptors,
56  const mrpt::vision::CFeatureExtraction::TOptions& feat_options);
57 
58  /** Computes a set of distinctive landmarks from an occupancy grid, and
59  * store them (previous content is not erased!) into the given landmarks
60  * map.
61  * Landmarks type can be any declared in
62  * mrpt::vision::CFeatureExtraction::TOptions
63  *
64  * \note See the paper "..."
65  * \sa uncached_extractFeatures
66  */
67  static void uncached_extractFeatures(
69  mrpt::maps::CLandmarksMap& outMap, const size_t number_of_features,
70  const mrpt::vision::TDescriptorType descriptors,
71  const mrpt::vision::CFeatureExtraction::TOptions& feat_options);
72 
73  protected:
74  /** This will receive the events from maps in order to purge the cache. */
75  void OnEvent(const mrpt::utils::mrptEvent& e);
76  typedef std::map<const mrpt::maps::COccupancyGridMap2D*,
79  /** A cache of already computed maps. */
81 
82 }; // End of class def.
83 
84 } // End of namespace
85 } // End of namespace
86 
87 #endif
The basic event type for the observer-observable pattern in MRPT.
Definition: mrptEvent.h:34
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...
std::shared_ptr< CLandmarksMap > Ptr
Definition: CLandmarksMap.h:77
void OnEvent(const mrpt::utils::mrptEvent &e)
This will receive the events from maps in order to purge the cache.
A class for storing a map of 3D probabilistic landmarks.
Definition: CLandmarksMap.h:75
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.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Inherit from this class to get notified about events from any CObservable object after subscribing to...
Definition: CObserver.h:38
A class for detecting features from occupancy grid maps.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019