template struct mrpt::vision::TKeyPointList_templ¶
A list of image features using the structure TKeyPoint for each feature Users normally will use directly: TKeyPointList, TKeyPointfList.
#include <mrpt/vision/TKeyPoint.h> template <typename FEATURE> struct TKeyPointList_templ { // typedefs typedef typename TFeatureVector::iterator iterator; typedef typename TFeatureVector::const_iterator const_iterator; typedef typename TFeatureVector::reverse_iterator reverse_iterator; typedef typename TFeatureVector::const_reverse_iterator const_reverse_iterator; typedef std::vector<FEATURE> TFeatureVector; typedef FEATURE feature_t; // methods const TFeatureVector& getVector() const; TFeatureID getMaxID() const; const std::vector<size_t>& getFirstIndexPerRowLUT() const; std::vector<size_t>& getFirstIndexPerRowLUT(); iterator begin(); iterator end(); const_iterator begin() const; const_iterator end() const; reverse_iterator rbegin(); reverse_iterator rend(); const_reverse_iterator rbegin() const; const_reverse_iterator rend() const; iterator erase(const iterator& it); bool empty() const; size_t size() const; void clear(); void resize(size_t N); void reserve(size_t N); void push_back(const FEATURE& f); void emplace_back( const int x, const int y ); FEATURE& operator [] (const std::size_t index); const FEATURE& operator [] (const std::size_t index) const; FEATURE& back(); const FEATURE& back() const; FEATURE& front(); const FEATURE& front() const; TKeyPointTraits<FEATURE>::coord_t getFeatureX(size_t i) const; TKeyPointTraits<FEATURE>::coord_t getFeatureY(size_t i) const; TFeatureID getFeatureID(size_t i) const; float getFeatureResponse(size_t i) const; bool isPointFeature(] size_t i) const; float getScale(size_t i) const; TFeatureTrackStatus getTrackStatus(size_t i); void setFeatureX( size_t i, typename TKeyPointTraits<FEATURE>::coord_t x ); void setFeatureY( size_t i, typename TKeyPointTraits<FEATURE>::coord_t y ); void setFeatureXf( size_t i, float x ); void setFeatureYf( size_t i, float y ); void setFeatureID( size_t i, TFeatureID id ); void setFeatureResponse( size_t i, float r ); void setScale( size_t i, float s ); void setTrackStatus( size_t i, TFeatureTrackStatus s ); void mark_as_outdated() const; };
Methods¶
const TFeatureVector& getVector() const
Returns a const ref to the actual std::vector<> container.
TFeatureID getMaxID() const
Returns the maximum ID of all features in the list, or 0 if it’s empty.
const std::vector<size_t>& getFirstIndexPerRowLUT() const
Returns a vector with a LUT of the first feature index per row, to efficiently look for neighbors, etc.
By default this vector is empty, so if a feature detector is used that doesn’t fill this out, it will remain empty and useless. FASTER detectors do fill this out. In general, a feature list that dynamically changes will not use this LUT.
std::vector<size_t>& getFirstIndexPerRowLUT()
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.