Skip to content

findChessboardCorners returns false after upgrading from 4.8 to 4.12 #28028

@knr-keba

Description

@knr-keba

System Information

C++, OpenCV 4.12, Windows, Visual Studio 2022

Detailed description

I upgraded OpenCV 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.

Steps to reproduce

Mat img = imread("inputimage.jpg");
Size patternSize(13, 9);
vector<Point2f> 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
Image

expected result
Image

Code runs fine with 4.8, findChessboardCorners returns false with 4.12

When I resize the 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).

Seems to be related to #27885

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions