legacy_Tracker
import { legacy_Tracker } from '@banou/opencv-wasm'Use after await initOpenCV(). See the initialization and named imports guide.
Native object: release it with using or delete(). Factories can return null; check before calling methods. Inherits Algorithm.
Tracker Base Class *********************************** Base abstract class for the long-term tracker:
Constructors and members
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;The this result.
init
Initialize the tracker with a known bounding box that surrounded the target
init(image: Mat, boundingBox: Rect2d): boolean;imageThe initial frame
boundingBoxThe initial bounding box
True if initialization went succesfully, false otherwise
update
Update the tracker, find the new most likely bounding box for the target
update(image: Mat): legacy_Tracker_updateResult;imageThe current frame
True means that target was located and false means that tracker cannot locate target in current frame. Note, that latter does not imply that tracker has failed, maybe target is indeed missing from the frame (say, out of sight) Scalar output parameters are returned as named fields in this object. 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.