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



    • 代码如下:
      ```
      import sensor, time, image

      Reset sensor

      sensor.reset()

      Sensor settings

      sensor.set_contrast(3)
      sensor.set_gainceiling(16)
      sensor.set_framesize(sensor.VGA)
      sensor.set_windowing((320, 240))
      sensor.set_pixformat(sensor.GRAYSCALE)

      sensor.skip_frames(time = 2000)
      sensor.set_auto_gain(False, value=100)
      sensor.set_brightness(-3)
      clock = time.clock()
      kernel_size = 1 # kernel width = (size2)+1, kernel height = (size2)+1
      kernel = [-1, -1, -1,
      -1, +9, -1,
      -1, -1, -1]
      def draw_keypoints(img, kpts):
      print(kpts)
      img.draw_keypoints(kpts)
      img = sensor.snapshot()
      time.sleep(1000)

      NOTE: uncomment to load a keypoints descriptor from file

      kpts1 = image.load_descriptor("/SWW_F.orb")
      kpts2 = image.load_descriptor("/SWW_R.orb")
      img = sensor.snapshot()
      img.morph(kernel_size, kernel)
      draw_keypoints(img, kpts1)

      clock = time.clock()
      while (True):
      clock.tick()
      img = sensor.snapshot()
      img.morph(kernel_size, kernel)
      if (kpts1 == None):
      # NOTE: By default find_keypoints returns multi-scale keypoints extracted from an image pyramid.
      kpts3 = img.find_keypoints(max_keypoints=150, threshold=10, scale_factor=1.2)
      draw_keypoints(img, kpts1)
      else:
      # NOTE: When extracting keypoints to match the first descriptor, we use normalized=True to extract
      # keypoints from the first scale only, which will match one of the scales in the first descriptor.
      kpts3 = img.find_keypoints(max_keypoints=150, threshold=10, normalized=True)
      if (kpts2):
      match1 = image.match_descriptor(kpts1, kpts3, threshold=85)
      match2 = image.match_descriptor(kpts2, kpts3, threshold=85)
      if (match1.count()>12):
      # If we have at least n "good matches"
      # Draw bounding rectangle and cross.
      img.draw_rectangle(match1.rect())
      img.draw_cross(match1.cx(), match1.cy(), size=10)
      if (match2.count()>12):
      # If we have at least n "good matches"
      # Draw bounding rectangle and cross.
      img.draw_rectangle(match2.rect())
      img.draw_cross(match2.cx(), match2.cy(), size=10)

              # NOTE: uncomment if you want to draw the keypoints
              #img.draw_keypoints(kpts2, size=KEYPOINTS_SIZE, matched=True)
      
      # Draw FPS
      img.draw_string(0, 0, "FPS:%.2f"%(clock.fps()))
      
      
      
      
      运行一段时间内识别正常,一段时间后于“match1 = image.match_descriptor(kpts1, kpts3, threshold=85)”这句提示错误Descriptors have different types!


    • 你好,我想请问一下你在前文定义的kernel是有什么作用吗?





    • @kidswong999 感觉你在卖队友哈哈哈



    • 应该是先利用img.morph对图像进行了卷积运算。