GithubHelp home page GithubHelp logo

prmehta24 / hand_movement_detection Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sashagaz/hand_detection

0.0 1.0 1.0 141 KB

Hand Movement Detection using Python and OpenCV

License: Other

Python 100.00%

hand_movement_detection's Introduction

Hand Movement Detection

By: Parimal Mehta @prmehta24 , Parth Panchal @Parth19499

The code can identify hand movements in a live videofeed(from a webcam). We have tried to identify the direction in which the hand is moving in all three axes - x, y and z (Up, Down, Left, Right, Closer, Farther).

We have based our program on @sashagaz's excellent Hand Detection program.

The code captures frames using a web camera and outputs a video which:

  • Tells if the hand is detected
  • If moving, what direction the hand is moving in

This project is written in Python 2.7. The following libraries are used in this project and necessary to be add to your computer:

  1. Time - usually comes with Python 2.7
  2. OpenCV (2.4.9) - http://docs.opencv.org/trunk/doc/py_tutorials/py_setup/py_setup_in_windows/py_setup_in_windows.html
  3. NumPy (1.8.0rc1) - http://www.numpy.org

The code is consist of a single file and can be executed from the commandline or terminal by calling: python HandMovementDetection.py

When running the python file, you can expect to see the real time frame from your camera with a bounding rectangle framing your hand. The center mass of your hand will be labeled in the bounding rectangular.

The direction of hand movement will be written on the sides of the frame in white.

Notes

  • To increase accuracy of the detection, it is recommended to run the code in a bright light room.

  • The code can only detect one hand at a time. It would also be unable to recognise a partially occluded hand.

  • This uses the hand color method to detect a hand from camera frames. A shortcoming of this method was that it would classify anything of skin color as a hand (including other body parts - head, elbow ).

  • It also needed a clear background to be able to detect a hand in the frame.

  • HandGestureDetection.jpg is a flowchart for @sashagaz's Hand Detection program.

Hope you find this project helpful.

References

  1. opencv documentation http://docs.opencv.org/
  2. Skin Detection using HSV color space - V. A. Oliveira, A. Conci
  3. OpenCv Documentation - Miscellaneous Image Transformation http://docs.opencv.org/modules/imgproc/doc/miscellaneous_transformations.html
  4. OpenCv Documentation - Morphological Operations http://docs.opencv.org/trunk/doc/py_tutorials/py_imgproc/py_morphological_ops/py_morphological_ops.html
  5. Suzuki, S. and Abe, K., Topological Structural Analysis of Digitized Binary Images by Border Following. CVGIP 30 1, pp 32-46 (1985)

hand_movement_detection's People

Contributors

sashagaz avatar prmehta24 avatar parth19499 avatar

Watchers

James Cloos avatar

Forkers

devmailar

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.