Open cronero95 opened 4 years ago
import cv2
face_cascade = cv2.CascadeClassifier('C:/Users/Atin/Desktop/haarcascade_frontalface_default.xml')
img = cv2.imread('C:/Users/Atin/Downloads/group.jpg')
gray_image = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
facce = face_cascade.detectMultiScale(img,5.5,4) print(facce)
for (x,y,w,h) in facce: cv2.rectangle(img,(x,y),(x+w,y+h),(0,255,0),4)
cv2.imshow('output img',img)
cv2.waitKey()
cv2.destroyAllWindows()
Hello, I am doing a simple test; I take a picture with 5 faces, each in a different position, then try to detect the faces, but the "faces" list is empty.
Here is the image I used: https://drive.google.com/open?id=1v8C-SP0nsZ4aLuyLu8f3tjA7uI6JaQ2R
This is the code:
Thanks for the help.