findChessboardCorners function

(bool, VecPoint2f) findChessboardCorners(
  1. InputArray image,
  2. (int, int) patternSize, {
  3. VecPoint2f? corners,
  4. int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE,
})

Implementation

(bool success, VecPoint2f corners) findChessboardCorners(
  InputArray image,
  (int, int) patternSize, {
  VecPoint2f? corners,
  int flags = CALIB_CB_ADAPTIVE_THRESH + CALIB_CB_NORMALIZE_IMAGE,
}) {
  corners ??= VecPoint2f();
  final r = calloc<ffi.Bool>();
  cvRun(
    () => ccalib3d.cv_findChessboardCorners(
      image.ref,
      patternSize.cvd.ref,
      corners!.ptr,
      flags,
      r,
      ffi.nullptr,
    ),
  );
  final rval = r.value;
  calloc.free(r);
  return (rval, corners);
}