8000 GitHub - IkkiOcean/Face-Blur
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

IkkiOcean/Face-Blur

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Face Blurring with OpenCV

This project demonstrates a real-time face blurring application using OpenCV. It captures video from your webcam, detects faces in real-time, and applies a median blur effect to the detected faces.

Requirements

  • Python 3.x
  • OpenCV

Installation

  1. Install Requirements:

    pip install -r requirements.txt

Usage

  1. Run the script:

    python main.py
  2. The webcam will open, and the application will begin detecting faces. Detected faces will be blurred in real-time.

  3. Press q to exit the application.

Code Explanation

  • Importing Libraries: The script uses OpenCV for video capture and face detection.

  • Loading the Cascade Classifier: The haarcascade_frontalface_default.xml file is loaded to detect faces in the video frames.

  • Capturing Video: A video stream from the default camera (index 0) is initiated.

  • Face Detection Loop:

    • Each frame is read from the video stream.
    • The frame is converted to grayscale for face detection.
    • detectMultiScale is used to detect faces in the grayscale image.
    • Detected faces are blurred using a median filter applied to the corresponding regions of the original frame.
  • Displaying Video: The processed video is displayed in a window titled "gotch !!!".

  • Exiting the Application: Pressing the 'q' key will terminate the video stream and close all windows.

Result

result

Acknowledgements

  • This project uses the OpenCV library, which is a powerful tool for image processing and computer vision tasks.
  • Haar Cascades for face detection are provided by OpenCV, which allows for efficient face detection in images and video.

Signature

Vivek Prakash

Linkedin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0