contourAreaAsync function

Future<double> contourAreaAsync(
  1. VecPoint contour
)

ContourArea calculates a contour area.

For further details, please see: https:///docs.opencv.org/3.3.0/d3/dc0/group__imgproc__shape.html#ga2c759ed9f497d4a618048a2f56dc97f1

Implementation

Future<double> contourAreaAsync(VecPoint contour) async {
  final p = calloc<ffi.Double>();
  return cvRunAsync0(
    (callback) => cimgproc.cv_contourArea(contour.ref, p, callback),
    (c) {
      final rval = p.value;
      calloc.free(p);
      return c.complete(rval);
    },
  );
}