I try script python+opencv with face detection, but don`t work, I try with other script to capture image from webcam Logitech and it is perfect.
But only I need print display “Detect” but my board does nothing.
The script is the following:
import numpy as np
cap = cv2.VideoCapture(-1)
if not cap.isOpened():
print "La camara NO OK"
print "La camara OK"
ret, img = cap.read()
cascade = cv2.CascadeClassifier("haarcascade_frontalface_alt2.xml")
rects = cascade.detectMultiScale(img, 1.3, 4, cv2.cv.CV_HAAR_SCALE_IMAGE, (20,20))
if not len(rects) == 0 :
In this folder I put haarcascade_frontalface_alt2.xml and in my windows with the IDLE Python works perfectly.
What’s wrong? any ideas??
Thank you MamenGil
what doesn't work? Do you have any log messages? do you come until "La camara OK"?
Retrieving data ...