Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Video Face indexing

$
0
0
Hello, 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

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>