A class for detecting features from occupancy grid maps.
The main method is "COccupancyGridMapFeatureExtractor::extractFeatures()", which makes use of an advanced cache mechanism to avoid redoing work when applied several times on the same occupancy grid maps (unless they changed in the meanwhile).
For an uncached version (which is a static method that can be called without instantiating COccupancyGridMapFeatureExtractor) see COccupancyGridMapFeatureExtractor::uncached_extractFeatures()
Definition at line 34 of file COccupancyGridMapFeatureExtractor.h.
#include <mrpt/slam/COccupancyGridMapFeatureExtractor.h>
Public Member Functions | |
COccupancyGridMapFeatureExtractor () | |
Default ctor. More... | |
~COccupancyGridMapFeatureExtractor () | |
Destructor. More... | |
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 not erased!) into the given landmarks map. More... | |
void | observeBegin (CObservable &obj) |
Starts the subscription of this observer to the given object. More... | |
void | observeEnd (CObservable &obj) |
Ends the subscription of this observer to the given object (note that there is no need to call this method, since the destruction of the first of observer/observed will put an end to the process. More... | |
Static Public Member Functions | |
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 not erased!) into the given landmarks map. More... | |
Protected Types | |
typedef std::map< const mrpt::maps::COccupancyGridMap2D *, mrpt::maps::CLandmarksMapPtr > | TCache |
Protected Member Functions | |
void | OnEvent (const mrpt::utils::mrptEvent &e) |
This will receive the events from maps in order to purge the cache. More... | |
Protected Attributes | |
TCache | m_cache |
A cache of already computed maps. More... | |
|
protected |
Definition at line 70 of file COccupancyGridMapFeatureExtractor.h.
COccupancyGridMapFeatureExtractor::COccupancyGridMapFeatureExtractor | ( | ) |
Default ctor.
Definition at line 26 of file COccupancyGridMapFeatureExtractor.cpp.
COccupancyGridMapFeatureExtractor::~COccupancyGridMapFeatureExtractor | ( | ) |
Destructor.
Definition at line 33 of file COccupancyGridMapFeatureExtractor.cpp.
void COccupancyGridMapFeatureExtractor::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 not erased!) into the given landmarks map.
Landmarks type can be any declared in mrpt::vision::CFeatureExtraction::TOptions
Definition at line 98 of file COccupancyGridMapFeatureExtractor.cpp.
References mrpt::maps::CLandmarksMap::Create().
|
inherited |
Starts the subscription of this observer to the given object.
Definition at line 30 of file CObserver.cpp.
Referenced by CGraphSlamHandler< GRAPH_T >::initVisualization().
|
inherited |
Ends the subscription of this observer to the given object (note that there is no need to call this method, since the destruction of the first of observer/observed will put an end to the process.
Definition at line 38 of file CObserver.cpp.
|
protectedvirtual |
This will receive the events from maps in order to purge the cache.
Implements mrpt::utils::CObserver.
Definition at line 135 of file COccupancyGridMapFeatureExtractor.cpp.
References mrpt::utils::mrptEvent::isOfType().
|
static |
Computes a set of distinctive landmarks from an occupancy grid, and store them (previous content is not erased!) into the given landmarks map.
Landmarks type can be any declared in mrpt::vision::CFeatureExtraction::TOptions
Definition at line 41 of file COccupancyGridMapFeatureExtractor.cpp.
References mrpt::vision::CFeatureList::begin(), mrpt::vision::CFeatureExtraction::computeDescriptors(), mrpt::vision::descAny, mrpt::vision::CFeatureExtraction::detectFeatures(), mrpt::vision::CFeatureList::end(), mrpt::maps::CLandmark::features, mrpt::maps::COccupancyGridMap2D::getAsImageFiltered(), mrpt::maps::COccupancyGridMap2D::getResolution(), mrpt::maps::COccupancyGridMap2D::getXMin(), mrpt::maps::COccupancyGridMap2D::getYMin(), mrpt::maps::CLandmark::ID, mrpt::maps::CLandmarksMap::landmarks, MRPT_END_WITH_CLEAN_UP, MRPT_START, mrpt::vision::CFeatureExtraction::options, mrpt::vision::CFeatureExtraction::TOptions::patchSize, mrpt::maps::CLandmark::pose_cov_11, mrpt::maps::CLandmark::pose_cov_12, mrpt::maps::CLandmark::pose_cov_13, mrpt::maps::CLandmark::pose_cov_22, mrpt::maps::CLandmark::pose_cov_23, mrpt::maps::CLandmark::pose_cov_33, mrpt::maps::CLandmark::pose_mean, mrpt::maps::CLandmarksMap::TCustomSequenceLandmarks::push_back(), mrpt::maps::COccupancyGridMap2D::saveMetricMapRepresentationToFile(), mrpt::maps::CLandmark::seenTimesCount, mrpt::math::square(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
|
protected |
A cache of already computed maps.
Definition at line 71 of file COccupancyGridMapFeatureExtractor.h.
Page generated by Doxygen 1.8.14 for MRPT 1.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020 |