Skip to content

legacy_MultiTracker

trackingclassOpenCV 5.0.0
import { legacy_MultiTracker } from '@banou/opencv-wasm'

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

ARGUMENTSConstructor or factory
CLASSlegacy_MultiTracker
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 Algorithm.

MultiTracker Class ---By Laksono Kurnianggoro---) *********************************** This class is used to track multiple objects using the specified tracker algorithm. The %MultiTracker is naive implementation of multiple object tracking. It process the tracked objects independently without any optimization accross the tracked objects.

Constructors and members

static new

legacy_MultiTracker.new: Constructor.

new(): legacy_MultiTracker;
Returns

The legacy_MultiTracker result.

static create

Returns a pointer to a new instance of MultiTracker

create(): legacy_MultiTracker | null;
Returns

The legacy_MultiTracker | 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.

add

Add a new object to be tracked.

add(newTracker: legacy_Tracker | null, image: Mat, boundingBox: Rect2d): boolean;
newTracker

tracking algorithm to be used

image

input image

boundingBox

a rectangle represents ROI of the tracked object

Returns

The boolean result.

update

Update the current tracking status.

update(image: Mat, boundingBox: Rect2dVector): boolean;
image

input image

boundingBox

Output destination, filled by the native operation. the tracking result, represent a list of ROIs of the tracked objects.

Returns

The boolean result.

getObjects

Returns a reference to a storage for the tracked objects, each object corresponds to one tracker algorithm

getObjects(): Rect2dVector;
Returns

The Rect2dVector result. Release returned native handles with using or delete(), including handles nested in results.

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.