I am using opencv for face detection, and in addition I want to crop the faces and save them,
How can I do it?
The form of the face array: for (x, y, w, h) in faces
id = 1
for (x,y,w,h) in faces:
cropped = img[ y : y+h, x : x+w ]
cv2.imwrite("cropped_face" + str(id) + ".png", cropped)
id++