• 免费好用的星瞳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, image, time
      
      sensor.reset()
      sensor.set_contrast(3)
      sensor.set_gainceiling(16)
      sensor.set_framesize(sensor.QVGA)
      sensor.set_pixformat(sensor.RGB565)
      sensor.skip_frames(time = 2000)
      clock = time.clock()
      sensor.set_auto_gain(False, value=100)
      sensor.set_windowing((320, 240))
      
      
      def draw_keypoints(img, kpts):
          if kpts:
              print(kpts)
              img.draw_keypoints(kpts)
              img = sensor.snapshot()
              time.sleep_ms(1000)
      
      
      clock = time.clock()
      thresholds = (61, 255)
      
      
      while(True):
      
          clock.tick()
          kptsF = image.load_descriptor("kptsBF.orb")
          kptsC = image.load_descriptor("kptsBC.orb")
          img = sensor.snapshot()
          img.binary([(0, 100, 11, 127, -2, 30),(16, 57, -24, -12, -28, 3)])
          img.to_grayscale
          
          for blob in img.find_blobs([thresholds], pixels_threshold=50, merge=False):#10米处50cm大小约为13像素
              pixel = blob.pixels()
              kpts2 = img.find_keypoints(max_keypoints=150, threshold=1, normalized=True)
              if (pixel < 4900):#距离较远,图像不够清晰时
                  match = image.match_descriptor(kptsF, kpts2, threshold=85)
              elif (pixel > 4900):#距离较近,图像清晰时
                  match = image.match_descriptor(kptsC, kpts2, threshold=85)
                      
              if (match.count()>1):
                  print("matched:%d dt:%d  x:%d y:%d"%(match.count(), match.theta(),blob.w(), blob.h()))
      
      


    • 0_1615708946287_QQ图片20210314155947.png