findChessboardCorners function

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

Implementation

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