Giter Site home page Giter Site logo

cheongyi / opencv-miniproject-facedetection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geekyshiva/opencv-miniproject-facedetection

0.0 1.0 0.0 243 KB

Webcam Face Detection Program in python using haarcascade_frontalface_default.xml and has been tested on Linux and Windows environment.

License: Mozilla Public License 2.0

Python 100.00%

opencv-miniproject-facedetection's Introduction

OpenCV-miniProject-FaceDetection

Webcam Face Recognition Program

Travis branch

Webcam Face Detection Program built in python.

Pre-Requisites:

  1. OpenCV installed
  2. You need a working webcam for this script to work properly.
  3. Make sure to use OpenCV v2.
  4. Knowledge of Python and cascades :P
  5. Knowledge of Classifiers

Cascades:

The cascades themselves are just a bunch of XML files that contain OpenCV data used to detect objects. You initialize your code with the cascade you want, and then it does the work for you.

Since face detection is such a common case, OpenCV comes with a number of built-in cascades for detecting everything from faces to eyes to hands and legs. There are even cascades for non-human things. Like a banana or middle finger :P :P

Run the program:

python webcam.py

Update: Now supports OpenCV3. This change has been made on Linux.

To run the OpenCV3 version, run python webcam_cv3.py haarcascade_frontalface_default.xml

Note:

You can also provide a video file and Python will read in the video file. However, you need to have ffmpeg installed for that since OpenCV itself cannot decode compressed video, that's bad i know :P . ffmpeg acts as the front end for OpenCV, and it should be compiled directly into OpenCV. This is not easy to do, especially on Windows.

Test Results:

I have tested the above program on both Linux and Windows Operating systems and have recieved positive results using my stock webcam on Hewlett Packard 64bit system.

Successful Test

Test case 2

Upcoming Push:

Wanna contribute to the more advanced version 2.0 of this mini project :

The upcoming project will be Faces recognition example using eigenfaces and SVMs:

Take a glance : here

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.