Tracker
import { 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.
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.
getTrackingScore
Return tracking score
getTrackingScore(): number;The number result.
init
Initialize the tracker with a known bounding box that surrounded the target
init(image: Mat, boundingBox: Rect): void;imageThe initial frame
boundingBoxThe initial bounding box
update
Update the tracker, find the new most likely bounding box for the target
update(image: Mat): [boolean, Rect];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)
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.