ON THIS PAGE

  • FeatureTrackerConfig
  • Reference

FeatureTrackerConfig

This message is used to configure the FeatureTracker node. You can set the CornerDetector, FeatureMaintainer and MotionEstimator.

Reference

class

depthai.FeatureTrackerConfig(depthai.Buffer)

class
CornerDetector
Corner detector configuration structure.
class
FeatureMaintainer
FeatureMaintainer configuration structure.
class
MotionEstimator
Used for feature reidentification between current and previous features.
method
method
get(self) -> RawFeatureTrackerConfig: RawFeatureTrackerConfig
Retrieve configuration data for FeatureTracker.

Returns:
    config for feature tracking algorithm
method
set(self, config: RawFeatureTrackerConfig) -> FeatureTrackerConfig: FeatureTrackerConfig
Set explicit configuration.

Parameter ``config``:
    Explicit configuration
method
method
method
setHwMotionEstimation(self) -> FeatureTrackerConfig: FeatureTrackerConfig
Set hardware accelerated motion estimation using block matching. Faster than
optical flow (software implementation) but might not be as accurate.
method
method
setNumTargetFeatures(self, numTargetFeatures: int) -> FeatureTrackerConfig: FeatureTrackerConfig
Set number of target features to detect.

Parameter ``numTargetFeatures``:
    Number of features
method
class

depthai.FeatureTrackerConfig.CornerDetector

class
Thresholds
Threshold settings structure for corner detector.
class
Type
Members:
method
property
cellGridDimension
Ensures distributed feature detection across the image. Image is divided into horizontal and vertical cells, each cell has a target feature count = numTargetFeatures / cellGridDimension. Each cell has its own feature threshold...
method
property
enableSobel
Enable 3x3 Sobel operator to smoothen the image whose gradient is to be computed. If disabled, a simple 1D row/column differentiator is used for gradient.
method
property
enableSorting
Enable sorting detected features based on their score or not.
method
property
numMaxFeatures
Hard limit for the maximum number of features that can be detected. 0 means auto, will be set to the maximum value based on memory constraints.
method
property
numTargetFeatures
Target number of features to detect. Maximum number of features is determined at runtime based on algorithm type.
method
property
thresholds
Threshold settings. These are advanced settings, suitable for debugging/special cases.
method
property
type
Corner detector algorithm type.
method
class

depthai.FeatureTrackerConfig.CornerDetector.Thresholds

method
property
decreaseFactor
When detected number of features exceeds the maximum in a cell threshold is lowered by multiplying its value with this factor.
method
property
increaseFactor
When detected number of features doesn't exceed the maximum in a cell, threshold is increased by multiplying its value with this factor.
method
property
initialValue
Minimum strength of a feature which will be detected. 0 means automatic threshold update. Recommended so the tracker can adapt to different scenes/textures. Each cell has its own threshold. Empirical value.
method
property
max
Maximum limit for threshold. Applicable when automatic threshold update is enabled. 0 means auto. Empirical value.
method
property
min
Minimum limit for threshold. Applicable when automatic threshold update is enabled. 0 means auto, 6000000 for HARRIS, 1200 for SHI_THOMASI. Empirical value.
method
class

depthai.FeatureTrackerConfig.FeatureMaintainer

method
property
enable
Enable feature maintaining or not.
method
property
lostFeatureErrorThreshold
Optical flow measures the tracking error for every feature. If the point can’t be tracked or it’s out of the image it will set this error to a maximum value. This threshold defines the level where the tracking accuracy is considered too bad to keep the point.
method
property
minimumDistanceBetweenFeatures
Used to filter out detected feature points that are too close. Requires sorting enabled in detector. Unit of measurement is squared euclidean distance in pixels.
method
property
trackedFeatureThreshold
Once a feature was detected and we started tracking it, we need to update its Harris score on each image. This is needed because a feature point can disappear, or it can become too weak to be tracked. ...
method
class

depthai.FeatureTrackerConfig.MotionEstimator

class
OpticalFlow
Optical flow configuration structure.
class
Type
Members:
method
property
enable
Enable motion estimation or not.
method
property
opticalFlow
Optical flow configuration. Takes effect only if MotionEstimator algorithm type set to LUCAS_KANADE_OPTICAL_FLOW.
method
property
type
Motion estimator algorithm type.
method
class

depthai.FeatureTrackerConfig.MotionEstimator.OpticalFlow

method
property
epsilon
Feature tracking termination criteria. Optical flow will refine the feature position on each pyramid level until the displacement between two refinements is smaller than this value. Decreasing this number increases runtime.
method
property
maxIterations
Feature tracking termination criteria. Optical flow will refine the feature position maximum this many times on each pyramid level. If the Epsilon criteria described in the previous chapter is not met after this number of iterations, the algorithm will continue with the current calculated value...
method
property
pyramidLevels
Number of pyramid levels, only for optical flow. AUTO means it's decided based on input resolution: 3 if image width <= 640, else 4. Valid values are either 3/4 for VGA, 4 for 720p and above.
method
property
searchWindowHeight
Image patch height used to track features. Must be an odd number, maximum 9. N means the algorithm will be able to track motion at most (N-1)/2 pixels in a direction per pyramid level. Increasing this number increases runtime...
method
property
searchWindowWidth
Image patch width used to track features. Must be an odd number, maximum 9. N means the algorithm will be able to track motion at most (N-1)/2 pixels in a direction per pyramid level. Increasing this number increases runtime...
method

Need assistance?

Head over to Discussion Forum for technical support or any other questions you might have.