update 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
(bool, Rect) update(Mat img) {
return cvRunArena<(bool, Rect)>((arena) {
final bBox = calloc<cvg.Rect>();
final p = arena<ffi.Bool>();
cvRun(() => cffi.TrackerMIL_Update(ref, img.ref, bBox, p));
return (p.value, Rect.fromPointer(bBox));
});
}