导航

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

    lg1h

    @lg1h

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

    lg1h 关注

    lg1h 发布的帖子

    • 想请教关于人脸识别 LBP子模式的代码

      想请教关于人脸识别 LBP子模式的代码,不知道在openmv上该怎么实现,因为运行例程里的LBP算法,感觉效果并不好,看论文有看到LBP子模式啊,金字塔方式的多尺度LBP啊之类的,想请教下各位大神该怎么做。

      发布在 OpenMV Cam
      L
      lg1h
    • 关于人脸检测矩形框不准或不显示的问题
      import sensor,image,time
      
      
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_contrast(1)
      sensor.set_gainceiling(16)
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.HQVGA) # or sensor.QQVGA (or others)
      sensor.skip_frames(time = 2000) # Let new settings take affect.
      
      # Load up a face detection HaarCascade. This is object that your OpenMV Cam
      # can use to detect faces using the find_features() method below. Your OpenMV
      # Cam has fontalface HaarCascade built-in. By default, all the stages of the
      # HaarCascade are loaded. However, You can adjust the number of stages to speed
      # up processing at the expense of accuracy. The frontalface HaarCascade has 25
      # stages.
      face_cascade = image.HaarCascade("frontalface", stages=25)
      print(face_cascade)
      while(True):
          img = sensor.snapshot()
              # Threshold can be between 0.0 and 1.0. A higher threshold results in a
              # higher detection rate with more false positives. The scale value
              # controls the matching scale allowing you to detect smaller faces.
          faces = img.find_features(face_cascade, threshold=0.75, scale_factor=1.35)
      
      
          for r in faces:
              img.draw_rectangle(r)
          
      

      尝试过更改stage,threshold和scale_factor,但无法像视频教程14那样持续且准确地框出人脸,stage偏大时无法显示矩形框,想请问是openmv自带模型的问题?摄像头的问题?计算机配置问题?还是其他问题?
      print(face_cascade)在串行终端显示为"width":24, "height":24, "n_stages":25, "n_features":2913, "n_rectangles":6383

      发布在 OpenMV Cam
      L
      lg1h
    • RE: snapshot时osError:failed to write requested bytes

      问题解决了,非常感谢!

      发布在 OpenMV Cam
      L
      lg1h
    • RE: snapshot时osError:failed to write requested bytes

      @kidswong999 谢谢指导!前面试了一下,把电脑关机后我先插了SD卡,然后开电脑,最后连硬件,但问题依然存在,请问我的顺序正确吗?

      发布在 OpenMV Cam
      L
      lg1h
    • RE: snapshot时osError:failed to write requested bytes
      import sensor, image, pyb
      
      RED_LED_PIN = 1
      BLUE_LED_PIN = 3
      
      sensor.reset() # Initialize the camera sensor.
      sensor.set_pixformat(sensor.GRAYSCALE)
      sensor.set_framesize(sensor.HQVGA) # or sensor.QQVGA (or others)
      sensor.skip_frames(time = 2000) # Let new settings take affect.
      
      # Load up a face detection HaarCascade. This is object that your OpenMV Cam
      # can use to detect faces using the find_features() method below. Your OpenMV
      # Cam has fontalface HaarCascade built-in. By default, all the stages of the
      # HaarCascade are loaded. However, You can adjust the number of stages to speed
      # up processing at the expense of accuracy. The frontalface HaarCascade has 25
      # stages.
      face_cascade = image.HaarCascade("frontalface", stages=25)
      
      while(True):
      
          pyb.LED(RED_LED_PIN).on()
          print("About to start detecting faces...")
          sensor.skip_frames(time = 2000) # Give the user time to get ready.
      
          pyb.LED(RED_LED_PIN).off()
          print("Now detecting faces!")
          pyb.LED(BLUE_LED_PIN).on()
      
          diff = 10 # We'll say we detected a face after 10 frames.
          while(diff):
              img = sensor.snapshot()
              # Threshold can be between 0.0 and 1.0. A higher threshold results in a
              # higher detection rate with more false positives. The scale value
              # controls the matching scale allowing you to detect smaller faces.
              faces = img.find_features(face_cascade, threshold=0.5, scale_factor=1.5)
      
              if faces:
                  diff -= 1
                  for r in faces:
                      img.draw_rectangle(r)
      
          pyb.LED(BLUE_LED_PIN).off()
          print("Face detected! Saving image...")
          sensor.snapshot().save("snapshot-%d.jpg" % pyb.rng()) # Save Pic.
      
      前面运行正常,能框出人脸,最后一步报错,报错内容见标题
      
      发布在 OpenMV Cam
      L
      lg1h
    • RE: snapshot时osError:failed to write requested bytes

      补充:代码为snapshot的例程

      发布在 OpenMV Cam
      L
      lg1h
    • snapshot时osError:failed to write requested bytes

      0_1538809874735_IMG_20181006_145934.png
      SD卡已插入。
      请问是什么原因造成的?

      发布在 OpenMV Cam
      L
      lg1h