Code
# Import necessary library
import cv2
import matplotlib.pyplot as plt
May 24, 2022
Blurring the face area of people from videos is done in all news channels and to hide the identity of a person. With computer vision, We can automatically detect the face region of the person and use it to blur the image. In this project we will build a computer vision model which can detect face in an image and blur it.
1. Read an image
2. Convert it to grayscale
3. load Cascade Classifier
4. Detect Faces
5. Draw Bounding Box
6. Blur the face
Step-1: Read an image
Step-2: Convert the image to grayscale
Step-3: Loading OpenCV CascadeClassifier
Step-4: Detecting faces in the grayscaled image
Step-5: Draw Blounding Box around the detected faces
Step-6: Blur the face