OpenCV findChessboardCorners returns false after upgrading from 4.8 to 4.12 (same images, no code changes)
06:20 16 Sep 2025

I recently upgraded OpenCV in my C++ project from 4.8 to 4.12. After the upgrade, my unit tests for camera calibration started failing because findChessboardCorners(...) now consistently returns false on the exact same input images and parameters.

No code changes were made — only the OpenCV version was updated.

Minimal example:

Mat img = imread("chessboard.jpg");
Size patternSize(13, 9);
vector corners;
int flags = CV_CALIB_CB_ADAPTIVE_THRESH | CV_CALIB_CB_FAST_CHECK | CV_LIB_CB_NORMALIZE_IMAGE;

bool found = findChessboardCorners(img, patternSize, corners, flags);

drawChessboardCorners(img, patternSize, corners, found);
imshow("img", img);
waitKey();

input image:

input image

expected result:

expected result

With OpenCV 4.8 all corners are found and drawn correctly, with OpenCV 4.12 found is false.

Additional observation:

If I resize the same input image down to 266×200 pixels before calling findChessboardCorners, I get true again — but the detected corners are much less precise (and not usable for my use case).

My questions:

  • Were there breaking changes or stricter validation criteria introduced in findChessboardCorners between OpenCV 4.8 and 4.12?

  • Is there a way to get more diagnostic information (e.g. partial corner detections, error codes, or why detection failed)?

c++ opencv