有没有办法识别特定ID的AprilTag?可以讲的详细点吗?
直接写一个if判断。
https://docs.singtown.com/micropython/zh/latest/openmvcam/library/omv.image.html#apriltag.id
谢谢,有点思路了,不懂再请教
@kidswong999
for tag in img.find_apriltags(fx=f_x, fy=f_y, cx=c_x, cy=c_y): # 默认为 TAG36H11
if tag.id() == 15:
img.draw_rectangle(tag.rect(), color = (255, 0, 0))
img.draw_cross(tag.cx(), tag.cy(), color = (0, 255, 0))
print_args = (tag.id(), tag.x_translation(), tag.y_translation(), tag.z_translation(), \
degrees(tag.x_rotation()), degrees(tag.y_rotation()), degrees(tag.z_rotation()))
print("ID: %f, Tx: %f, Ty: %f, Tz: %f, Rx: %f, Ry: %f, Rz: %f" % print_args)