findContoursAsync function
FindContours finds contours in a binary image.
For further details, please see: https://docs.opencv.org/4.x/d3/dc0/group__imgproc__shape.html#gadf1ad6a0b82947fa1fe3c3d497f260e0
Implementation
Future<(Contours contours, Mat hierarchy)> findContoursAsync(Mat src, int mode, int method) async =>
cvRunAsync2(
(callback) => cimgproc.FindContours_Async(src.ref, mode, method, callback),
(c, p, p1) =>
c.complete((Contours.fromPointer(p.cast<cimgproc.VecVecPoint>()), Mat.fromPointer(p1.cast<cimgproc.Mat>()))),
);