为什么openmv会把二维码识别成人脸??
-
把二维码和人脸检测代码结合了下,结果二维码被识别成人脸了??
-
你的代码是什么?我测试一下。
-
import sensor, image, time sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.RGB565) # use RGB565. sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed. sensor.skip_frames(10) # Let new settings take affect. sensor.set_auto_whitebal(False) # turn this off. clock = time.clock() # Tracks FPS. face_cascade = image.HaarCascade("frontalface", stages=25) while(True): clock.tick() # Track elapsed milliseconds between snapshots(). img = sensor.snapshot() # Take a picture and return the image. objects = sensor.snapshot().to_grayscale().find_features(face_cascade, threshold=0.75, scale=1.35) if objects: print("检测到人脸") for code in img.find_qrcodes(): message = code.payload() print(message) 麻烦看下
-
import sensor, image, time sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.RGB565) # use RGB565. sensor.set_framesize(sensor.QQVGA) # use QQVGA for speed. sensor.skip_frames(10) # Let new settings take affect. sensor.set_auto_whitebal(False) # turn this off. clock = time.clock() # Tracks FPS. face_cascade = image.HaarCascade("frontalface", stages=25) while(True): clock.tick() # Track elapsed milliseconds between snapshots(). img = sensor.snapshot() # Take a picture and return the image. objects = sensor.snapshot().to_grayscale().find_features(face_cascade, threshold=0.75, scale=1.35) if objects: print("检测到人脸") for code in img.find_qrcodes(): message = code.payload() print(message)
-
您好,代码已经在前一楼附上,可否快些回复我,谢谢
-
应该是误判了,haar有时候会误判。
-
@kidswong999 好吧,有什么办法补救吗