Skip to content
Switch branches/tags
This branch is up to date with master.

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

spockpy ✌️ ☝️

"A Python hand gesture recognition library for Kinetic User Interface (KUI)."

Documentation Status

Table of Contents


1. Download the repository

Clone the base repository onto your desktop with git as follows:

$ git clone
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/

Next, install necessary Python dependencies as follows:

$ pip install -r requirements.txt

Finally, go ahead and install spockpy onto your system.

$ python install

To check whether you've installed spockpy, simply import spockpy:

>>> 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:


That's it! 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

Hand as a Mouse Pointer

spockpy.Event objects generate x, y coordinates of the tip of a user's index finger. 👆 To get the current coordinates of a frame, simply:

>>> 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()

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, and Ameya Shenoy (@codingCoffee, in a time-frame of 30 hours for the Mumbai Hackathon 2017, held by the awesome developers at ERPNext.


A Python hand gesture recognition library for Kinetic User Interface (KUI).




No releases published


No packages published