![]() |
Visual Servoing Platform version 3.7.0
|
#include <vpRBKltTracker.h>
Classes | |
| struct | vpTrackedKltPoint |
Public Member Functions | |
| vpRBKltTracker () | |
| virtual | ~vpRBKltTracker ()=default |
| bool | requiresRGB () const VP_OVERRIDE |
| bool | requiresDepth () const VP_OVERRIDE |
| bool | requiresSilhouetteCandidates () const VP_OVERRIDE |
| void | onTrackingIterStart (const vpRBFeatureTrackerInput &, const vpHomogeneousMatrix &) VP_OVERRIDE |
| void | onTrackingIterEnd (const vpHomogeneousMatrix &) VP_OVERRIDE |
| void | extractFeatures (const vpRBFeatureTrackerInput &frame, const vpRBFeatureTrackerInput &previousFrame, const vpHomogeneousMatrix &cMo) VP_OVERRIDE |
| void | trackFeatures (const vpRBFeatureTrackerInput &frame, const vpRBFeatureTrackerInput &previousFrame, const vpHomogeneousMatrix &cMo) VP_OVERRIDE |
| void | initVVS (const vpRBFeatureTrackerInput &frame, const vpRBFeatureTrackerInput &previousFrame, const vpHomogeneousMatrix &cMo) VP_OVERRIDE |
| void | computeVVSIter (const vpRBFeatureTrackerInput &frame, const vpHomogeneousMatrix &cMo, unsigned int iteration) VP_OVERRIDE |
| void | display (const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpImage< vpRGBa > &IRGB, const vpImage< unsigned char > &depth) const VP_OVERRIDE |
| unsigned | getNumFeatures () const |
| bool | vvsHasConverged () const |
| virtual double | getVVSTrackerWeight (double optimizationProgress) const |
| const std::shared_ptr< vpTemporalWeighting > | getTemporalTrackerWeight () const |
| void | setTrackerWeight (double weight) |
| void | setTrackerWeight (const std::shared_ptr< vpTemporalWeighting > &weight) |
| virtual vpMatrix | getLTL () const |
| virtual vpColVector | getLTR () const |
| const vpColVector & | getWeightedError () const |
| void | setComputeJacobianObjectSpace (bool inObjectSpace) |
| bool | hasIgnoredDofs () const |
| void | setEstimatedDofs (const std::array< bool, 6 > &dofs) |
| void | updateOptimizerTerms (const vpHomogeneousMatrix &cMo) |
Settings | |
| unsigned int | getMinimumNumberOfPoints () const |
| void | setMinimumNumberOfPoints (unsigned int points) |
| double | getMinimumDistanceNewPoints () const |
| void | setMinimumDistanceNewPoints (double distance) |
| unsigned int | getFilteringBorderSize () const |
| void | setFilteringBorderSize (unsigned int border) |
| double | getFilteringMaxReprojectionError () const |
| void | setFilteringMaxReprojectionError (double maxError) |
| bool | shouldUseMask () const |
| void | setShouldUseMask (bool useMask) |
| float | getMinimumMaskConfidence () const |
| void | setMinimumMaskConfidence (float confidence) |
| const vpKltOpencv & | getKltTracker () const |
| vpKltOpencv & | getKltTracker () |
| virtual void | loadJsonConfiguration (const nlohmann::json &j) VP_OVERRIDE |
Core Tracking methods | |
| virtual void | reset () |
Display | |
| bool | featuresShouldBeDisplayed () const |
| void | setFeaturesShouldBeDisplayed (bool enableDisplay) |
Covariance computation | |
| virtual const vpMatrix | getCovariance () const |
| virtual void | updateCovariance (const double lambda) |
Static Public Member Functions | |
| static void | computeJTR (const vpMatrix &interaction, const vpColVector &error, vpColVector &JTR) |
| static vpMatrix | computeCovarianceMatrix (const vpMatrix &A, const vpColVector &b, const vpMatrix &W) |
Protected Member Functions | |
| vpMatrix | computeoJo () const |
Protected Attributes | |
| vpMatrix | m_L |
| vpMatrix | m_LTL |
| vpColVector | m_LTR |
| vpMatrix | m_cov |
| vpColVector | m_covWeightDiag |
| vpColVector | m_error |
| vpColVector | m_weighted_error |
| vpColVector | m_weights |
| unsigned | m_numFeatures |
| std::shared_ptr< vpTemporalWeighting > | m_weighting |
| bool | m_vvsConverged |
| bool | m_enableDisplay |
| std::array< bool, 6 > | m_estimatedDofs |
| vpMatrix | m_oJo |
| bool | m_jacobianInObjectSpace |
KLT-Based features.
Tutorials
If you want to have an in-depth presentation of the Render-Based Tracker (RBT), you may have a look at:
Definition at line 71 of file vpRBKltTracker.h.
| vpRBKltTracker::vpRBKltTracker | ( | ) |
|
virtualdefault |
|
staticinherited |
Definition at line 78 of file vpRBFeatureTracker.cpp.
References vpColVector::t(), and vpMatrix::t().
Referenced by updateCovariance().
|
staticinherited |
Definition at line 56 of file vpRBFeatureTracker.cpp.
References vpArray2D< Type >::data, vpArray2D< Type >::getCols(), vpArray2D< Type >::getRows(), vpMatrixException::incorrectMatrixSizeError, and vpColVector::resize().
Referenced by updateOptimizerTerms().
|
inlineprotectedinherited |
Definition at line 284 of file vpRBFeatureTracker.h.
References m_estimatedDofs.
Referenced by setEstimatedDofs().
|
virtual |
Implements vpRBFeatureTracker.
|
virtual |
Implements vpRBFeatureTracker.
|
virtual |
Extract features from the frame data and the current pose estimate.
Implements vpRBFeatureTracker.
|
inlineinherited |
Definition at line 163 of file vpRBFeatureTracker.h.
References m_enableDisplay.
|
inlinevirtualinherited |
Retrieve the 6 x 6 pose covariance matrix, computed from the weights associated to each feature.
The updateCovariance method should have been called before
Definition at line 186 of file vpRBFeatureTracker.h.
References m_cov.
|
inline |
Return the number of pixels in the image border where points should not be tracked. Points that are near image borders are likely to be lost in the future.
Definition at line 125 of file vpRBKltTracker.h.
|
inline |
Get the maximum reprojection error, in pixels, for a point to be considered as outlier. This reprojection error is computed between the tracked klt position in the image and the reprojection of the associated 3D point. If a point goes above this threshold, it is removed from tracking.
Definition at line 135 of file vpRBKltTracker.h.
|
inline |
Get the underlying KLT tracker. Use this to modify its settings.
Definition at line 169 of file vpRBKltTracker.h.
|
inline |
Get the underlying KLT tracker. Use this to read its settings.
Definition at line 163 of file vpRBKltTracker.h.
|
inlinevirtualinherited |
Get the left-side term of the Gauss-Newton optimization term.
Definition at line 215 of file vpRBFeatureTracker.h.
References m_LTL.
|
inlinevirtualinherited |
Get the right-side term of the Gauss-Newton optimization term.
Definition at line 220 of file vpRBFeatureTracker.h.
References m_LTR.
|
inline |
Get the minimum distance that a candidate point should have to every other tracked point if it should be added.
During tracking, KLT points are frequently sampled. This settings used to ensure that multiple klt points do not track the same 3D points.
Definition at line 118 of file vpRBKltTracker.h.
|
inline |
Returns the minimum mask confidence that a pixel should have if it should be kept during tracking.
This value is between 0 and 1
Definition at line 151 of file vpRBKltTracker.h.
|
inline |
Get the minimum acceptable number of points that should be tracked. If KLT tracking has less than this number of points. The KLT tracking will be fully reinitialized.
Definition at line 108 of file vpRBKltTracker.h.
|
inlineinherited |
Return the type of feature that is used by this tracker.
Get the number of features used to compute the pose update
Definition at line 88 of file vpRBFeatureTracker.h.
References m_numFeatures.
|
inlineinherited |
Definition at line 208 of file vpRBFeatureTracker.h.
References m_weighting.
|
inlinevirtualinherited |
Get the importance of this tracker in the optimization step. The default computation is the following:
, where
is the weight defined by setTrackerWeight, and
is the number of features.
Reimplemented in vpRBSilhouetteCCDTracker.
Definition at line 207 of file vpRBFeatureTracker.h.
References m_numFeatures, and m_weighting.
|
inlineinherited |
Get a weighted version of the error vector. This should not include the userVVSWeight, but may include reweighting to remove outliers, occlusions, etc.
Definition at line 226 of file vpRBFeatureTracker.h.
References m_weighted_error.
|
inlineinherited |
Definition at line 246 of file vpRBFeatureTracker.h.
References m_estimatedDofs.
Referenced by vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix().
|
virtual |
Implements vpRBFeatureTracker.
|
inlinevirtual |
Reimplemented from vpRBFeatureTracker.
Definition at line 172 of file vpRBKltTracker.h.
References vpRBFeatureTracker::loadJsonConfiguration(), setFilteringMaxReprojectionError(), setMinimumDistanceNewPoints(), setMinimumMaskConfidence(), setMinimumNumberOfPoints(), and setShouldUseMask().
|
inlinevirtual |
Method called after the tracking iteration has finished.
Implements vpRBFeatureTracker.
Definition at line 86 of file vpRBKltTracker.h.
|
inlinevirtual |
Method called when starting a tracking iteration.
Implements vpRBFeatureTracker.
Definition at line 84 of file vpRBKltTracker.h.
|
inlinevirtual |
Whether this tracker requires depth image to extract features.
Implements vpRBFeatureTracker.
Definition at line 80 of file vpRBKltTracker.h.
|
inlinevirtual |
Whether this tracker requires RGB image to extract features.
Implements vpRBFeatureTracker.
Definition at line 78 of file vpRBKltTracker.h.
|
inlinevirtual |
Whether this tracker requires Silhouette candidates.
Implements vpRBFeatureTracker.
Definition at line 82 of file vpRBKltTracker.h.
|
inlinevirtualinherited |
Resets feature state. Can be called when the object changes or is lost, Ensuring that prior data does not influence the tracking behaviour.
Reimplemented in vpRBSilhouetteCCDTracker.
Definition at line 152 of file vpRBFeatureTracker.h.
|
inlineinherited |
Definition at line 238 of file vpRBFeatureTracker.h.
References m_jacobianInObjectSpace.
|
inlineinherited |
Definition at line 255 of file vpRBFeatureTracker.h.
References computeoJo(), m_estimatedDofs, and m_oJo.
Referenced by loadJsonConfiguration(), and vpRBFeatureTracker().
|
inlineinherited |
Definition at line 164 of file vpRBFeatureTracker.h.
References m_enableDisplay.
Referenced by visp.python.rbt.xfeat.RBXFeatFeatureTracker.RBXFeatFeatureTracker::load_settings().
|
inline |
Definition at line 126 of file vpRBKltTracker.h.
|
inline |
Definition at line 136 of file vpRBKltTracker.h.
Referenced by loadJsonConfiguration().
|
inline |
Definition at line 119 of file vpRBKltTracker.h.
Referenced by loadJsonConfiguration().
|
inline |
Definition at line 152 of file vpRBKltTracker.h.
References vpException::badValue.
Referenced by loadJsonConfiguration().
|
inline |
Definition at line 109 of file vpRBKltTracker.h.
Referenced by loadJsonConfiguration().
|
inline |
Definition at line 144 of file vpRBKltTracker.h.
Referenced by loadJsonConfiguration().
|
inlineinherited |
Definition at line 210 of file vpRBFeatureTracker.h.
References m_weighting.
Referenced by visp.python.rbt.xfeat.RBXFeatFeatureTracker.RBXFeatFeatureTracker::load_settings().
|
inlineinherited |
Definition at line 209 of file vpRBFeatureTracker.h.
References m_weighting.
Referenced by visp.python.rbt.xfeat.RBXFeatFeatureTracker.RBXFeatFeatureTracker::load_settings().
|
inline |
Returns whether the tracking algorithm should filter out points that are unlikely to be on the object according to the mask. If the mask is not computed beforehand, then it has no effect.
Definition at line 143 of file vpRBKltTracker.h.
|
virtual |
Track the features.
Implements vpRBFeatureTracker.
|
virtualinherited |
Update the covariance matrix.
| lambda | the visual servoing gain |
Reimplemented in vpRBSilhouetteCCDTracker.
Definition at line 49 of file vpRBFeatureTracker.cpp.
References computeCovarianceMatrix(), vpMatrix::diag(), m_cov, m_covWeightDiag, m_error, and m_L.
|
inlineinherited |
Definition at line 262 of file vpRBFeatureTracker.h.
References computeJTR(), m_covWeightDiag, m_error, m_jacobianInObjectSpace, m_L, m_LTL, m_LTR, m_oJo, m_weighted_error, and m_weights.
Referenced by vpRBDenseDepthTracker::computeVVSIter(), and vpRBSilhouetteMeTracker::computeVVSIter().
|
inlineinherited |
Returns whether the tracker is considered as having converged to the desired pose.
Definition at line 200 of file vpRBFeatureTracker.h.
References m_vvsConverged.
|
protectedinherited |
Right side of the Gauss Newton minimization.
Definition at line 301 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::changeScale(), vpRBDenseDepthTracker::computeVVSIter(), vpRBDenseDepthTracker::extractFeatures(), getCovariance(), vpRBSilhouetteCCDTracker::initVVS(), updateCovariance(), and vpRBSilhouetteCCDTracker::updateCovariance().
|
protectedinherited |
Covariance matrix.
Definition at line 302 of file vpRBFeatureTracker.h.
Referenced by vpRBDenseDepthTracker::computeVVSIter(), vpRBDenseDepthTracker::extractFeatures(), vpRBSilhouetteMeTracker::initVVS(), updateCovariance(), and updateOptimizerTerms().
|
protectedinherited |
Whether VVS has converged, should be updated every VVS iteration.
Definition at line 314 of file vpRBFeatureTracker.h.
Referenced by featuresShouldBeDisplayed(), loadJsonConfiguration(), setFeaturesShouldBeDisplayed(), and vpRBFeatureTracker().
|
protectedinherited |
Definition at line 304 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), vpRBDenseDepthTracker::computeVVSIter(), vpRBSilhouetteMeTracker::computeVVSIter(), vpRBDenseDepthTracker::display(), vpRBSilhouetteCCDTracker::display(), vpRBDenseDepthTracker::extractFeatures(), vpRBSilhouetteCCDTracker::getVVSTrackerWeight(), vpRBSilhouetteMeTracker::initVVS(), vpRBSilhouetteCCDTracker::reset(), updateCovariance(), and updateOptimizerTerms().
|
protectedinherited |
Whether the tracked features should be displayed.
Definition at line 315 of file vpRBFeatureTracker.h.
Referenced by computeoJo(), hasIgnoredDofs(), and setEstimatedDofs().
|
protectedinherited |
Matrix representation of the estimated DOFS.
Definition at line 317 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), setComputeJacobianObjectSpace(), updateOptimizerTerms(), and vpRBFeatureTracker().
|
protectedinherited |
Definition at line 298 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), vpRBDenseDepthTracker::computeVVSIter(), vpRBSilhouetteMeTracker::computeVVSIter(), vpRBDenseDepthTracker::extractFeatures(), vpRBSilhouetteMeTracker::initVVS(), updateCovariance(), and updateOptimizerTerms().
|
protectedinherited |
Error jacobian (In VS terms, the interaction matrix).
Definition at line 299 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), vpRBDenseDepthTracker::computeVVSIter(), getLTL(), and updateOptimizerTerms().
|
protectedinherited |
Left side of the Gauss newton minimization.
Definition at line 300 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), vpRBDenseDepthTracker::computeVVSIter(), vpRBSilhouetteMeTracker::computeVVSIter(), getLTR(), and updateOptimizerTerms().
|
protectedinherited |
Error weights.
Definition at line 309 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::changeScale(), vpRBDenseDepthTracker::computeVVSIter(), vpRBSilhouetteCCDTracker::computeVVSIter(), vpRBSilhouetteMeTracker::computeVVSIter(), vpRBDenseDepthTracker::extractFeatures(), vpRBSilhouetteMeTracker::extractFeatures(), getNumFeatures(), getVVSTrackerWeight(), vpRBSilhouetteCCDTracker::initVVS(), vpRBSilhouetteMeTracker::initVVS(), and vpRBFeatureTracker().
|
protectedinherited |
Definition at line 316 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), setEstimatedDofs(), and updateOptimizerTerms().
|
protectedinherited |
User-defined weight for this specific type of feature.
Definition at line 312 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::computeVVSIter(), vpRBSilhouetteMeTracker::computeVVSIter(), vpRBSilhouetteCCDTracker::initVVS(), vpRBSilhouetteMeTracker::initVVS(), vpRBSilhouetteCCDTracker::reset(), vpRBFeatureTracker(), and vvsHasConverged().
|
protectedinherited |
Raw VS Error vector.
Definition at line 305 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), vpRBDenseDepthTracker::computeVVSIter(), vpRBDenseDepthTracker::extractFeatures(), getWeightedError(), vpRBSilhouetteMeTracker::initVVS(), and updateOptimizerTerms().
|
protectedinherited |
Number of considered features.
Definition at line 310 of file vpRBFeatureTracker.h.
Referenced by getTemporalTrackerWeight(), getVVSTrackerWeight(), vpRBSilhouetteCCDTracker::getVVSTrackerWeight(), loadJsonConfiguration(), setTrackerWeight(), setTrackerWeight(), and vpRBFeatureTracker().
|
protectedinherited |
Weighted VS error.
Definition at line 306 of file vpRBFeatureTracker.h.
Referenced by vpRBSilhouetteCCDTracker::changeScale(), vpRBSilhouetteCCDTracker::computeErrorAndInteractionMatrix(), vpRBDenseDepthTracker::computeVVSIter(), vpRBSilhouetteMeTracker::computeVVSIter(), vpRBDenseDepthTracker::display(), vpRBSilhouetteCCDTracker::display(), vpRBDenseDepthTracker::extractFeatures(), vpRBSilhouetteCCDTracker::initVVS(), vpRBSilhouetteMeTracker::initVVS(), and updateOptimizerTerms().