• 免费好用的星瞳AI云服务上线!简单标注,云端训练,支持OpenMV H7和OpenMV H7 Plus。可以替代edge impulse。 https://forum.singtown.com/topic/9519
  • 我们只解决官方正版的OpenMV的问题(STM32),其他的分支有很多兼容问题,我们无法解决。
  • 如果有产品硬件故障问题,比如无法开机,论坛很难解决。可以直接找售后维修
  • 发帖子之前,请确认看过所有的视频教程,https://singtown.com/learn/ 和所有的上手教程http://book.openmv.cc/
  • 每一个新的提问,单独发一个新帖子
  • 帖子需要目的,你要做什么?
  • 如果涉及代码,需要报错提示全部代码文本,请注意不要贴代码图片
  • 必看:玩转星瞳论坛了解一下图片上传,代码格式等问题。
  • 运行报错 。硬件设备openmv3 cam7.固件4.02



    • # Find Line Segments Example
      #
      # This example shows off how to find line segments in the image. For each line object
      # found in the image a line object is returned which includes the line's rotation.
      
      # find_line_segments() finds finite length lines (but is slow).
      # Use find_line_segments() to find non-infinite lines (and is fast).
      
      enable_lens_corr = False # turn on for straighter lines...
      
      import sensor, image, time
      
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565) # grayscale is faster
      sensor.set_framesize(sensor.QQVGA)
      sensor.skip_frames(time = 2000)
      clock = time.clock()
      
      # All lines also have `x1()`, `y1()`, `x2()`, and `y2()` methods to get their end-points
      # and a `line()` method to get all the above as one 4 value tuple for `draw_line()`.
      
      while(True):
          clock.tick()
          img = sensor.snapshot()
          if enable_lens_corr: img.lens_corr(1.8) # for 2.8mm lens...
      
          # `merge_distance` controls the merging of nearby lines. At 0 (the default), no
          # merging is done. At 1, any line 1 pixel away from another is merged... and so
          # on as you increase this value. You may wish to merge lines as line segment
          # detection produces a lot of line segment results.
      
          # `max_theta_diff` controls the maximum amount of rotation difference between
          # any two lines about to be merged. The default setting allows for 15 degrees.
      
          for l in img.find_line_segments(merge_distance = 0, max_theta_diff = 5):
              img.draw_line(l.line(), color = (255, 0, 0))
              # print(l)
      
          print("FPS %f" % clock.fps())
      ![0_1625494858820_无标题.png](https://fcdn.singtown.com/e258a9ff-3637-4137-985d-e2374b07b7aa.png) 
      

      0_1625494874081_无标题.png



    • 这个算法占用内存比较大,OpenMV3上只能用QQQVGA