Main MRPT website > C++ reference
MRPT logo
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-2014, 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  using namespace mrpt::math;
25 
26  /** A class for detecting features from occupancy grid maps.
27  * The main method is "COccupancyGridMapFeatureExtractor::extractFeatures()", which makes use
28  * of an advanced cache mechanism to avoid redoing work when applied several times on the same
29  * occupancy grid maps (unless they changed in the meanwhile).
30  *
31  * For an uncached version (which is a static method that can be called without instantiating COccupancyGridMapFeatureExtractor)
32  * see COccupancyGridMapFeatureExtractor::uncached_extractFeatures()
33  *
34  * \ingroup mrpt_slam_grp
35  */
37  {
38  public:
39  COccupancyGridMapFeatureExtractor(); //!< Default ctor
40  ~COccupancyGridMapFeatureExtractor(); //!< Destructor
41 
42  /** Computes a set of distinctive landmarks from an occupancy grid, and store them (previous content is not erased!) into the given landmarks map.
43  * Landmarks type can be any declared in mrpt::vision::CFeatureExtraction::TOptions
44  *
45  * \note See the paper "..."
46  * \sa uncached_extractFeatures
47  */
48  void extractFeatures(
51  const size_t number_of_features,
52  const mrpt::vision::TDescriptorType descriptors,
54  );
55 
56  /** Computes a set of distinctive landmarks from an occupancy grid, and store them (previous content is not erased!) into the given landmarks map.
57  * Landmarks type can be any declared in mrpt::vision::CFeatureExtraction::TOptions
58  *
59  * \note See the paper "..."
60  * \sa uncached_extractFeatures
61  */
62  static void uncached_extractFeatures(
65  const size_t number_of_features,
66  const mrpt::vision::TDescriptorType descriptors,
68  );
69 
70  protected:
71  void OnEvent(const mrptEvent &e); //!< This will receive the events from maps in order to purge the cache.
72  typedef std::map<const mrpt::slam::COccupancyGridMap2D*,mrpt::slam::CLandmarksMapPtr> TCache;
73  TCache m_cache; //!< A cache of already computed maps.
74 
75 
76  }; // End of class def.
77 
78  } // End of namespace
79 } // End of namespace
80 
81 #endif
A class for storing a map of 3D probabilistic landmarks.
Definition: CLandmarksMap.h:63
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.
This base provides a set of functions for maths stuff.
Definition: CArray.h:18
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class for storing an occupancy grid map.
std::map< const mrpt::slam::COccupancyGridMap2D *, mrpt::slam::CLandmarksMapPtr > TCache
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.8 for MRPT 1.2.2 SVN:Unversioned directory at Tue Oct 14 02:14:08 UTC 2014