导航

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

    15522110752

    @15522110752

    0
    声望
    1
    楼层
    445
    资料浏览
    0
    粉丝
    0
    关注
    注册时间 最后登录

    15522110752 关注

    15522110752 发布的帖子

    • 循迹程序,为什么画面里不显示教程里那个绿色的直线
      THRESHOLD =(0, 30, -10, 2, -6, 6) # Grayscale threshold for dark things...
      import sensor, image, time
      
      sensor.reset()
      #sensor.set_vflip(True)
      #sensor.set_hmirror(True)
      sensor.set_pixformat(sensor.RGB565)
      sensor.set_framesize(sensor.QQVGA) # 80x60 (4,800 pixels) - O(N^2) max = 2,3040,000.
      #sensor.set_windowing([0,20,80,40])
      sensor.skip_frames(time = 2000)     # WARNING: If you use QQVGA it may take seconds
      clock = time.clock()                # to process a frame sometimes.
      
      while(True):
          clock.tick()
          img = sensor.snapshot().binary([THRESHOLD])
          line = img.get_regression([(100,100,0,0,0,0)], robust = True)
          if (line):
              
              rho_err = abs(line.rho())-img.width()/2
              if line.theta()>90:
                  theta_err = line.theta()-180
              else:
                  theta_err = line.theta()
              img.draw_line(line.line(), color=(255,0,0))
              print(rho_err,line.magnitude(),rho_err)
      

      0_1556451477020_ques.jpg 循迹程序,为什么画面里不显示教程里那个绿色的直线

      发布在 OpenMV Cam
      1
      15522110752