The calibrator app says the patterns are "too similar" even if they are not
Show older comments
I am trying to calibrate some images with a checkerbard calibration and the (single) Camera Calibrator app, but the app claims the patterns are "too similar" even if they are not. I know that they aren't too smilar because I have a specular setting with another camera that works. Moreover, if you apply some sort of transformation to the images (sometimes flipping them upside down, sometimes mirroring them) the app works fine and calibrate.
The images can be downloaded from this repo. cam1 works fine. cam2 doesn't work. cam2Rotated works fine.
Does anyone have an idea of what is wrong with these images?
Thanks for your help!
Accepted Answer
More Answers (1)
Your cam2 images are of poor quality. Corner detection done in isolation fails pretty badly for some of them (see below). Did you visually inspect all 44 images to verify corner detection success by the app? Regardless, I think you need to improve the image collection quality, to make things easier on the calibrator app. I'm sure the designers have done what they can to make calibration robust to poor conditions, but it is both unnecessary and unwise to try to dependent on that.
load data
figure(1); procIt(I1)
figure(2); procIt(I2)
function procIt(I)
[imagePoints,boardSize] = detectCheckerboardPoints(I);
boardSize
Nraw=height(imagePoints)
cut = any(~isfinite(imagePoints),2);
imagePoints(cut,:)=[];
Nfiltered=height(imagePoints)
J = insertText(I,imagePoints,1:size(imagePoints,1));
J = insertMarker(J,imagePoints,'o','MarkerColor','red','Size',5);
imshow(J);
title(sprintf('Detected a %d x %d Checkerboard',boardSize));
end
12 Comments
Stefano
on 13 Dec 2025
Also, if you rotate the imaes by 180 degrees ... then it works, which proves it is not an image quality issue.
I don't see how it proves that...
I tried the calibration by removing the bad quality images where the corner are badly detected, but it still doesnt work.
Probably because the images you are left with are "too similar" as the warning message tells you.
In any case, the repo of images you gave us is unpruned. We don't know which images you discarded and therefore, we are left blind to the data you are actually using...
Stefano
on 13 Dec 2025
But it's not literally the images that the warning is about. It's the set of chequerboard corners that are extracted from those images that is raising the "too similar" warning. You haven't shown us the extracted corner data, but I have no reason to think the corner extraction algorithm is rotation invariant. In fact, the modified test below seems to refute that -- flipping the image leads to both a different detected board size and different numbers of detected corners.
You could upload both the pruned images and their detected corners so that they can be examined, but I think it would be a quicker path to a solution is just to take better images, under better conditions. For example, it makes no sense to me that you have the chequerboard behind a reflective glass sheet. You should put it in front of the glass, so that you don't have reflections from the glass, or even take the images in another room altogether with better lighting conditions.
load data
figure(1); procIt(I2)
figure(2); procIt(rot90(I2,2))
function procIt(I)
[imagePoints,boardSize] = detectCheckerboardPoints(I);
boardSize
Nraw=height(imagePoints)
cut = any(~isfinite(imagePoints),2);
imagePoints(cut,:)=[];
Nfiltered=height(imagePoints)
J = insertText(I,imagePoints,1:size(imagePoints,1));
J = insertMarker(J,imagePoints,'o','MarkerColor','red','Size',5);
imshow(J);
title(sprintf('Detected a %d x %d Checkerboard',boardSize));
end
Stefano
on 13 Dec 2025
Stefano
on 16 Dec 2025
Matt J
on 16 Dec 2025
as I have an air-glass-water interface and a large angle between the glass and the camera:
I think you've answered your own question, haven't you? Imaging through a water tank will have Snell refracation, and probably will not fit the calibration model (pinhole projection +radial distortion).
Stefano
on 16 Dec 2025
Stefano
on 16 Dec 2025
Matt J
on 16 Dec 2025
I wouldn't trust any of this. Did you look at any of the estimated parameters besides the principal point? What about the extrinsics? Do they make sense?
Stefano
on 16 Dec 2025
Categories
Find more on Camera Calibration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



