vpi.KLTFeatureTracker.__call__

KLTFeatureTracker.__call__(img_reference: vpi.Image, *, num_iter_scaling: int = 20, ncc_threshold_update: float = 0.8, ncc_threshold_kill: float = 0.6, ncc_threshold_stop: float = 1.0, max_scale_change: float = 0.2, max_translation_change: float = 1.5, tracking_type: vpi.KLTType = vpi.KLTType.INVERSE_COMPOSITIONAL, update: Callable[[vpi.Array, vpi.Array, vpi.Array, vpi.Array], None] = vpi.KLTFeatureTracker.default_update, stream: vpi.Stream = None) vpi.Array

Runs a KLT Feature tracker on two images.

Hint

The Kanade-Lucas-Tomasi (KLT) feature tracker algorithm uses one template image and one reference image. The template image is provided automatically behind the scene by the KLT class.

See also

Refer to the algorithm explanation for more details and usage examples.

Parameters
  • img_reference (vpi.Image) – Reference image.

  • num_iter_scaling (int, optional) – Number of Inverse compositional iterations of scale estimations. See C API for details.

  • ncc_threshold_update (float, optional) – Threshold for requiring template update. See C API for details.

  • ncc_threshold_kill (float, optional) – Threshold to consider template tracking was lost. See C API for details.

  • ncc_threshold_stop (float, optional) – Threshold to stop estimating. See C API for details.

  • max_scale_change (float, optional) – Maximum relative scale change. See C API for details.

  • max_translation_change (float, optional) – Maximum relative translation change. See C API for details.

  • tracking_type (vpi.KLTType, optional) – KLT Feature Tracker algorithm type. See C API for details.

  • update (Callable[vpi.Array, vpi.Array, vpi.Array, vpi.Array], optional) – Update function to use. Check default_update as an example.

  • stream (vpi.Stream, optional) – The stream to be used by the algorithm.

Returns

The output bounding boxes (tracked).

Return type

vpi.Array

Caution

Restrictions to several arguments may apply. Check the C API references of the submit function and the group concepts for more details.