pythonopencvface-detectionraspberry-pi4picamera

How to capture face with open-cv and Picamera?


I am looking for a simple way for to do real-time face detection and capture using open-cv and Picamera in Python. I figured out how to recognize the face from and image file, but I dont' know the rest. I am trying to have a real-time stream of video, and when a face is detected in that video, the camera takes a picture of the face. Is this possible using open-cv and Python? NOTE: there is a difference between face recognition and face detection. I am asking for help on how to detect the face and take a picture of it, not the recognition part. Thanks for any help!


Solution

  • my two cents are, if you have the original frame from the live video stream, and you can detect which frame has a face. Then can you just save that frame as a png or jpeg image file, no need to take any further image again? I know there can be situations where we need to take a new image, but just one solution I thought of is this.