AttributeError: 'list' object has no attribute 'rect' 哪里不对呢?
-
while(True): clock.tick() img = sensor.snapshot() tag = img.find_apriltags(fx=f_x, fy=f_y, cx=c_x, cy=c_y) # 默认为TAG36H11 if tag: img.draw_rectangle(tag.rect(), color = (255, 0, 0)) img.draw_cross(tag.cx(), tag.cy(), color = (0, 255, 0)) else: .........
-
find_apriltags返回的是很多的tag
tags = img.find_apriltags(fx=f_x, fy=f_y, cx=c_x, cy=c_y)
for tag in tags:
print(tag.rect())