Skip to content

kiran761/Extracting-Faces-from-Images-Python-OpenCV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extracting-Faces-from-Images-Python-OpenCV

Below is README file content for the "Extracting Faces from Images using Python and OpenCV" code:

Extracting Faces from Images using Python and OpenCV

This project demonstrates a Python script that utilizes the OpenCV library to detect and extract faces from images. It uses a pre-trained Haar cascade classifier to automatically detect human faces within the input image and then extracts them into separate images.

Features

  • Face detection using the Haar cascade classifier from OpenCV.
  • Extraction and display of detected faces.

Installation

  1. Clone this repository to your local machine.
git clone https://github.com/yourusername/extract-faces-python-opencv.git
  1. Install the required libraries using pip:
pip install opencv-python

Usage

  1. Add the image file you want to process to the project folder.

  2. Open a terminal or command prompt.

  3. Run the script faces.py with the path to the image file as an argument:

python faces.py 
  1. The script will process the image, detect faces, and display each extracted face in separate windows.

  2. To close the windows and end the script, press any key in the terminal.

Sample Input and Output

Input Image: Input Image

Extracted Faces: ![Face].(Face2.png)

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Acknowledgments

  • The OpenCV library for providing the Haar cascade classifier for face detection.

Contact

For any inquiries or questions, please contact [email protected].


Replace kiran761 in the installation section with your GitHub username.

Remember to replace the sample images and add actual samples that show the results of your code. Also, update the contact email and make sure the license information in the README file matches the license file in the repository.

This README provides users with the necessary information to get started with your project and use the code effectively. Feel free to modify it as needed to best suit your project's requirements.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages