导航

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

    n2zb

    @n2zb

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

    n2zb 关注

    n2zb 发布的帖子

    • RE: 识别车道线杂线太多求助

      第十六行这个100,100,0,0,0,0是什么意思

      发布在 OpenMV Cam
      N
      n2zb
    • RE: 识别车道线杂线太多求助

      能不能像巡线小车例程那样用线性回归返回直线
      不过却需要返回多条line对象
      我们需要两条直线对象计算偏转角度

      mport sensor, image, time, math
      
      min_degree = 0
      max_degree = 179
      theta_1=0
      theta_2=0
      i=0.00001
      j=0.00001
      THRESHOLD = (0,70)
      # 导入 image
      
      img = image.Image("F_example1.bmp", copy_to_fb=True).binary([THRESHOLD],invert=True)
      
      
      # 添加画线的代码
      for l in img.get_regression([(100,100,0,0,0,0)], robust = True):
      
             if (min_degree <= l.theta()) and (l.theta() <= max_degree):
                 img.draw_line(l.line(), color = (255, 0, 0))
                 if l.theta()<=90 :
                     theta_1=theta_1+l.theta()
                     i=i+1
                 else:
                     theta_2=theta_2+l.theta()
                     j=j+1
      lamb=math.atan((math.tan((theta_1/i/180)*math.pi)+math.tan((theta_2/j/180)*math.pi))/2)
      lamb=lamb/math.pi*180
      print(lamb)
      
      sensor.flush()
      
      
      ![0_1573915063037_Fexample1.bmp](正在上传 100%) 
      
      time.sleep(100)
      ![0_1573915001606_求助.bmp](正在上传 100%) 
      

      0_1573915127647_Fexample1.jpg 0_1573915172792_遇到的问题.png

      发布在 OpenMV Cam
      N
      n2zb
    • 识别车道线杂线太多求助

      0_1573911855798_微信图片_20191116214219.jpg

      发布在 OpenMV Cam
      N
      n2zb