MRPT  2.0.4
COccupancyGridMapFeatureExtractor.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
14 
15 #include <mrpt/system/CObserver.h>
16 
17 namespace mrpt::slam
18 {
19 /** A class for detecting features from occupancy grid maps.
20  * The main method is "COccupancyGridMapFeatureExtractor::extractFeatures()",
21  * which makes use
22  * of an advanced cache mechanism to avoid redoing work when applied several
23  * times on the same
24  * occupancy grid maps (unless they changed in the meanwhile).
25  *
26  * For an uncached version (which is a static method that can be called
27  * without instantiating COccupancyGridMapFeatureExtractor)
28  * see COccupancyGridMapFeatureExtractor::uncached_extractFeatures()
29  *
30  * \ingroup mrpt_slam_grp
31  */
33 {
34  public:
35  /** Computes a set of distinctive landmarks from an occupancy grid, and
36  * store them (previous content is not erased!) into the given landmarks
37  * map.
38  * Landmarks type can be any declared in
39  * mrpt::vision::CFeatureExtraction::TOptions
40  *
41  * \note See the paper "..."
42  * \sa uncached_extractFeatures
43  */
44  void extractFeatures(
46  mrpt::maps::CLandmarksMap& outMap, const size_t number_of_features,
47  const mrpt::vision::TDescriptorType descriptors,
48  const mrpt::vision::CFeatureExtraction::TOptions& feat_options);
49 
50  /** Computes a set of distinctive landmarks from an occupancy grid, and
51  * store them (previous content is not erased!) into the given landmarks
52  * map.
53  * Landmarks type can be any declared in
54  * mrpt::vision::CFeatureExtraction::TOptions
55  *
56  * \note See the paper "..."
57  * \sa uncached_extractFeatures
58  */
59  static void uncached_extractFeatures(
61  mrpt::maps::CLandmarksMap& outMap, const size_t number_of_features,
62  const mrpt::vision::TDescriptorType descriptors,
63  const mrpt::vision::CFeatureExtraction::TOptions& feat_options);
64 
65  protected:
66  /** This will receive the events from maps in order to purge the cache. */
67  void OnEvent(const mrpt::system::mrptEvent& e) override;
68  using TCache = std::map<
70  /** A cache of already computed maps. */
72 
73 }; // End of class def.
74 
75 } // namespace mrpt::slam
The basic event type for the observer-observable pattern in MRPT.
Definition: mrptEvent.h:31
void OnEvent(const mrpt::system::mrptEvent &e) override
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:74
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 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020