系统迁移中,暂时无法访问,所有数据会迁移到新的网站。
OpenMV VSCode 扩展发布了,在插件市场直接搜索OpenMV就可以安装
如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修。
发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
每一个新的提问,单独发一个新帖子
帖子需要目的,你要做什么?
如果涉及代码,需要报错提示与全部代码文本,请注意不要贴代码图片
必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
请问怎样提高这段代码的识别准确性,现在识别不太稳定,会乱入其他类型
-
import sensor, image, time sensor.reset() sensor.set_pixformat(sensor.RGB565) # 灰度更快 sensor.set_framesize(sensor.QQVGA) sensor.skip_frames(time = 2000) clock = time.clock() sensor.set_auto_gain(False) # 颜色跟踪必须关闭自动增益 sensor.set_auto_whitebal(False) # 颜色跟踪必须关闭白平衡 threshold_B=[(0, 15, 0, 40, -80, -20)] #threshold_B=[(34, 58, -5, 46, -128, -14)] thresholds_R=[(30, 100, 15, 127, 15, 127)] while(True): clock.tick() img = sensor.snapshot().lens_corr(1.8) if img.find_blobs(threshold_B, pixels_threshold=100, area_threshold=100, merge=True): #找蓝色色块 if img.find_circles(threshold = 3500, x_margin = 10, y_margin = 10, r_margin = 10,r_min = 2, r_max = 100, r_step = 2):#圆形 for c in img.find_circles(threshold = 3500, x_margin = 10, y_margin = 10, r_margin = 10,r_min = 2, r_max = 100, r_step = 2): #img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0)) print("蓝色") else: print("蓝色假") if img.find_blobs(thresholds_R, pixels_threshold=100, area_threshold=100, merge=True): #找红色色块 if img.find_circles(threshold = 3500, x_margin = 10, y_margin = 10, r_margin = 10,r_min = 2, r_max = 100, r_step = 2):#圆形 for c in img.find_circles(threshold = 3500, x_margin = 10, y_margin = 10, r_margin = 10,r_min = 2, r_max = 100, r_step = 2): img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0)) print("红色假") else: print("红色") print("FPS %f" % clock.fps())
-
-
提高圆形识别的准确性
-
@iv2r 就是 想消抖 让它稳定点 有没有什么办法
-