Content deleted Content added
wlnk |
|||
(8 intermediate revisions by 7 users not shown) | |||
Line 1:
{{FeatureDetectionCompVisNavbox}}
==Chessboard camera calibration==
Line 86 ⟶ 84:
% Compute edge image
BW = edge(I, 'canny');
% Compute Hough transform
Line 94 ⟶ 92:
numpeaks = 19;
thresh = ceil(0.1 * max(H(:)));
P = houghpeaks(H, numpeaks, 'threshold', thresh);
% Extract image lines
lines = houghlines(BW, theta, rho, P, 'FillGap', 50, 'MinLength', 60);
% --------------------------------------------------------------------------
% Display results
% --------------------------------------------------------------------------
% Original image
figure; imshow(I);
Line 109 ⟶ 107:
% Hough transform
figure; image(theta, rho, imadjust(mat2gray(H)), 'CDataMapping', 'scaled');
hold on; colormap(gray(256));
plot(theta(P(:, 2)), rho(P(:, 1)), 'o', 'color', 'r');
% Detected lines
figure; imshow(I); hold on; n = size(I, 2);
for k = 1:length(lines)
% Overlay kth line
Line 120 ⟶ 118:
y = [lines(k).point1(2) lines(k).point2(2)];
line = @(z) ((y(2) - y(1)) / (x(2) - x(1))) * (z - x(1)) + y(1);
plot([1 n], line([1 n]), 'Color', 'r');
end
</syntaxhighlight>
==Limitations==
The main limitation of using chessboard patterns for geometric camera calibration is that due to their highly repetitive structure, they need to be completely visible in the camera image. This assumption may be violated e.g. when specular reflections due to inhomogenous lighting cause chessboard detection to fail in some of the corners. The measurement of camera distortions close to the image corners is also altered by the need of a completely visible chessboard target.
To solve this issue, chessboard targets can be combined with some position encoding. One popular way is to place ArUco markers<ref name=gerrido2014>S. Garrido-Jurado et al. "Automatic generation and detection of highly reliable fiducial markers under occlusion." Pattern Recognition, vol. 47(6), pp. 2280-2292. https://dl.acm.org/doi/abs/10.1016/J.PATCOG.2014.01.005. (2014).</ref> inside the lightchessboard squares. The main advantage of such ChArUco targets<ref name=opencv>OpenCV. https://docs.opencv.org/3.4/df/d4a/tutorial_charuco_detection.html.</ref> is that all light chessboard squares are uniquely coded and identifiable. This also allows to do single image multiplane calibration by placing multiple targets with different ArUco in one scene.
An alternative way for adding position encoding to chessboard patterns is the PuzzleBoard pattern:<ref name=stelldinger2024>P. Stelldinger, et al. "PuzzleBoard: A New Camera Calibration Pattern with Position Encoding." German Conference on Pattern Recognition. (2024). https://users.informatik.haw-hamburg.de/~stelldinger/pub/PuzzleBoard/. (2024).</ref> Each chessboard edge is given one bit of information such that local parts of the pattern show a unique bit pattern. In comparison to ChArUco patterns, the position encoding can be read at much lower resolutions.
[[File:PuzzleBoard8x11.jpg|thumb|center|500px|alt=An example of a PuzzleBoard pattern with 8x11 chessboard corners.|An example of a PuzzleBoard pattern with 8x11 chessboard corners. Each 3x3 tile pattern is unique.]]
==See also==
Line 144 ⟶ 151:
# Z. Weixing, et al. "A fast and accurate algorithm for chessboard corner detection." 2nd International Congress on Image and Signal Processing. (2009).
# A. De la Escalera and J. Armingol. "Automatic chessboard detection for intrinsic and extrinsic camera parameter calibration." Sensors. vol. 10(3), pp. 2027–2044 (2010).
# S. Bennett and [[Joan Lasenby|J. Lasenby]]. "ChESS - quick and robust detection of chess-board features." Computer Vision and Image Understanding. vol. 118, pp. 197–210 (2014).
# J. Ha. "Automatic detection of chessboard and its applications." Opt. Eng. vol. 48(6) (2009).
# F. Zhao, et al. "An automated x-corner detection algorithm (axda)." Journal of Software. vol. 6(5), pp. 791–797 (2011).
|