Filter löschen
Filter löschen

Create calibration checkerboard using built-in function

4 Ansichten (letzte 30 Tage)
James Heaton
James Heaton am 8 Feb. 2022
Beantwortet: Image Analyst am 8 Feb. 2022
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.

Antworten (2)

Jan
Jan am 8 Feb. 2022
Bearbeitet: Jan am 8 Feb. 2022
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 am 8 Feb. 2022
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')

Kategorien

Mehr zu Labeling, Segmentation, and Detection finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by