logo

AprilTag 标记追踪代码问题

2021-07-29 10:24
0
_1gvc

# AprilTags Example

#

# This example shows the power of the OpenMV Cam to detect April Tags

# on the OpenMV Cam M7. The M4 versions cannot detect April Tags.

import sensor, image, time, math

sensor.reset()

sensor.set_pixformat(sensor.RGB565)

sensor.set_framesize(sensor.QQVGA) # we run out of memory if the resolution is much bigger...

sensor.skip_frames(30)

sensor.set_auto_gain(False) # must turn this off to prevent image washout...

sensor.set_auto_whitebal(False) # must turn this off to prevent image washout...

clock = time.clock()

while(True):

clock.tick()

img = sensor.snapshot()

for tag in img.find_apriltags(): # defaults to TAG36H11 without "families".

img.draw_rectangle(tag.rect(), color = (255, 0, 0))

img.draw_cross(tag.cx(), tag.cy(), color = (0, 255, 0))

degress = 180 * tag.rotation() / math.pi

print(tag.id(),degress)

报错:

OSError:This function is unavailable on your OpenMV Cam

2021-07-29 11:48
I
网红小智智 星瞳科技

使用的硬件是什么?

2021-07-29 11:56
I
网红小智智 星瞳科技

固件版本是什么?

2021-07-29 14:35
0
_1gvc

@kidswong999 是OPENMV2

0
_1gvc

@kidswong999 我不知道啊555,我搜论坛,没有查看固件的方法

麻烦了

2021-07-29 14:47
0
_1gvc

@kidswong999 我升级固件了,现在是最新的版本,爱了爱了