Feature detection and tracking basics

1. Description

A set of features is represented in MRPT with the class mrpt::vision::CFeatureList (for features with patches, descriptors, etc.) or with the more light-weighted structure  mrpt::vision::TSimpleFeatureList for a plain list of feature points without descriptors.

Those two are the central data types in feature detection and tracking classes. In the case of  mrpt::vision::CFeatureList, it consists of a list of individual feature structures (of type mrpt::vision::CFeature), each holding a (x,y) pixel coordinates, a unique ID, and, optionally, one or more descriptors. So it’s important to tell the difference between a feature detector and its descriptors.
Refer to the module ‘Features’ (within the library mrpt-vision) for further documentation.



2. Detection & descriptors

Use the class mrpt::vision::CFeatureExtraction for detecting, and optionally extracting descriptors, from an image.

See also the program track-video-features.




3. Tracking

For efficient feature tracking, see the class mrpt::vision::CGenericFeatureTracker, a virtual base class for tracking frameworks that, independently of the specific tracking algorithm, implement common stages such as detection of new features with FAST in areas of the image where old features have been lost, recalculation of KLT scores and deletion of badly-tracked features, etc.

4. Loading/saving to text files

A sequence of features in an object of type CFeatureList can be saved and loaded to/from text files, in a human-friendly format. These files can be also loaded from MATLAB/octave. See the functionsmrpt::vision::CFeatureList::loadFromTextFile() and mrpt::vision::CFeatureList::saveToTextFile(). Example of the contents of such a file: