Code Monkey home page Code Monkey logo

finger-detection-and-counting-using-opencv's Introduction

Finger-Detection-and-Counting-using-OpenCV

A system which detects a human hand, segments the hand, counts the number of fingers being held up and displays the finger count, from a live video input. 

Programming Language: Python Library: OpenCV​

Libraries to install:

pip install opencv-python

pip install numpy

pip install -U scikit-learn

Explanation:

  • Begin by creating a region of interest in a live video frame, where the hand is to be inserted for counting.

  • Once the hand is detected, it is isolated by applying thresholding techniques, Binary Thresholding in this case using opencv.

  • To the thresholded hand segment, a polygon is drawn around the hand to identify the extreme points, using Convex Hull technique.

  • Using the intersection of the extreme points in the polygon (Top, Bottom, Left, Right), the center of the hand is calculated.

  • The point furthest away from the center of the hand is identified and a ratio of that distance say 80% is used as the radius for a circle, which is drawn around the center of the hand (For visualization purposes, we may think of this as the palm region).

  • Any points outside the circle and far away from the bottom are concluded to be the extended fingers.

  • Return the total count of these identified points.

You can view the video here !

https://www.youtube.com/embed/5LWbOa1za4U

finger-detection-and-counting-using-opencv's People

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.