Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Protected Types | Protected Attributes

mrpt::vision::CFeatureList Class Reference

A list of visual features, to be used as output by detectors, as input/output by trackers, etc. More...

#include <mrpt/vision/CFeature.h>

Inheritance diagram for mrpt::vision::CFeatureList:
Inheritance graph
[legend]
Collaboration diagram for mrpt::vision::CFeatureList:
Collaboration graph
[legend]

List of all members.

Public Member Functions

TFeatureType get_type () const
 The type of the first feature in the list.
void saveToTextFile (const std::string &fileName, bool APPEND=false)
 Save feature list to a text file.
void loadFromTextFile (const std::string &fileName)
 Save feature list to a text file.
TFeatureID getMaxID () const
 Get the maximum ID into the list.
CFeaturePtr getByID (TFeatureID ID) const
 Get a reference to a Feature from its ID.
CFeaturePtr nearest (const float x, const float y, double &max_dist) const
 Get a reference to the nearest feature to the a given 2D point (version returning distance to closest feature in "max_dist").
 CFeatureList ()
 Constructor.
virtual ~CFeatureList ()
 Virtual destructor.
void mark_kdtree_as_outdated () const
 Call this when the list of features has been modified so the KD-tree is marked as outdated.
Virtual methods that MUST be implemented by children classes of KDTreeCapable

virtual size_t kdtree_get_point_count () const
 Must return the number of data points.
virtual void kdtree_fill_point_data (ANNpointArray &data, const int nDims) const
 Must fill out the data points in "data", such as the i'th point will be stored in (data[i][0],...,data[i][nDims-1]).

Protected Types

typedef std::deque< CFeaturePtr > TInternalFeatList

Protected Attributes

TInternalFeatList m_feats
 The actual container with the list of features.

Method and datatypes to emulate a STL container



typedef TInternalFeatList::iterator iterator
typedef
TInternalFeatList::const_iterator 
const_iterator
typedef
TInternalFeatList::reverse_iterator 
reverse_iterator
typedef
TInternalFeatList::const_reverse_iterator 
const_reverse_iterator
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
iterator erase (const iterator it)
bool empty () const
size_t size () const
void clear ()
void resize (size_t N)
void push_front (const CFeaturePtr &f)
void push_back (const CFeaturePtr &f)
CFeaturePtr & operator[] (const unsigned int index)
const CFeaturePtr & operator[] (const unsigned int index) const

Detailed Description

A list of visual features, to be used as output by detectors, as input/output by trackers, etc.

Definition at line 232 of file CFeature.h.


Member Typedef Documentation

typedef TInternalFeatList::const_iterator mrpt::vision::CFeatureList::const_iterator

Definition at line 276 of file CFeature.h.

typedef TInternalFeatList::const_reverse_iterator mrpt::vision::CFeatureList::const_reverse_iterator

Definition at line 279 of file CFeature.h.

typedef TInternalFeatList::iterator mrpt::vision::CFeatureList::iterator

Definition at line 275 of file CFeature.h.

typedef TInternalFeatList::reverse_iterator mrpt::vision::CFeatureList::reverse_iterator

Definition at line 278 of file CFeature.h.

typedef std::deque<CFeaturePtr> mrpt::vision::CFeatureList::TInternalFeatList [protected]

Definition at line 235 of file CFeature.h.


Constructor & Destructor Documentation

mrpt::vision::CFeatureList::CFeatureList (  ) 

Constructor.

virtual mrpt::vision::CFeatureList::~CFeatureList (  )  [virtual]

Virtual destructor.


Member Function Documentation

iterator mrpt::vision::CFeatureList::begin (  )  [inline]
const_iterator mrpt::vision::CFeatureList::begin (  )  const [inline]

Definition at line 283 of file CFeature.h.

void mrpt::vision::CFeatureList::clear ( void   )  [inline]

Definition at line 291 of file CFeature.h.

bool mrpt::vision::CFeatureList::empty (  )  const [inline]

Definition at line 288 of file CFeature.h.

iterator mrpt::vision::CFeatureList::end (  )  [inline]
const_iterator mrpt::vision::CFeatureList::end (  )  const [inline]

Definition at line 284 of file CFeature.h.

iterator mrpt::vision::CFeatureList::erase ( const iterator  it  )  [inline]

Definition at line 286 of file CFeature.h.

TFeatureType mrpt::vision::CFeatureList::get_type (  )  const [inline]

The type of the first feature in the list.

Definition at line 241 of file CFeature.h.

References mrpt::vision::featNotDefined, and get_type().

Referenced by get_type().

CFeaturePtr mrpt::vision::CFeatureList::getByID ( TFeatureID  ID  )  const

Get a reference to a Feature from its ID.

TFeatureID mrpt::vision::CFeatureList::getMaxID (  )  const

Get the maximum ID into the list.

virtual void mrpt::vision::CFeatureList::kdtree_fill_point_data ( ANNpointArray &  data,
const int  nDims 
) const [virtual]

Must fill out the data points in "data", such as the i'th point will be stored in (data[i][0],...,data[i][nDims-1]).

Implements mrpt::math::KDTreeCapable.

virtual size_t mrpt::vision::CFeatureList::kdtree_get_point_count (  )  const [inline, virtual]

Must return the number of data points.

Implements mrpt::math::KDTreeCapable.

Definition at line 306 of file CFeature.h.

References mrpt::math::size().

void mrpt::vision::CFeatureList::loadFromTextFile ( const std::string &  fileName  ) 

Save feature list to a text file.

void mrpt::vision::CFeatureList::mark_kdtree_as_outdated (  )  const [inline]

Call this when the list of features has been modified so the KD-tree is marked as outdated.

Definition at line 271 of file CFeature.h.

CFeaturePtr mrpt::vision::CFeatureList::nearest ( const float  x,
const float  y,
double &  max_dist 
) const

Get a reference to the nearest feature to the a given 2D point (version returning distance to closest feature in "max_dist").

Parameters:
x [IN] The query point x-coordinate
y [IN] The query point y-coordinate
max_dist [IN/OUT] At input: The maximum distance to search for. At output: The actual distance to the feature.
Returns:
A reference to the found feature, or a NULL smart pointer if none found.
Note:
See also all the available KD-tree search methods, listed in mrpt::math::KDTreeCapable
const CFeaturePtr& mrpt::vision::CFeatureList::operator[] ( const unsigned int  index  )  const [inline]

Definition at line 298 of file CFeature.h.

CFeaturePtr& mrpt::vision::CFeatureList::operator[] ( const unsigned int  index  )  [inline]

Definition at line 297 of file CFeature.h.

void mrpt::vision::CFeatureList::push_back ( const CFeaturePtr &  f  )  [inline]

Definition at line 295 of file CFeature.h.

void mrpt::vision::CFeatureList::push_front ( const CFeaturePtr &  f  )  [inline]

Definition at line 294 of file CFeature.h.

void mrpt::vision::CFeatureList::resize ( size_t  N  )  [inline]

Definition at line 292 of file CFeature.h.

void mrpt::vision::CFeatureList::saveToTextFile ( const std::string &  fileName,
bool  APPEND = false 
)

Save feature list to a text file.

size_t mrpt::vision::CFeatureList::size (  )  const [inline]

Definition at line 289 of file CFeature.h.


Member Data Documentation

The actual container with the list of features.

Definition at line 237 of file CFeature.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.7.1 for MRPT 0.9.1 SVN:exported at Fri Aug 6 10:31:35 UTC 2010