minEnclosingCircleAsync function

Future<(Point2f, double)> minEnclosingCircleAsync(
  1. VecPoint points
)

MinEnclosingCircle finds a circle of the minimum area enclosing the input 2D point set.

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

Implementation

Future<(Point2f center, double radius)> minEnclosingCircleAsync(VecPoint points) async =>
    cvRunAsync2((callback) => cimgproc.MinEnclosingCircle_Async(points.ref, callback), (completer, p, p1) {
      final radius = p1.cast<ffi.Float>().value;
      calloc.free(p1);
      completer.complete((Point2f.fromPointer(p.cast()), radius));
    });