导航

    • 登录
    • 搜索
    • 版块
    • 产品
    • 教程
    • 论坛
    • 淘宝
    1. 主页
    2. cmqg
    3. 帖子
    C
    • 举报资料
    • 资料
    • 关注
    • 粉丝
    • 屏蔽
    • 帖子
    • 楼层
    • 最佳
    • 群组

    cmqg 创建的帖子

    • C

      如果OPENMV没检测到目标图像,让它通过串口发送固定数据,应该怎么写
      OpenMV Cam • • cmqg

      2
      0
      赞同
      2
      楼层
      831
      浏览

      blobs = img.find_blobs(xxx) if not blobs: uart.write("not found\n")
    • C

      如何将已经用矩形圈出的区域设置为roi的范围,并在其中寻找圆形
      OpenMV Cam • • cmqg

      2
      0
      赞同
      2
      楼层
      901
      浏览

      import sensor, image, time sensor.reset() sensor.set_pixformat(sensor.RGB565) # 灰度更快(160x120 max on OpenMV-M7) sensor.set_framesize(sensor.QQVGA) sensor.skip_frames(time = 2000) clock = time.clock() while(True): clock.tick() img = sensor.snapshot() rects = img.find_rects(threshold = 30000) circles = [] for r in rects: circles += img.find_circles(roi=r.rect(), threshold = 3500) print(rects) print(circles) for r in rects: img.draw_rectangle(r.rect(), color = (255, 0, 0)) for c in circles: img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0)) print("FPS %f" % clock.fps())