导航

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

    Mo Meak

    @Mo Meak

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

    Mo Meak 关注

    Mo Meak 发布的帖子

    • 人脸识别中对比的照片
      # 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.
      #AT&T faces库都是pgm后缀的图片,其他图片格式不支持,
      #该AT&T faces库已经在文件夹里面,把该库解压并命名为att_faces,也可以是其他的命名,下面的路径要根据你的命名一样。
      #待续
      import sensor, time, image
      
      SUB = "s1"
      NUM_SUBJECTS = 5
      NUM_SUBJECTS_IMGS = 10
      
      #img = image.Image("/att_faces/%s/zhuren.pgm"%(SUB)).mask_ellipse()
      img = image.Image("/att_faces/%s/1.pgm"%(SUB))# mask_ellipse()在API中并未找到,不用这个并不影响
      d0 = img.find_lbp((0, 0, img.width(), img.height())) #从感兴趣的区域提取LBP(本地二进制模式)关键点
      img = None #初始化
      
      print("")
      for s in range(1, NUM_SUBJECTS+1):
          dist = 0
          for i in range(2, NUM_SUBJECTS_IMGS+1):
      #        img = image.Image("/att_faces/s%d/%d.pgm"%(s, i)).mask_ellipse()
              img = image.Image("/att_faces/s%d/%d.pgm"%(s, i))
              d1 = img.find_lbp((0, 0, img.width(), img.height()))
              dist += image.match_descriptor(d0, d1)
      #对于LBP描述符,该函数返回一个表示整数的整数,两个描述符之间的差异。 然后你可以对此进行阈值/比较距离度量。
      #距离是衡量相似度的指标。该越接近0,LBP关键点匹配越好。
          print("Average dist for subject %d: %d"%(s, dist/NUM_SUBJECTS_IMGS))
      
      

      Open MV 例程里这个代码那一部分应该放对比的照片,那一部分放被对比的照片?求指教万分感谢

      发布在 OpenMV Cam
      M
      Mo Meak
    • RE: 人脸识别

      奥奥,是这样啊,那请问有没有摄像头识别人脸的源码

      发布在 OpenMV Cam
      M
      Mo Meak
    • 人脸识别
      请在这里粘贴代码# 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
      
      SUB = "s2"
      NUM_SUBJECTS = 5
      NUM_SUBJECTS_IMGS = 10
      
      #img = image.Image("/att_faces/%s/xx.bmp"%(SUB)).mask_ellipse()
      img = image.Image("/att_faces/%s/1.pgm"%(SUB))# mask_ellipse()在API中并未找到,不用这个并不影响
      d0 = img.find_lbp((0, 0, img.width(), img.height())) #从感兴趣的区域提取LBP(本地二进制模式)关键点
      img = None #初始化
      
      print("")
      for s in range(1, NUM_SUBJECTS+1):
          dist = 0
          for i in range(2, NUM_SUBJECTS_IMGS+1):
      #        img = image.Image("/att_faces/s%d/xx.bmp"%(s, i)).mask_ellipse()
              img = image.Image("/att_faces/s%d/%d.pgm"%(s, i))
              d1 = img.find_lbp((0, 0, img.width(), img.height()))
              dist += image.match_descriptor(d0, d1)
      #对于LBP描述符,该函数返回一个表示整数的整数,两个描述符之间的差异。 然后你可以对此进行阈值/比较距离度量。
      #距离是衡量相似度的指标。该越接近0,LBP关键点匹配越好。
          print("Average dist for subject %d: %d"%(s, dist/NUM_SUBJECTS_IMGS))
      
      

      为什么运行时摄像头闪一下白光,就没反应了?求指教

      发布在 OpenMV Cam
      M
      Mo Meak
    • RE: 人脸识别,求指教

      @kidswong999 在 人脸识别,求指教 中说:

      orl_faces
      0_1526884934600_b6d67a57-b71f-41f7-8e0e-50ae432615e8-image.png

      是这个文件夹吗 ?

      发布在 OpenMV Cam
      M
      Mo Meak
    • RE: 人脸识别,求指教

      @kidswong999 import sensor, time, image

      SUB = "s2"
      NUM_SUBJECTS = 5
      NUM_SUBJECTS_IMGS = 10

      img = image.Image("orl_faces/%s/wx.jpg"%(SUB)).mask_ellipse()
      d0 = img.find_lbp((0, 0, img.width(), img.height()))
      img = None

      print("")
      for s in range(1, NUM_SUBJECTS+1):
      dist = 0
      for i in range(2, NUM_SUBJECTS_IMGS+1):
      img = image.Image("orl_faces/s%d/%d.pgm"%(s, i)).mask_ellipse()
      d1 = img.find_lbp((0, 0, img.width(), img.height()))
      dist += image.match_descriptor(d0, d1)
      print("Average dist for subject %d: %d"%(s, dist/NUM_SUBJECTS_IMGS))
      这是完整的代码

      0_1526872786254_490385cf-f921-4777-8fc3-4aef96a5590c-image.png

      发布在 OpenMV Cam
      M
      Mo Meak
    • RE: openmv 怎么读取jpg图片 处理并显示在Framebuffer,我找到image.Image()但是不会使用

      @驻扎 请问下 你解决这个问题了吗

      发布在 OpenMV Cam
      M
      Mo Meak
    • 人脸识别,求指教

      SUB = "s2"
      NUM_SUBJECTS = 5
      NUM_SUBJECTS_IMGS = 10

      img = image.Image("I/wx.pgm"%(SUB)).mask_ellipse()
      d0 = img.find_lbp((0, 0, img.width(), img.height()))
      img = None

      print("")
      for s in range(1, NUM_SUBJECTS+1):
      dist = 0
      for i in range(2, NUM_SUBJECTS_IMGS+1):
      img = image.Image("orl_faces/s%d/%d.pgm"%(s, i)).mask_ellipse()
      d1 = img.find_lbp((0, 0, img.width(), img.height()))
      dist += image.match_descriptor(d0, d1)
      print("Average dist for subject %d: %d"%(s, dist/NUM_SUBJECTS_IMGS))

      img = image.Image("I/wx.pgm"%(SUB)).mask_ellipse()
      img = image.Image("orl_faces/s%d/%d.pgm"%(s, i)).mask_ellipse()
      这两句代码我应该怎么改啊,老提示错误,求指教

      发布在 OpenMV Cam
      M
      Mo Meak
    • RE: 麻烦大佬帮我看一下,谢谢谢谢,急!!!

      @kidswong999 我把SD卡插在了MV上,img = image.Image("orl_faces/I/wx"%(SUB)).mask_ellipse()可是提示0_1526781608055_911f2ac1-503c-4aa5-86ba-4cc1388c4547-image.png 这样的错误,那我应该怎么改呢?麻烦提示一下

      发布在 OpenMV Cam
      M
      Mo Meak
    • 麻烦大佬帮我看一下,谢谢谢谢,急!!!

      import sensor, time, image
      SUB = "s2"
      NUM_SUBJECTS = 5
      NUM_SUBJECTS_IMGS = 10

      img = image.Image("orl_faces/%s/1.pgm"%(SUB)).mask_ellipse()
      d0 = img.find_lbp((0, 0, img.width(), img.height()))
      img = None

      print("")
      for s in range(1, NUM_SUBJECTS+1):
      dist = 0
      for i in range(2, NUM_SUBJECTS_IMGS+1):
      img = image.Image("orl_faces/s%d/%d.pgm"%(s, i)).mask_ellipse()
      d1 = img.find_lbp((0, 0, img.width(), img.height()))
      dist += image.match_descriptor(d0, d1)
      print("Average dist for subject %d: %d"%(s, dist/NUM_SUBJECTS_IMGS))

      img = image.Image("orl_faces/%s/1.pgm"%(SUB)).mask_ellipse()
      img = image.Image("orl_faces/s%d/%d.pgm"%(s, i)).mask_ellipse()
      我把上面这两句话改成下面这两句,运行时会出现错误,麻烦大佬告诉我哪里出了问题,谢谢。。。。
      img = image.Image("C:/Users/wx/Desktop/wx.pgm"%(SUB)).mask_ellipse()
      img = image.Image("C:/Users/wx/Desktop%d/%d.pgm"%(s, i)).mask_ellipse()

      发布在 OpenMV Cam
      M
      Mo Meak