Main MRPT website
>
C++ reference for MRPT 1.4.0
mrpt
slam
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-2016, 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
12
#include <
mrpt/maps/COccupancyGridMap2D.h
>
13
#include <
mrpt/maps/CLandmarksMap.h
>
14
#include <
mrpt/vision/CFeatureExtraction.h
>
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
*/
34
class
SLAM_IMPEXP
COccupancyGridMapFeatureExtractor
:
public
mrpt::utils::CObserver
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
(
47
const
mrpt::maps::COccupancyGridMap2D
&grid,
48
mrpt::maps::CLandmarksMap
&outMap,
49
const
size_t
number_of_features,
50
const
mrpt::vision::TDescriptorType
descriptors,
51
const
mrpt::vision::CFeatureExtraction::TOptions
&feat_options
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
(
61
const
mrpt::maps::COccupancyGridMap2D
&grid,
62
mrpt::maps::CLandmarksMap
&outMap,
63
const
size_t
number_of_features,
64
const
mrpt::vision::TDescriptorType
descriptors,
65
const
mrpt::vision::CFeatureExtraction::TOptions
&feat_options
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
CFeatureExtraction.h
CObserver.h
mrpt::maps::CLandmarksMap
A class for storing a map of 3D probabilistic landmarks.
Definition
maps/CLandmarksMap.h:60
mrpt::maps::COccupancyGridMap2D
A class for storing an occupancy grid map.
Definition
maps/COccupancyGridMap2D.h:69
mrpt::slam::COccupancyGridMapFeatureExtractor
A class for detecting features from occupancy grid maps.
Definition
COccupancyGridMapFeatureExtractor.h:35
mrpt::slam::COccupancyGridMapFeatureExtractor::~COccupancyGridMapFeatureExtractor
~COccupancyGridMapFeatureExtractor()
Destructor.
mrpt::slam::COccupancyGridMapFeatureExtractor::uncached_extractFeatures
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...
mrpt::slam::COccupancyGridMapFeatureExtractor::extractFeatures
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...
mrpt::slam::COccupancyGridMapFeatureExtractor::m_cache
TCache m_cache
A cache of already computed maps.
Definition
COccupancyGridMapFeatureExtractor.h:71
mrpt::slam::COccupancyGridMapFeatureExtractor::OnEvent
void OnEvent(const mrpt::utils::mrptEvent &e)
This will receive the events from maps in order to purge the cache.
mrpt::slam::COccupancyGridMapFeatureExtractor::TCache
std::map< const mrpt::maps::COccupancyGridMap2D *, mrpt::maps::CLandmarksMapPtr > TCache
Definition
COccupancyGridMapFeatureExtractor.h:70
mrpt::slam::COccupancyGridMapFeatureExtractor::COccupancyGridMapFeatureExtractor
COccupancyGridMapFeatureExtractor()
Default ctor.
mrpt::utils::CObserver
Inherit from this class to get notified about events from any CObservable object after subscribing to...
Definition
CObserver.h:35
mrpt::utils::mrptEvent
The basic event type for the observer-observable pattern in MRPT.
Definition
mrptEvent.h:35
mrpt::vision::TDescriptorType
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
Definition
vision/include/mrpt/vision/types.h:60
CLandmarksMap.h
COccupancyGridMap2D.h
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition
CParticleFilter.h:17
link_pragmas.h
SLAM_IMPEXP
#define SLAM_IMPEXP
Definition
slam/include/mrpt/slam/link_pragmas.h:90
mrpt::vision::CFeatureExtraction::TOptions
The set of parameters for all the detectors & descriptor algorithms.
Definition
CFeatureExtraction.h:73
Page generated by
Doxygen 1.9.8
for MRPT 1.4.0 SVN: at Thu Dec 14 17:13:25 UTC 2023