Reason for Checkerboard Corner Detection to Fail
이전 댓글 표시
I am using MATLAB R2014b to calibrate a stereo setup. I have 150 images of my checkerboard at various angles and distances. While using the Camera Calibrator app, I noticed that only 21 images were used for calibration, while the others were rejected. This is because detectCheckerboardPoints function is not able to detect the corner points in the remaining 129 images. Though the board is symmetric, the points have been detected properly in those 21 images (instead of 5X5, 5X4 points were detected, which isn't a problem for me)

This is the code used:
I1 = imread('T100009_141.jpg');
imshow(I1);
[imagePoints, boardSize] = detectCheckerboardPoints(I1);
figure;
imshow(I1, 'InitialMagnification', 50);
hold on;
plot(imagePoints(:, 1, 1, 1),imagePoints(:, 2, 1, 1), '*-g');
title('Successful Checkerboard Detection')
To improve the reconstruction algorithm, I want more images to be used in Calibration. Why aren't the corners detected in all these images, though they don't appear to have a lot of tilt?
This is the error message:
Index exceeds matrix dimensions.
Error in CheckerCornerDetection (line 7)
plot(imagePoints(:, 1, 1, 1), imagePoints(:, 2, 1, 1), '*-g');
I have attached a couple of images for your reference. Corner Points were detected in: PointsDetected(a).jpg and PointsDetected(b).jpg while the same function failed to detect checkerboard corner points in PointsNotDetected.jpg and PointsNotDetected(b).jpg.
Please help me figure out why it's not detected, though the image seems alright. What could the possible reasons be?
채택된 답변
추가 답변 (1개)
I have had this problem too. I have noticed that the "corner gap" problem is actually exaggerated with IR light illumination. From the few data sheets I've looked at, IR light often raises the minimum spatial frequency that can be captured by a CCD array (check the modulation transfer function / optical transfer function), though I'm not sure if this is a related issue. It might be how your camera adjusts for brightness and saturation as well. Even without IR illumination, I would say the detectCheckerboardPoints function works ~15% of the time in my hands (2 different cameras, a logitec C150 webcam and a Canon EOS DSLR), which sounds a lot like your 21/129. I think it might be a weakness of the detectCheckerboardPoints function to depend on the (generally finicky) handful of pixels that make up the intersection points while ignoring the other info available from the checkerboard, but this is necessary when the optical distortion of the image is unknown. However... it would be nice if there were a more robust checkerboard detection function for undistorted (calibrated camera) images!
댓글 수: 5
Dima Lisin
2015년 1월 22일
Hi Brian,
If you absolutely need to detect the corners despite the gap, you can edit the detectCheckerboardPoints.m file, and increase the value of sigma on line 452 in function detectCheckerboadInOneImage.
I am confused, however. I assumed the "corner gaps" indicated a badly printed checkerboard pattern. If there is a visible gap between the corners, doesn't that mean that the single corner point cannot be reliably detected?
Meghana Dinesh
2015년 1월 23일
편집: Meghana Dinesh
2015년 1월 23일
Dima Lisin
2015년 1월 23일
The only disadvantage is that with larger sigma you may not be able to detect checkerboards with small squares. The value of 2 seems to be a reasonable compromise.
Meghana Dinesh
2015년 1월 27일
Kukhokuhle Tsengwa
2022년 3월 16일
Jesus! This was the problem I was having. Fixed it by setting the 'HighDistortion' parameter to true in the detectCheckerboardPoints() function.
카테고리
도움말 센터 및 File Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!