Main MRPT website
>
C++ reference for MRPT 1.9.9
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-2018, 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/system/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
*/
35
class
COccupancyGridMapFeatureExtractor
:
public
mrpt::system::CObserver
36
{
37
public
:
38
/** Computes a set of distinctive landmarks from an occupancy grid, and
39
* store them (previous content is not erased!) into the given landmarks
40
* map.
41
* Landmarks type can be any declared in
42
* mrpt::vision::CFeatureExtraction::TOptions
43
*
44
* \note See the paper "..."
45
* \sa uncached_extractFeatures
46
*/
47
void
extractFeatures
(
48
const
mrpt::maps::COccupancyGridMap2D
& grid,
49
mrpt::maps::CLandmarksMap
& outMap,
const
size_t
number_of_features,
50
const
mrpt::vision::TDescriptorType
descriptors,
51
const
mrpt::vision::CFeatureExtraction::TOptions
& feat_options);
52
53
/** Computes a set of distinctive landmarks from an occupancy grid, and
54
* store them (previous content is not erased!) into the given landmarks
55
* map.
56
* Landmarks type can be any declared in
57
* mrpt::vision::CFeatureExtraction::TOptions
58
*
59
* \note See the paper "..."
60
* \sa uncached_extractFeatures
61
*/
62
static
void
uncached_extractFeatures
(
63
const
mrpt::maps::COccupancyGridMap2D
& grid,
64
mrpt::maps::CLandmarksMap
& outMap,
const
size_t
number_of_features,
65
const
mrpt::vision::TDescriptorType
descriptors,
66
const
mrpt::vision::CFeatureExtraction::TOptions
& feat_options);
67
68
protected
:
69
/** This will receive the events from maps in order to purge the cache. */
70
void
OnEvent
(
const
mrpt::system::mrptEvent
& e);
71
using
TCache
= std::map<
72
const
mrpt::maps::COccupancyGridMap2D
*,
mrpt::maps::CLandmarksMap::Ptr
>;
73
/** A cache of already computed maps. */
74
TCache
m_cache
;
75
76
};
// End of class def.
77
78
}
// namespace slam
79
}
// namespace mrpt
80
81
#endif
mrpt::system::mrptEvent
The basic event type for the observer-observable pattern in MRPT.
Definition:
mrptEvent.h:33
COccupancyGridMap2D.h
mrpt::slam::COccupancyGridMapFeatureExtractor::m_cache
TCache m_cache
A cache of already computed maps.
Definition:
COccupancyGridMapFeatureExtractor.h:74
mrpt::vision::TDescriptorType
TDescriptorType
The bitwise OR combination of values of TDescriptorType are used in CFeatureExtraction::computeDescri...
Definition:
vision/include/mrpt/vision/types.h:95
mrpt::slam::COccupancyGridMapFeatureExtractor
A class for detecting features from occupancy grid maps.
Definition:
COccupancyGridMapFeatureExtractor.h:35
mrpt::maps::CLandmarksMap::Ptr
std::shared_ptr< CLandmarksMap > Ptr
Definition:
CLandmarksMap.h:77
mrpt::slam::COccupancyGridMapFeatureExtractor::TCache
std::map< const mrpt::maps::COccupancyGridMap2D *, mrpt::maps::CLandmarksMap::Ptr > TCache
Definition:
COccupancyGridMapFeatureExtractor.h:72
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition:
CKalmanFilterCapable.h:30
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...
Definition:
COccupancyGridMapFeatureExtractor.cpp:81
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...
Definition:
COccupancyGridMapFeatureExtractor.cpp:21
CLandmarksMap.h
CFeatureExtraction.h
mrpt::vision::CFeatureExtraction::TOptions
The set of parameters for all the detectors & descriptor algorithms.
Definition:
CFeatureExtraction.h:95
CObserver.h
mrpt::system::CObserver
Inherit from this class to get notified about events from any CObservable object after subscribing to...
Definition:
CObserver.h:36
mrpt::maps::COccupancyGridMap2D
A class for storing an occupancy grid map.
Definition:
COccupancyGridMap2D.h:62
mrpt::maps::CLandmarksMap
A class for storing a map of 3D probabilistic landmarks.
Definition:
CLandmarksMap.h:75
mrpt::slam::COccupancyGridMapFeatureExtractor::OnEvent
void OnEvent(const mrpt::system::mrptEvent &e)
This will receive the events from maps in order to purge the cache.
Definition:
COccupancyGridMapFeatureExtractor.cpp:117
Page generated by
Doxygen 1.8.17
for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST