Resolution limitation for finding chessboard corners?

Hi there,

I’m struggling a bit with the function “findChessboardCorners()”.

The original image has size 2592x1944. With that it doesn’t find anychessboard corners.

But if I only resize the image to 1296x972, it works perfectly.

Got someone a idea why this could be?

Thanks a lot & best regards


this is the resized one. with that it works fine

If there is a size limit, I would expect it to far exceed the dimensions of your image. I also looked at the code and didn’t see anything that suggests a size limit (other than requiring a minimum image size of 3x3).

I will note that the images you shared aren’t the size you referenced. I don’t think this is a problem necessarily, but if you are actually running the code on different images, please share them. (Your text mentions a size of 2592x1944, but the larger images is 1920x1440 and the smaller is 1296x972)

I do notice a few things about the images you shared. First, the smaller image appears brighter. Maybe this happened during resizing? Maybe they aren’t really both from the same source image? The smaller image is brighter / has more contrast than the larger.

Having said that, the image histogram for the first (larger, darker) image looks pretty reasonable to me, so I don’t suspect that is the problem
image

The second thing is that the image looks fairly noisy / textured, especially in the white areas. Again, I wouldn’t necessarily think that would be enough to cause a problem with the chessboard detection, but maybe?

A few suggestions / what I would do:

  1. If I wanted to figure out why it was failing (and I usually do), I’d save some of the intermediate images in cv::findChessboardCorners() (like the threshold result, and again after dilation, and similar logging (images or text, or inspecting with a debugger) in icvGenerateQuads()) But that’s a lot of work and requires that you are able to build OpenCV from source.
  2. Try to get a better pattern. Use better lighting? Print it on a better substrate? Take a longer exposure (if I’m seeing image noise?)
  3. Use the interactive calibration sample program and move the chessboard (or camera) around / change the lighting / etc to see what works and what doesn’t.

I would also suggest you consider using the Charuco pattern as (I believe) it will side-step many of the problems I mentioned.

Good luck.

just to check… your pattern is 12 by 9, right?

I can’t replicate the issue either, not from resizing the given images to (2592, 1944). perhaps the algorithm doesn’t like the image to be blurry (in addition to the aforementioned noise).

the vignetting can definitely be an issue.