approxPolyN2fAsync function

Future<VecPoint2f> approxPolyN2fAsync(
  1. VecPoint2f curve,
  2. int nsides, {
  3. double epsilon_percentage = -1.0,
  4. bool ensure_convex = true,
})

ApproxPolyN approximates a polygon with a convex hull with a specified accuracy and number of sides.

For further details, please see:

https://docs.opencv.org/4.x/d3/dc0/group__imgproc__shape.html#ga88981607a2d61b95074688aac55625cc

Implementation

Future<VecPoint2f> approxPolyN2fAsync(
  VecPoint2f curve,
  int nsides, {
  double epsilon_percentage = -1.0,
  bool ensure_convex = true,
}) async {
  final vec = VecPoint2f();
  return cvRunAsync0(
      (callback) =>
          cimgproc.cv_approxPolyN2f(curve.ref, nsides, epsilon_percentage, ensure_convex, vec.ptr, callback),
      (c) {
    return c.complete(vec);
  });
}