How to make readAprilTag function recognize and process 36h9 tags?
7 次查看(过去 30 天)
显示 更早的评论
"How to extend the readAprilTag function in the Computer Vision Toolbox to recognize Tag36h9 tags, since it is not currently supported? Thank you!"
0 个评论
回答(1 个)
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
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!