属性错误:图像实例没有属性' detectFaces'

时间:2015-07-27 06:32:18

标签: python raspberry-pi

from imgproc import *

cam = Camera(160, 120)
view = Viewer(cam.width, cam.height, "Face detection")

while True:
    image = cam.grabImage()

    faces = image.detectFaces()

    for face in faces:
        # extract the x, y, width and height from the tuple
        x, y, width, height = face

        # use this information to draw an orange rectangle around the face
        image.drawRect(x, y, width, height, 128, 0, 255)

    view.displayImage(image)

0 个答案:

没有答案