Main MRPT website > C++ reference for MRPT 1.5.7
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 #include <mrpt/slam/link_pragmas.h>
19 
20 namespace mrpt
21 {
22  namespace slam
23  {
24  /** A class for detecting features from occupancy grid maps.
25  * The main method is "COccupancyGridMapFeatureExtractor::extractFeatures()", which makes use
26  * of an advanced cache mechanism to avoid redoing work when applied several 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 without instantiating COccupancyGridMapFeatureExtractor)
30  * see COccupancyGridMapFeatureExtractor::uncached_extractFeatures()
31  *
32  * \ingroup mrpt_slam_grp
33  */
35  {
36  public:
37  COccupancyGridMapFeatureExtractor(); //!< Default ctor
38  ~COccupancyGridMapFeatureExtractor(); //!< Destructor
39 
40  /** Computes a set of distinctive landmarks from an occupancy grid, and store them (previous content is not erased!) into the given landmarks map.
41  * Landmarks type can be any declared in mrpt::vision::CFeatureExtraction::TOptions
42  *
43  * \note See the paper "..."
44  * \sa uncached_extractFeatures
45  */
46  void extractFeatures(
49  const size_t number_of_features,
50  const mrpt::vision::TDescriptorType descriptors,
52  );
53 
54  /** Computes a set of distinctive landmarks from an occupancy grid, and store them (previous content is not erased!) into the given landmarks map.
55  * Landmarks type can be any declared in mrpt::vision::CFeatureExtraction::TOptions
56  *
57  * \note See the paper "..."
58  * \sa uncached_extractFeatures
59  */
60  static void uncached_extractFeatures(
63  const size_t number_of_features,
64  const mrpt::vision::TDescriptorType descriptors,
66  );
67 
68  protected:
69  void OnEvent(const mrpt::utils::mrptEvent &e); //!< This will receive the events from maps in order to purge the cache.
70  typedef std::map<const mrpt::maps::COccupancyGridMap2D*,mrpt::maps::CLandmarksMapPtr> TCache;
71  TCache m_cache; //!< A cache of already computed maps.
72 
73 
74  }; // End of class def.
75 
76  } // End of namespace
77 } // End of namespace
78 
79 #endif
std::map< const mrpt::maps::COccupancyGridMap2D *, mrpt::maps::CLandmarksMapPtr > TCache
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.
A class for storing a map of 3D probabilistic landmarks.
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
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:34
A class for detecting features from occupancy grid maps.



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 8277875f6 Mon Jun 11 02:47:32 2018 +0200 at lun oct 28 01:50:49 CET 2019