Giter Site home page Giter Site logo

gesture-opencv's Introduction

gesture-opencv

This python script can be used to analyse hand gestures by contour detection, and convex hull of hand palm using opencv library used for computer vision processes.

  • Built using OpenCV 2.4.12 on Python 2.7.10
  • Works on OpenCV 2.4.x, 3.2.x and Python 2.x, Python 3.x

Video

link: http://goo.gl/fui2MH

IMAGE ALT TEXT

Installing OpenCV 3.2 from source Python 3.6

  • wget https://github.com/Itseez/opencv/archive/3.2.0.zip

  • unzip 3.2.0.zip

  • cd opencv-3.2.0

  • mkdir release && cd release

      cmake -DBUILD_TIFF=ON \
          -DBUILD_opencv_java=OFF \
          -DWITH_CUDA=OFF \
          -DENABLE_AVX=ON \
          -DWITH_OPENGL=ON \
          -DWITH_OPENCL=ON \
          -DWITH_IPP=OFF \
          -DWITH_TBB=ON \
          -DWITH_EIGEN=ON \
          -DWITH_V4L=ON \
          -DWITH_VTK=OFF \
          -DBUILD_TESTS=OFF \
          -DBUILD_PERF_TESTS=OFF \
          -DCMAKE_BUILD_TYPE=RELEASE \
          -DBUILD_opencv_python2=OFF \
          -DCMAKE_INSTALL_PREFIX=$(python3.6 -c "import sys; print(sys.prefix)") \
          -DPYTHON3_EXECUTABLE=$(which python3.6) \
          -DPYTHON3_INCLUDE_DIR=$(python3.6 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
          -DPYTHON3_PACKAGES_PATH=$(python3.6 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") ..
    
  • The output of above will be similar to this: output

  • make -j4

  • make install

See Also

Playing Pacman with gestures: Repository

gesture-opencv's People

Contributors

vipul-sharma20 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gesture-opencv's Issues

HELP: How to detect one when I am raising only one finger?

In your code you have used convex defects and angle between 2 fingers to detect how many fingers are raised. Using the 2 variables you have created another variable count_defects.
When count_defects is 4 we have 5 fingers raised and so on. But your algorithm will fail when someone raises only the index finger. That will be because the angle between the index and the rest of the fingers (that are pointed downwards) is greater than 90 degrees. So how do I detect if only one finger is pointed up?
Please help me as soon as you can.

Not able to detect how many fingers are held up

When running the code, all three screens open up as shown in the demonstration video.

However, when I place my hand within the box, the program is unable to recognise how many fingers I am holding up. The green contouring line directly over the hand and fingers as shown in the video are only restricted to a single line on my finger.

This happened although I copied the code exactly. Any ideas how to correct this?

License

Add LICENSE document to make clear what is the allowed usage for your code.

algorithems

hi
can you explain how this code run!!
which algorithem you used!!
thank you

error in line 40

File "E:/Project/hand gesture/sample2.py", line 40, in
cnt = max(contours, key = lambda x: cv2.contourArea(x))

NameError: name 'contours' is not defined

It doesn't recognize the finger

when I start it, there are a lot of disturbs/noises in the background. If I put one finger in front of the webcam, it should prints one but It acts in the same way with another object too.

TypeError: Required argument 'src2' (pos 2) not found

I Use python 3.6.4 and OpenCV 3.4.0

line 40: cnt = max(contours, key = lambda x: cv2.contourArea(x))

At this line raise this error

"cnt = max(contours, key=lambda x: contourArea(x))
TypeError: Required argument 'src2' (pos 2) not found"

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.