pointPolygonTestAsync function

Future<double> pointPolygonTestAsync(
  1. VecPoint points,
  2. Point2f pt,
  3. bool measureDist
)

PointPolygonTest performs a point-in-contour test.

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

Implementation

Future<double> pointPolygonTestAsync(VecPoint points, Point2f pt, bool measureDist) async {
  final p = calloc<ffi.Double>();
  return cvRunAsync0(
    (callback) => cimgproc.cv_pointPolygonTest(points.ref, pt.ref, measureDist, p, callback),
    (c) {
      final rval = p.value;
      calloc.free(p);
      return c.complete(rval);
    },
  );
}