Video Face indexing

asked 2016-01-23 14:28:56 -0500


I put together code to detect faces from a video file, and save the cropped detected faces in individual files. The result is tenss of individual image files for every person. Is there a mechanism to track the face in the scene and obtain the best possible image, this way the result is one good image per person.

code segment related to the above:

for (fX, fY, fW, fH) in faceRects: cv2.rectangle(frameClone, (fX, fY), (fX + fW, fY + fH), (0, 255, 0), 2) sub_face = frameClone[fY:fY+fH, fX:fX+fW] face_file_name = "faces/face_" + str(fY) + str(fX) + ".jpg" cv2.imwrite(face_file_name, sub_face) # show our detected faces cv2.imshow("Face", frameClone)

I would appreciate any help or pointers

edit retag flag offensive close merge delete