Skip to content

TrackerVit

Motion and trackingclassOpenCV 5.0.0
import { TrackerVit } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSTrackerVit
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits Tracker.

the VIT tracker is a super lightweight dnn-based general object tracking.

VIT tracker is much faster and extremely lightweight due to special model structure, the model file is about 767KB. Model download link: https://github.com/opencv/opencv_zoo/tree/main/models/object_tracking_vittrack Author: PengyuLiu, 1872918507qq:.com

Constructors and members

static create

TrackerVit.create: Constructor

create(parameters: TrackerVit_Params): TrackerVit | null;
2 available overloads
create(): TrackerVit | null;
create(parameters: TrackerVit_Params): TrackerVit | null;
parameters

vit tracker parameters TrackerVit::Params

Returns

The TrackerVit | null result.

static create1

TrackerVit.create1: Constructor

create1(model: dnn_Net, meanvalue: Scalar, stdvalue: Scalar, tracking_score_threshold: number): TrackerVit | null;
4 available overloads
create1(model: dnn_Net): TrackerVit | null;
create1(model: dnn_Net, meanvalue: Scalar): TrackerVit | null;
create1(model: dnn_Net, meanvalue: Scalar, stdvalue: Scalar): TrackerVit | null;
create1(model: dnn_Net, meanvalue: Scalar, stdvalue: Scalar, tracking_score_threshold: number): TrackerVit | null;
model

pre-loaded DNN model

meanvalue

mean value for image preprocessing

stdvalue

std value for image preprocessing

tracking_score_threshold

threshold for tracking score

Returns

The TrackerVit | null result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.