stitchAsync method

Future<(StitcherStatus, Mat)> stitchAsync(
  1. VecMat images, {
  2. VecMat? masks,
})

Implementation

Future<(StitcherStatus, Mat)> stitchAsync(
  VecMat images, {
  VecMat? masks,
}) async {
  return cvRunAsync2(
      (callback) => masks == null
          ? cstitching.Stitcher_Stitch_Async(
              ref,
              images.ref,
              callback,
            )
          : cstitching.Stitcher_Stitch_1_Async(
              ref,
              images.ref,
              masks.ref,
              callback,
            ), (c, status, pano) {
    final value = status.cast<ffi.Int>().value;
    calloc.free(status);
    return c.complete(
      (StitcherStatus.fromInt(value), Mat.fromPointer(pano.cast<cstitching.Mat>())),
    );
  });
}