Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
mrpt::vision::CFeatureTracker_KL Struct Reference

Detailed Description

Track a set of features from old_img -> new_img using sparse optimal flow (classic KL method).

See CGenericFeatureTracker for a more detailed explanation on how to use this class.

List of additional parameters in "extra_params" (apart from those in CGenericFeatureTracker) accepted by this class:

See also
OpenCV's method cvCalcOpticalFlowPyrLK

Definition at line 228 of file tracking.h.

#include <mrpt/vision/tracking.h>

Inheritance diagram for mrpt::vision::CFeatureTracker_KL:
Inheritance graph

Public Member Functions

 CFeatureTracker_KL ()
 Default ctor. More...
 
 CFeatureTracker_KL (mrpt::utils::TParametersDouble extraParams)
 Ctor with extra parameters. More...
 
void trackFeatures (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, TSimpleFeatureList &inout_featureList)
 Perform feature tracking from "old_img" to "new_img", with a (possibly empty) list of previously tracked features "inout_featureList". More...
 
void trackFeatures (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, TSimpleFeaturefList &inout_featureList)
 
void trackFeatures (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, CFeatureList &inout_featureList)
 
void trackFeaturesNewList (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, const vision::CFeatureList &in_featureList, vision::CFeatureList &out_featureList)
 A wrapper around the basic trackFeatures() method, but keeping the original list of features unmodified and returns the tracked ones in a new list. More...
 
const mrpt::utils::CTimeLoggergetProfiler () const
 Returns a read-only reference to the internal time logger. More...
 
mrpt::utils::CTimeLoggergetProfiler ()
 Returns a reference to the internal time logger. More...
 
void enableTimeLogger (bool enable=true)
 Returns a read-only reference to the internal time logger. More...
 
int getDetectorAdaptiveThreshold () const
 Returns the current adaptive threshold used by the FAST(ER) detector to find out new features in empty areas. More...
 

Public Attributes

mrpt::utils::TParametersDouble extra_params
 Optional list of extra parameters to the algorithm. More...
 
TExtraOutputInfo last_execution_extra_info
 Updated with each call to trackFeatures() More...
 

Protected Member Functions

virtual void trackFeatures_impl (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, vision::CFeatureList &inout_featureList) MRPT_OVERRIDE
 This version falls back to the version with TSimpleFeatureList if the derived class does not implement it. More...
 
virtual void trackFeatures_impl (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, TSimpleFeatureList &inout_featureList) MRPT_OVERRIDE
 The tracking method implementation, to be implemented in children classes. More...
 
virtual void trackFeatures_impl (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, TSimpleFeaturefList &inout_featureList) MRPT_OVERRIDE
 The tracking method implementation, to be implemented in children classes. More...
 
void updateAdaptiveNewFeatsThreshold (const size_t nNewlyDetectedFeats, const size_t desired_num_features)
 Adapts the threshold m_detector_adaptive_thres according to the real and desired number of features just detected. More...
 

Protected Attributes

mrpt::utils::CTimeLogger m_timlog
 the internal time logger, disabled by default. More...
 
mrpt::vision::TSimpleFeatureList m_newly_detected_feats
 This field is clared by trackFeatures() before calling trackFeatures_impl(), and can be filled out with newly defected FAST(ER) features in the latter. More...
 

Private Member Functions

template<typename FEATLIST >
void trackFeatures_impl_templ (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, FEATLIST &inout_featureList)
 
template<typename FEATLIST >
void internal_trackFeatures (const mrpt::utils::CImage &old_img, const mrpt::utils::CImage &new_img, FEATLIST &inout_featureList)
 

Private Attributes

size_t m_update_patches_counter
 for use when "update_patches_every">=1 More...
 
size_t m_check_KLT_counter
 For use when "check_KLT_response_every">=1. More...
 
int m_detector_adaptive_thres
 For use in "add_new_features" == true. More...
 

Constructor & Destructor Documentation

◆ CFeatureTracker_KL() [1/2]

mrpt::vision::CFeatureTracker_KL::CFeatureTracker_KL ( )
inline

Default ctor.

Definition at line 231 of file tracking.h.

◆ CFeatureTracker_KL() [2/2]

mrpt::vision::CFeatureTracker_KL::CFeatureTracker_KL ( mrpt::utils::TParametersDouble  extraParams)
inline

Ctor with extra parameters.

Definition at line 233 of file tracking.h.

Member Function Documentation

◆ enableTimeLogger()

void mrpt::vision::CGenericFeatureTracker::enableTimeLogger ( bool  enable = true)
inlineinherited

Returns a read-only reference to the internal time logger.

Definition at line 160 of file tracking.h.

◆ getDetectorAdaptiveThreshold()

int mrpt::vision::CGenericFeatureTracker::getDetectorAdaptiveThreshold ( ) const
inlineinherited

Returns the current adaptive threshold used by the FAST(ER) detector to find out new features in empty areas.

Definition at line 163 of file tracking.h.

◆ getProfiler() [1/2]

mrpt::utils::CTimeLogger& mrpt::vision::CGenericFeatureTracker::getProfiler ( )
inlineinherited

Returns a reference to the internal time logger.

Definition at line 157 of file tracking.h.

◆ getProfiler() [2/2]

const mrpt::utils::CTimeLogger& mrpt::vision::CGenericFeatureTracker::getProfiler ( ) const
inlineinherited

Returns a read-only reference to the internal time logger.

Definition at line 155 of file tracking.h.

◆ internal_trackFeatures()

template<typename FEATLIST >
void mrpt::vision::CGenericFeatureTracker::internal_trackFeatures ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
FEATLIST &  inout_featureList 
)
privateinherited

◆ trackFeatures() [1/3]

void mrpt::vision::CGenericFeatureTracker::trackFeatures ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
CFeatureList inout_featureList 
)
inherited

◆ trackFeatures() [2/3]

void mrpt::vision::CGenericFeatureTracker::trackFeatures ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
TSimpleFeaturefList inout_featureList 
)
inherited

◆ trackFeatures() [3/3]

void mrpt::vision::CGenericFeatureTracker::trackFeatures ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
TSimpleFeatureList inout_featureList 
)
inherited

Perform feature tracking from "old_img" to "new_img", with a (possibly empty) list of previously tracked features "inout_featureList".

This is a list of parameters (in "extraParams") accepted by ALL implementations of feature tracker (see each derived class for more specific parameters).

  • "add_new_features" (Default=0). If set to "1", new features will be also added to the existing ones in areas of the image poor of features. This method does:

Convert old and new images to grayscale, if they're in color.

  • Call the pure virtual "trackFeatures_impl" method.
  • Implement the optional detection of new features if "add_new_features"!=0.

◆ trackFeatures_impl() [1/3]

virtual void mrpt::vision::CFeatureTracker_KL::trackFeatures_impl ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
TSimpleFeaturefList inout_featureList 
)
protectedvirtual

The tracking method implementation, to be implemented in children classes.

Reimplemented from mrpt::vision::CGenericFeatureTracker.

◆ trackFeatures_impl() [2/3]

virtual void mrpt::vision::CFeatureTracker_KL::trackFeatures_impl ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
TSimpleFeatureList inout_featureList 
)
protectedvirtual

The tracking method implementation, to be implemented in children classes.

Implements mrpt::vision::CGenericFeatureTracker.

◆ trackFeatures_impl() [3/3]

virtual void mrpt::vision::CFeatureTracker_KL::trackFeatures_impl ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
vision::CFeatureList inout_featureList 
)
protectedvirtual

This version falls back to the version with TSimpleFeatureList if the derived class does not implement it.

Implements mrpt::vision::CGenericFeatureTracker.

◆ trackFeatures_impl_templ()

template<typename FEATLIST >
void mrpt::vision::CFeatureTracker_KL::trackFeatures_impl_templ ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
FEATLIST &  inout_featureList 
)
private

◆ trackFeaturesNewList()

void mrpt::vision::CGenericFeatureTracker::trackFeaturesNewList ( const mrpt::utils::CImage old_img,
const mrpt::utils::CImage new_img,
const vision::CFeatureList in_featureList,
vision::CFeatureList out_featureList 
)
inlineinherited

A wrapper around the basic trackFeatures() method, but keeping the original list of features unmodified and returns the tracked ones in a new list.

Definition at line 140 of file tracking.h.

References mrpt::vision::CFeatureList::begin(), and mrpt::vision::CFeatureList::end().

◆ updateAdaptiveNewFeatsThreshold()

void mrpt::vision::CGenericFeatureTracker::updateAdaptiveNewFeatsThreshold ( const size_t  nNewlyDetectedFeats,
const size_t  desired_num_features 
)
protectedinherited

Adapts the threshold m_detector_adaptive_thres according to the real and desired number of features just detected.

Member Data Documentation

◆ extra_params

mrpt::utils::TParametersDouble mrpt::vision::CGenericFeatureTracker::extra_params
inherited

Optional list of extra parameters to the algorithm.

Definition at line 111 of file tracking.h.

◆ last_execution_extra_info

TExtraOutputInfo mrpt::vision::CGenericFeatureTracker::last_execution_extra_info
inherited

Updated with each call to trackFeatures()

Definition at line 171 of file tracking.h.

◆ m_check_KLT_counter

size_t mrpt::vision::CGenericFeatureTracker::m_check_KLT_counter
privateinherited

For use when "check_KLT_response_every">=1.

Definition at line 198 of file tracking.h.

◆ m_detector_adaptive_thres

int mrpt::vision::CGenericFeatureTracker::m_detector_adaptive_thres
privateinherited

For use in "add_new_features" == true.

Definition at line 199 of file tracking.h.

◆ m_newly_detected_feats

mrpt::vision::TSimpleFeatureList mrpt::vision::CGenericFeatureTracker::m_newly_detected_feats
protectedinherited

This field is clared by trackFeatures() before calling trackFeatures_impl(), and can be filled out with newly defected FAST(ER) features in the latter.

If it's not the case, feats will be computed anyway if the user enabled the "add_new_features" option.

Definition at line 189 of file tracking.h.

◆ m_timlog

mrpt::utils::CTimeLogger mrpt::vision::CGenericFeatureTracker::m_timlog
protectedinherited

the internal time logger, disabled by default.

Definition at line 183 of file tracking.h.

◆ m_update_patches_counter

size_t mrpt::vision::CGenericFeatureTracker::m_update_patches_counter
privateinherited

for use when "update_patches_every">=1

Definition at line 197 of file tracking.h.




Page generated by Doxygen 1.9.1 for MRPT 1.4.0 SVN: at Mon Apr 18 03:37:47 UTC 2022