필터 지우기
필터 지우기

Create calibration checkerboard using built-in function

조회 수: 4 (최근 30일)
James Heaton
James Heaton 2022년 2월 8일
답변: Image Analyst 2022년 2월 8일
Hi, I am attempting to perform LiDAR-Camera calibration and I am following the procedures to create a checkerboard here - https://www.mathworks.com/help/lidar/ug/lidar-camera-calibration-guidelines-and-procedure.html
In this page, it says that the checkerboard needs to have an even number of squares on one side, and have an odd number of squares on the other, and that we should use the built-in function checkerboard() to create this.
However, this function does not appear to be able to produce ceckerboard patterns with an odd number of squares on one side. Since the arguments to the function need to be an integer, and the arguments determine the number of tiles in the board, which contain 2 squares per tile. Therefore, it is impossible to create an odd-sided checkerboard since odd * even is always even. I am happy to use another program to create a checkerboard, I am just confused why on the guidelines it says to use this function when it is impossible to use this function to create the desired checkerboard.

답변 (2개)

Jan
Jan 2022년 2월 8일
편집: Jan 2022년 2월 8일
nX = 5; % Number of columns
nY = 4; % Number of rows
C = zeros(nY, nX);
C(1:2:nY, 1:2:nX) = 1;
C(2:2:nY, 2:2:nX) = 1;
imagesc(C)
I do not find, where the documentation mentions the checkerboard() function. But if the doucmentation contains a not working instruction, send an enhancement request to MathWorks. This works over the contact form.

Image Analyst
Image Analyst 2022년 2월 8일
You can just take half of the image checkerboard gives you. See how to create a 3by-5 board of squares:
% Create a checkerboard of 3 by 5 sets of 2x2 squares
grayImage = checkerboard(100, 3, 5);
subplot(2, 1, 1);
imshow(grayImage, []);
axis('on', 'image')
% Take half to get odd numbers of squares.
cb = grayImage(1:size(grayImage, 1)/2, 1:size(grayImage, 2)/2);
subplot(2, 1, 2);
imshow(cb, []);
axis('on', 'image')

카테고리

Help CenterFile Exchange에서 Labeling, Segmentation, and Detection에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by