2014-11-08 13:19:31 -0600 | asked a question | face detection not detecting any faces Hi, I'm trying to get face detection to work with python and openCV on a raspberry pi for a school project. Unfortunately, I can't get my script to work. It opens the camera correctly, but it never detects faces on it. I've tried feeding it (higher-quality) images that contained faces from google, but it didn't seem to be able to detect any faces on that one either. The script also seems to be way to fast to be actually looking for faces too, but I tried executing it line by line in the command line and it doesn't seem to error anyware and untill the face detection occurs, none of the variables are nulltypes. Here's my script: [code] print "Loading..." import cv2 import sys import cv2.cv as cv faceCascade = cv2.CascadeClassifier('face.xml') video_capture = cv2.VideoCapture(0) video_capture.set(3, 1280.) video_capture.set(4, 720.) while True: # Capture frame-by-frame print "Taking picture..." ret, frame = video_capture.read() When everything is done, release the capturevideo_capture.release() cv2.destroyAllWindows() [/code] Does anyone see anything wrong with it? |