updateAsync method

Future<(bool, Rect)> updateAsync(
  1. Mat img
)

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 => cvRunAsync2(
      (callback) => cvideo.TrackerMIL_Update_Async(ref, img.ref, callback),
      (completer, p, p1) {
        final rval = p.cast<ffi.Bool>().value;
        calloc.free(p);
        completer.complete((rval, Rect.fromPointer(p1.cast<cvideo.Rect>())));
      },
    );