How to make readAprilTag function recognize and process 36h9 tags?

조회 수: 7 (최근 30일)
Guan Dongdong
Guan Dongdong 2023년 6월 26일
댓글: Guan Dongdong 2023년 6월 26일
"How to extend the readAprilTag function in the Computer Vision Toolbox to recognize Tag36h9 tags, since it is not currently supported? Thank you!"

답변 (1개)

Gandham Heamanth
Gandham Heamanth 2023년 6월 26일
Yes you are right 'Tag36h9' cannot be used in readAprilTag function but alt. u can use detectAprilTag function as follows:
% Load the image
image = imread('path_to_image.jpg');
% Convert the image to grayscale
grayImage = rgb2gray(image);
% Define the AprilTag detector parameters
tagFamily = 'Tag36h9';
detectorParams = aprilTagDetectorParameters('TagFamily', tagFamily);
% Detect and decode AprilTags in the image
[tagIds, tagPoses] = detectAprilTag(detectorParams, grayImage);
% Display the detected tags
imshow(image);
for i = 1:numel(tagIds)
text(tagPoses(i).Centroid(1), tagPoses(i).Centroid(2), num2str(tagIds(i)), 'Color', 'r');
end
  댓글 수: 1
Guan Dongdong
Guan Dongdong 2023년 6월 26일
Dear answerer, thank you for your prompt reply. However, I tried your code in Matlab as instructed and received an error message saying that 'aprilTagDetectorParameters' is not recognized as a variable or function, and the same goes for 'detectAprilTag'. I am using Matlab 2022a, and I could not find any reference to 'aprilTagDetectorParameters' in the official documentation. Could you please let me know if this is a third-party compiled code or if my version is not compatible? Thank you.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by