updateAsync method
Update the tracker, find the new most likely bounding box for the target. https://docs.opencv.org/4.x/d0/d0a/classcv_1_1Tracker.html#a92d2012f576e6c06eb2e257d110a6529
Implementation
Future<(bool, Rect)> updateAsync(Mat img) async {
final bBox = calloc<cvg.CvRect>();
final p = calloc<ffi.Bool>();
return cvRunAsync0(
(callback) => cvideo.cv_TrackerMIL_update(ref, img.ref, bBox, p, callback),
(c) {
final rval = (p.value, Rect.fromPointer(bBox));
calloc.free(p);
return c.complete(rval);
},
);
}