导航

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

    kbl4

    @kbl4

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

    kbl4 关注

    kbl4 发布的帖子

    • RE: SD卡里图片是用openmv的VGA像素拍摄的,

      @kidswong999 0_1593414142688_1.jpg
      由于不能上传pgm格式图片,我把拓展名改成了jpg格式,麻烦一下您下载后把拓展名改回pgm格式,然后试一下。谢谢!

      发布在 OpenMV Cam
      K
      kbl4
    • SD卡里图片是用openmv的VGA像素拍摄的,

      代码就是检测到有人,就把视线内的所有人脸与SD卡里的人脸对比,SD卡里图片是用openmv的VGA像素拍摄的,有90多KB。一读取就内存报错MemoryError: Out of normal MicroPython Heap Memory!。代码和要比对的图片如下:

      # Face recognition with LBP descriptors.
      # See Timo Ahonen's "Face Recognition with Local Binary Patterns".
      #
      # Before running the example:
      # 1) Download the AT&T faces database http://www.cl.cam.ac.uk/Research/DTG/attarchive/pub/data/att_faces.zip
      # 2) Exract and copy the orl_faces directory to the SD card root.
      
      
      import sensor, time, image, pyb
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.GRAYSCALE
      sensor.set_framesize(sensor.VGA) # or sensor.QQVGA (or others)
      sensor.skip_frames(10) # Let new settings take affect.
      sensor.skip_frames(time = 5000) #等待5s
      i = 1
      # 拍摄当前人脸。
      face_cascade = image.HaarCascade("frontalface", stages=25)
      while(True):
          img = sensor.snapshot()
          #img = image.Image("singtown/%s/1.pgm"%(SUB))
          objects = img.find_features(face_cascade, threshold=0.75, scale=1.35)
          if not objects :
              print("no people")
              continue
          for face in objects:
              d0 = img.find_lbp(face)
              img = image.Image("%d.pgm"%i)
              d1 = img.find_lbp((0, 0, img.width(), img.height()))
              dist = image.match_descriptor(d0, d1)#计算d0 d1即样本图像与被检测人脸的特征差异度。
              if dist >28000:
                  print("people is not match")
              else:
                  print("There's a match here ")
      
      
      发布在 OpenMV Cam
      K
      kbl4
    • 请问用openmv4plus,如何把外部ram分配用来存储程序里的变量?

      请问openmv4plus,外部ram只能用来做帧数据缓冲区吗?可以分配用来存储程序里的变量吗?读取SD卡文件300多KB文件就报内存溢出。

      发布在 OpenMV Cam
      K
      kbl4
    • 请问openmv4 H7plus如何调用外部ram?

      请问openmv4 H7plus如何调用外部ram? 还是固件里已经分配好了,之前买的openmv4报错内存不够,后来买了openmv4plus还是运行到同一行代码就内存报错。

      发布在 OpenMV Cam
      K
      kbl4