导航

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

    quy4 发布的帖子

    • RE: find_circles 函数 ,如何在历程中设置感光区域,上传电脑观看?

      0_1551252233272_TIM截图20190227152328.png

      发布在 OpenMV Cam
      Q
      quy4
    • RE: find_circles 函数 ,如何在历程中设置感光区域,上传电脑观看?

      @quy4 sensor.set_windowing(ROI) 这个函数设置的区域最大值好小好小,不能满足需求,

      发布在 OpenMV Cam
      Q
      quy4
    • find_circles 函数 ,如何在历程中设置感光区域,上传电脑观看?

      我在find_circles 函数中设置了roi区域,但是上传到电脑上的图像并没有改变,如何改变电脑上的图像区域?

      import sensor, image, time, pyb
      ROI=(13,0,120,120) 
      sensor.reset()
      sensor.set_pixformat(sensor.GRAYSCALE) # grayscale is faster
      sensor.set_framesize(sensor.QQVGA)
      sensor.set_windowing(ROI) 
      sensor.skip_frames(time = 2000)
      clock = time.clock()
      led = pyb.LED(1)
      
      while(True):
          clock.tick()
          led.on()
          img = sensor.snapshot().lens_corr(1.8)
          
      
          # Circle objects have four values: x, y, r (radius), and magnitude. The
          # magnitude is the strength of the detection of the circle. Higher is
          # better...
      
          # `threshold` controls how many circles are found. Increase its value
          # to decrease the number of circles detected...
      
          # `x_margin`, `y_margin`, and `r_margin` control the merging of similar
          # circles in the x, y, and r (radius) directions.
      
          # r_min, r_max, and r_step control what radiuses of circles are tested.
          # Shrinking the number of tested circle radiuses yields a big performance boost.
      
          for c in img.find_circles(roi=ROI,threshold = 1200, x_margin = 10, y_margin = 10, r_margin = 10,
                  r_min = 1, r_max = 5, r_step = 2):
             #img.draw_circle(c.x(), c.y(), c.r(), color = (255, 0, 0))
             print(c)
      
         #print("FPS %f" % clock.fps())
      
      
      发布在 OpenMV Cam
      Q
      quy4