导航

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

    dx1i

    @dx1i

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

    dx1i 关注

    dx1i 发布的帖子

    • 我要识别一个方块,但是背景是复杂变换的,特征点检测是不是不好用?

      import sensor, time, image,pyb
      led=pyb.LED(2)

      Reset sensor

      sensor.reset()

      Sensor settings

      sensor.set_contrast(3)
      sensor.set_gainceiling(16)
      sensor.set_framesize(sensor.QQVGA)
      sensor.set_windowing((160, 120))
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.skip_frames(time = 2000)
      sensor.set_auto_gain(False, value=100)
      kpts=["/0.orb","1.orb","2.orb","3.orb"]
      #kpts1 = image.load_descriptor("/desc.orb")

      clock = time.clock()
      while (True):
      clock.tick()
      img = sensor.snapshot()
      kpts2 = img.find_keypoints(max_keypoints=150, threshold=10, normalized=True)
      if (kpts2):
      for t in kpts:
      kpts=image.load_descriptor(t)
      match = image.match_descriptor(kpts, kpts2, threshold=85)
      if (match.count()>10):
      led.on()
      # 匹配度大于10
      img.draw_rectangle(match.rect())
      img.draw_cross(match.cx(), match.cy(), size=10)
      else:
      led.off()

              print(kpts2, "matched:%d dt:%d"%(match.count(), match.theta()))
             
      img.draw_string(0, 0, "FPS:%.2f"%(clock.fps()))
      发布在 OpenMV Cam
      D
      dx1i
    • RE: 这个是什么错误呢???

      这个是全部代码了,我只是想在矩形识别的基础上进行像素统计,进行颜色识别
      import sensor, image, time
      from pyb import UART
      import json
      sensor.reset()
      sensor.set_pixformat(sensor.RGB565) # grayscale is faster (160x120 max on OpenMV-M7)
      sensor.set_framesize(sensor.QQVGA)
      sensor.skip_frames(time = 2000)
      clock = time.clock()

      while(True):
      clock.tick()
      img = sensor.snapshot()

      # `threshold` below should be set to a high enough value to filter out noise
      # rectangles detected in the image which have low edge magnitudes. Rectangles
      # have larger edge magnitudes the larger and more contrasty they are...
      
      blos= img.find_rects(threshold = 12000)
      if blos:
        print('sum')
        for r in blos:
            area=(r.x(),r.y(),r.w(),r.h())
            img.draw_rectangle(r.rect(), color = (255, 0, 0))
            statistics=img.get_statistics(roi=area)
            for p in r.corners(): img.draw_circle(p[0], p[1], 5, color = (0, 255, 0))
            if 0<statistics.l_mode<127 and 0<statistics.a_mode<127 and 0<statistics.b_mode<127:
                print(r)
                uart.write('red')
      发布在 OpenMV Cam
      D
      dx1i
    • 这个是什么错误呢???

      TypeError: unsupported types for lt: 'int', 'bound_method'0_1566785846299_1.png

      发布在 OpenMV Cam
      D
      dx1i
    • openmv cam4 不可以用find_rects()这个函数吗?

      0_1565057679512_微信截图_20190806101425.png

      发布在 OpenMV Cam
      D
      dx1i
    • RE: 我想先识别颜色,然后进行特征点检测,但是颜色识别要关闭自增益和白平衡,那特征点检测又怎么调节自增益和白平衡呢?

      @kidswong999 那不会影响颜色识别得效果吗?

      发布在 OpenMV Cam
      D
      dx1i
    • 特征点检测怎么调用保存好的目标特征?

      特征点检测怎么调用保存好的目标特征?

      发布在 OpenMV Cam
      D
      dx1i
    • 我想先识别颜色,然后进行特征点检测,但是颜色识别要关闭自增益和白平衡,那特征点检测又怎么调节自增益和白平衡呢?

      颜色识别和特征点检测同时实现?

      发布在 OpenMV Cam
      D
      dx1i
    • 多模板匹配内存卡保存的模板数量有限制吗?最多可以保存多少个不同的模板?

      多模板匹配内存卡保存的模板数量有限制吗?最多可以保存多少个不同的模板?

      发布在 OpenMV Cam
      D
      dx1i