findChessboardCornersAsync function

Future<(bool, Mat)> findChessboardCornersAsync(
  1. InputArray image,
  2. (int, int) patternSize, {
  3. int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE,
})

Implementation

Future<(bool success, Mat corners)> findChessboardCornersAsync(
  InputArray image,
  (int, int) patternSize, {
  int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE,
}) async =>
    cvRunAsync2(
      (callback) => ccalib3d.findChessboardCorners_Async(
        image.ref,
        patternSize.cvd.ref,
        flags,
        callback,
      ),
      (c, p, p1) {
        final rval = p.cast<ffi.Bool>().value;
        calloc.free(p);
        final corners = Mat.fromPointer(p1.cast());
        return c.complete((rval, corners));
      },
    );