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:
Definition at line 320 of file tracking.h.
#include <mrpt/vision/tracking.h>
Public Member Functions | |
CFeatureTracker_KL () | |
Default ctor. More... | |
CFeatureTracker_KL (mrpt::system::TParametersDouble extraParams) | |
Ctor with extra parameters. More... | |
void | trackFeatures (const mrpt::img::CImage &old_img, const mrpt::img::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::img::CImage &old_img, const mrpt::img::CImage &new_img, TSimpleFeaturefList &inout_featureList) |
overload with subpixel precision More... | |
void | trackFeatures (const mrpt::img::CImage &old_img, const mrpt::img::CImage &new_img, CFeatureList &inout_featureList) |
overload This overload version uses the old (and much slower) CFeatureList More... | |
void | trackFeaturesNewList (const mrpt::img::CImage &old_img, const mrpt::img::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::system::CTimeLogger & | getProfiler () const |
Returns a read-only reference to the internal time logger. More... | |
mrpt::system::CTimeLogger & | getProfiler () |
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::system::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::img::CImage &old_img, const mrpt::img::CImage &new_img, vision::CFeatureList &inout_featureList) 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::img::CImage &old_img, const mrpt::img::CImage &new_img, TSimpleFeatureList &inout_featureList) override |
The tracking method implementation, to be implemented in children classes. More... | |
virtual void | trackFeatures_impl (const mrpt::img::CImage &old_img, const mrpt::img::CImage &new_img, TSimpleFeaturefList &inout_featureList) 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::system::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::img::CImage &old_img, const mrpt::img::CImage &new_img, FEATLIST &inout_featureList) |
Track a set of features from old_img -> new_img using sparse optimal flow (classic KL method) Optional parameters that can be passed in "extra_params": More... | |
template<typename FEATLIST > | |
void | internal_trackFeatures (const mrpt::img::CImage &old_img, const mrpt::img::CImage &new_img, FEATLIST &inout_featureList) |
Perform feature tracking from "old_img" to "new_img", with a (possibly empty) list of previously tracked features "featureList". More... | |
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... | |
|
inline |
Default ctor.
Definition at line 323 of file tracking.h.
|
inline |
Ctor with extra parameters.
Definition at line 325 of file tracking.h.
|
inlineinherited |
Returns a read-only reference to the internal time logger.
Definition at line 222 of file tracking.h.
References mrpt::system::CTimeLogger::enable(), and mrpt::vision::CGenericFeatureTracker::m_timlog.
|
inlineinherited |
Returns the current adaptive threshold used by the FAST(ER) detector to find out new features in empty areas.
Definition at line 229 of file tracking.h.
References mrpt::vision::CGenericFeatureTracker::m_detector_adaptive_thres.
|
inlineinherited |
Returns a reference to the internal time logger.
Definition at line 220 of file tracking.h.
References mrpt::vision::CGenericFeatureTracker::m_timlog.
|
inlineinherited |
Returns a read-only reference to the internal time logger.
Definition at line 215 of file tracking.h.
References mrpt::vision::CGenericFeatureTracker::m_timlog.
|
privateinherited |
Perform feature tracking from "old_img" to "new_img", with a (possibly empty) list of previously tracked features "featureList".
This is a list of parameters (in "extraParams") accepted by ALL implementations of feature tracker (see each derived class for more specific parameters).
Definition at line 584 of file tracking.cpp.
References mrpt::vision::CFeatureExtraction::detectFeatures_SSE2_FASTER12(), mrpt::img::FAST_REF_OR_CONVERT_TO_GRAY, mrpt::img::CImage::getHeight(), mrpt::img::CImage::getWidth(), mrpt::img::CImage::KLT_response(), min, mrpt::square(), mrpt::vision::detail::trackFeatures_addNewFeats(), mrpt::vision::detail::trackFeatures_checkResponses(), mrpt::vision::detail::trackFeatures_deleteOOB(), and mrpt::vision::detail::trackFeatures_updatePatch().
|
inherited |
overload This overload version uses the old (and much slower) CFeatureList
Definition at line 781 of file tracking.cpp.
|
inherited |
overload with subpixel precision
Definition at line 794 of file tracking.cpp.
|
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).
Convert old and new images to grayscale, if they're in color.
Definition at line 787 of file tracking.cpp.
Referenced by mrpt::vision::CGenericFeatureTracker::trackFeaturesNewList().
|
overrideprotectedvirtual |
The tracking method implementation, to be implemented in children classes.
Reimplemented from mrpt::vision::CGenericFeatureTracker.
Definition at line 163 of file tracking_KL.cpp.
|
overrideprotectedvirtual |
The tracking method implementation, to be implemented in children classes.
Implements mrpt::vision::CGenericFeatureTracker.
Definition at line 156 of file tracking_KL.cpp.
|
overrideprotectedvirtual |
This version falls back to the version with TSimpleFeatureList if the derived class does not implement it.
Implements mrpt::vision::CGenericFeatureTracker.
Definition at line 150 of file tracking_KL.cpp.
|
private |
Track a set of features from old_img -> new_img using sparse optimal flow (classic KL method) Optional parameters that can be passed in "extra_params":
Definition at line 37 of file tracking_KL.cpp.
References ASSERT_, mrpt::img::FAST_REF_OR_CONVERT_TO_GRAY, mrpt::img::CImage::getAs(), mrpt::img::CImage::getHeight(), mrpt::img::CImage::getWidth(), mrpt_alloca, mrpt_alloca_free, MRPT_END, MRPT_START, status, mrpt::vision::status_LOST, mrpt::vision::status_OOB, mrpt::vision::status_TRACKED, and THROW_EXCEPTION.
|
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 201 of file tracking.h.
References mrpt::vision::CFeatureList::begin(), mrpt::vision::CFeatureList::end(), and mrpt::vision::CGenericFeatureTracker::trackFeatures().
|
protectedinherited |
Adapts the threshold m_detector_adaptive_thres according to the real and desired number of features just detected.
Definition at line 801 of file tracking.cpp.
References min.
|
inherited |
Optional list of extra parameters to the algorithm.
Definition at line 148 of file tracking.h.
|
inherited |
Updated with each call to trackFeatures()
Definition at line 244 of file tracking.h.
|
privateinherited |
For use when "check_KLT_response_every">=1.
Definition at line 285 of file tracking.h.
|
privateinherited |
For use in "add_new_features" == true.
Definition at line 287 of file tracking.h.
Referenced by mrpt::vision::CGenericFeatureTracker::getDetectorAdaptiveThreshold().
|
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 274 of file tracking.h.
|
protectedinherited |
the internal time logger, disabled by default.
Definition at line 266 of file tracking.h.
Referenced by mrpt::vision::CGenericFeatureTracker::enableTimeLogger(), and mrpt::vision::CGenericFeatureTracker::getProfiler().
|
privateinherited |
for use when "update_patches_every">=1
Definition at line 283 of file tracking.h.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |