drawContoursAsync function

Future<Mat> drawContoursAsync(
  1. InputOutputArray image,
  2. Contours contours,
  3. int contourIdx,
  4. Scalar color, {
  5. int thickness = 1,
  6. int lineType = LINE_8,
  7. InputArray? hierarchy,
  8. int maxLevel = 0x3f3f3f3f,
  9. Point? offset,
})

DrawContours draws contours outlines or filled contours.

For further details, please see: https:///docs.opencv.org/master/d6/d6e/group__imgproc__draw.html#ga746c0625f1781f1ffc9056259103edbc

Implementation

Future<Mat> drawContoursAsync(
  InputOutputArray image,
  Contours contours,
  int contourIdx,
  Scalar color, {
  int thickness = 1,
  int lineType = LINE_8,
  InputArray? hierarchy, // TODO: replace with vec
  int maxLevel = 0x3f3f3f3f,
  Point? offset,
}) async =>
    cvRunAsync0(
      (callback) => cffi.DrawContoursWithParams_Async(
        image.ref,
        contours.ref,
        contourIdx,
        color.ref,
        thickness,
        lineType,
        hierarchy?.ref ?? Mat.empty().ref,
        maxLevel,
        offset?.ref ?? Point(-1, -1).ref,
        callback,
      ),
      (c) => c.complete(image),
    );