Skip to content

gapi_ot_track

gapifunctionOpenCV 5.0.0
import { gapi_ot_track } from '@banou/opencv-wasm'

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

ARGUMENTSmat, detected_rects, detected_class_labels, delta
FUNCTIONgapi_ot_track
RETURN TYPEtuple_GArray_Rect_and_GArray_int_end__and_GArray_uint64_t_end__and_GArray_int
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Tracks objects with video frames. If a detected object is overlapped enough with one of tracked object, the tracked object's informationis updated with the input detected object. On the other hand, if a detected object is overlapped with none of tracked objects, the detected object is newly added and ObjectTracker starts to track the object. In zero term tracking type, ObjectTracker clears tracked objects in case that empty list of detected objects is passed in.

gapi_ot_track(mat: GMat, detected_rects: GArray_Rect, detected_class_labels: GArray_int, delta: number): tuple_GArray_Rect_and_GArray_int_end__and_GArray_uint64_t_end__and_GArray_int;
mat

Input frame.

detected_rects

Detected objects rectangles in the input frame.

detected_class_labels

Detected objects class labels in the input frame.

delta

Frame_delta_t Delta time between two consecutive tracking in seconds. The valid range is [0.005 ~ 0.5].

Returns

Tracking results of target objects. cv::GArraycv::Rect Array of rectangles for tracked objects. cv::GArray<int32_t> Array of detected objects labels. cv::GArray<uint64_t> Array of tracking IDs for objects. Numbering sequence starts from 1. The value 0 means the tracking ID of this object has not been assigned. cv::GArray<int> Array of tracking statuses for objects.

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.