MRPT  2.0.3
List of all members | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
mrpt::slam::COccupancyGridMapFeatureExtractor Class Reference

Detailed Description

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 32 of file COccupancyGridMapFeatureExtractor.h.

#include <mrpt/slam/COccupancyGridMapFeatureExtractor.h>

Inheritance diagram for mrpt::slam::COccupancyGridMapFeatureExtractor:

Public Member Functions

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

using TCache = std::map< const mrpt::maps::COccupancyGridMap2D *, mrpt::maps::CLandmarksMap::Ptr >
 

Protected Member Functions

void OnEvent (const mrpt::system::mrptEvent &e) override
 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...
 

Private Member Functions

void internal_on_event (const mrptEvent &e)
 

Private Attributes

std::set< CObservable * > m_subscribed
 

Member Typedef Documentation

◆ TCache

Definition at line 69 of file COccupancyGridMapFeatureExtractor.h.

Member Function Documentation

◆ extractFeatures()

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

Note
See the paper "..."
See also
uncached_extractFeatures

Definition at line 80 of file COccupancyGridMapFeatureExtractor.cpp.

Referenced by mrpt::apps::CGridMapAlignerApp::run().

◆ internal_on_event()

void CObserver::internal_on_event ( const mrptEvent e)
privateinherited

Definition at line 47 of file CObserver.cpp.

◆ observeBegin()

void CObserver::observeBegin ( CObservable obj)
inherited

Starts the subscription of this observer to the given object.

See also
observeEnd

Definition at line 26 of file CObserver.cpp.

References mrpt::system::CObservable::internal_observer_begin().

Referenced by CGraphSlamHandler< GRAPH_T >::initVisualization().

◆ observeEnd()

void CObserver::observeEnd ( CObservable obj)
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.

See also
observeBegin

Definition at line 36 of file CObserver.cpp.

◆ OnEvent()

void COccupancyGridMapFeatureExtractor::OnEvent ( const mrpt::system::mrptEvent e)
overrideprotectedvirtual

This will receive the events from maps in order to purge the cache.

Implements mrpt::system::CObserver.

Definition at line 116 of file COccupancyGridMapFeatureExtractor.cpp.

References mrpt::system::mrptEvent::isOfType(), and mrpt::maps::mrptEventMetricMapClear::source_map.

◆ uncached_extractFeatures()

void COccupancyGridMapFeatureExtractor::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 
)
static

Member Data Documentation

◆ m_cache

TCache mrpt::slam::COccupancyGridMapFeatureExtractor::m_cache
protected

A cache of already computed maps.

Definition at line 71 of file COccupancyGridMapFeatureExtractor.h.

◆ m_subscribed

std::set<CObservable*> mrpt::system::CObserver::m_subscribed
privateinherited

Definition at line 53 of file CObserver.h.




Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Thu May 21 21:53:32 UTC 2020