✊ ✋ ✌️ ☝️
"A Python hand gesture recognition library for Kinetic User Interface (KUI)."
Table of Contents
1. Download the repository
Clone the base repository onto your desktop with
git as follows:
$ git clone email@example.com:achillesrasquinha/spockpy
2. Install necessary dependencies
spockpy is primarily built on OpenCV for a large number of standard Computer Vision helpers and techniques. In order to install spockpy, you may have to build OpenCV (2.x or 3.x, depending on your Python version) first.
For Linux users, use our build scripts as follows:
$ chnmod +x build/* $ build/get-opencv.sh
Next, install necessary Python dependencies as follows:
$ pip install -r requirements.txt
Finally, go ahead and install spockpy onto your system.
$ python setup.py install
To check whether you've installed spockpy, simply
>>> import spockpy
Come this far? You have my Vulcan Salute!
spockpy requires a robust WebCamera to get going! There are no other requirements. You are now, requirement-less.
spockpy creates a virtual trackpad (we call this, the HoverPad) for users to interact with the interface. Create a
spockpy.HoverPad class as follows:
>>> import spockpy >>> pad = spockpy.HoverPad()
To display the
HoverPad, use the
show class method as follows:
spockpy.HoverPad releases a set of event objects from the
get_event class method. You can now get
spockpy.Event objects from frames of the current frame by simply:
>>> event = pad.get_event() >>> event.type == spockpy.Event.SPOCK True
Hand as a Mouse Pointer
spockpy.Event objects generate x, y coordinates of the tip of a user's index finger.
>>> event.get_tip() (12, 40)
This retrives you a set of coordinates of the index finger relative to the screen.
How about Rock?
What about Paper?
Also, maybe Spock?
spockpy comes with a handy number of examples. To launch the app, launch it as follows:
>>> import spockpy >>> app = spockpy.App() >>> app.run()
OR via the command-line
$ python -m spockpy
Keen in enhancing the API? Have better suggestions on the
spockpy.detect method? Found some typos? Then go ahead and send in a Pull Request!
This repository has been released under the Apache License 2.0
This project had been built by Achilles Rasquinha (@achillesrasquinha, firstname.lastname@example.org) and Ameya Shenoy (@codingCoffee, email@example.com) in a time-frame of 30 hours for the Mumbai Hackathon 2017, held by the awesome developers at ERPNext.