如果一定要显示中文的话,可以保存字符为一个图片,然后draw_image画上去。
小智智
@kidswong999
64
声望
12302
楼层
16449
资料浏览
234
粉丝
1
关注
kidswong999 发布的帖子
-
RE: 今天打开openmv ide后,里面的工具栏全都不见了,该怎么才能再显示呢?
关掉OpenMV,IDE,删除 C:\Users\用户名\AppData\Roming下的OpenMV文件夹,再打开OpenMV IDE
-
RE: 请问vscode下载openmv插件,显示 无法解析导入“sensor”,怎么解决
这个是pylance提示的,也就是python插件提示的。可以把python插件禁用。
OpenMV插件会在右下角提示:
OpenMV 检测到已安装 Pylance 扩展,可以通过设置 "python.languageServer" 为 "None" 来解决。
-
RE: 用find_template识别物体并框选后,能否输出物体中心坐标信息
可以,计算一下就行。
返回的是x,y,w,h
cx = x + w/2
cy = y + h/2 -
RE: 运行的官方的例程代码,然后显示报错,查了一下手册说是要更新固件,但是已经是最高版本了,这个怎么处理呢?
使用下面的代码,因为接口更新了,我会尽快把文档和例子更新完。
# This work is licensed under the MIT license. # Copyright (c) 2013-2023 OpenMV LLC. All rights reserved. # https://github.com/openmv/openmv/blob/master/LICENSE # # 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 import time import math sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QQVGA) sensor.skip_frames(time=2000) 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() # Note! Unlike find_qrcodes the find_apriltags method does not need lens correction on the image to work. # Please use the TAG36H11 tag family for this script - it's the recommended tag family to use. while True: clock.tick() img = sensor.snapshot() for tag in img.find_apriltags(): img.draw_rectangle(tag.rect, color=(255, 0, 0)) img.draw_cross(tag.cx, tag.cy, color=(0, 255, 0)) print_args = (tag.name, tag.id, (180 * tag.rotation) / math.pi) print("Tag Family %s, Tag ID %d, rotation %f (degrees)" % print_args) print(clock.fps())