Skip to content

Latest commit

 

History

History
228 lines (185 loc) · 8.34 KB

README.md

File metadata and controls

228 lines (185 loc) · 8.34 KB

Build Status Codacy Badge Codacy Badge PyPI - License Download Maven Central Javadocs GitHub issues GitHub last commit Maintenance GitHub repo size in bytes GitHub contributors


Jestures

A simple framework for gesture recognition in Java

Donate

Donate

Download

Javadocs

If you need to access the documentation for any stable version, javadoc.io is probably the right place to search in.

Build

To build Jestures, execute the following command:

gradlew build

NOTE : Jestures uses JavaFx so it may not work on older version of Java.

Demo

Run the demo with:

cd Jestures_Recorder
gradlew run

Gesture Recorder Tool

Run the demo with:

cd Jestures_Demo
gradlew run

Adding Jestures to your build

Gradle

How to Include In Gradle Project

repositories {
    mavenCentral()
    jCenter()
}

Reference the repository from this location using:

dependencies {
    compile 'com.github.giulianini.jestures:jestures:1.0.0'
}

Maven

How to Include In Maven Project

<dependency>
    <groupId>com.github.giulianini.jestures</groupId>
    <artifactId>jestures</artifactId>
    <version>1.0.0</version>
    <type>pom</type>
</dependency>

Ivy

How to Include In Ivy Project

<dependency org='com.github.giulianini.jestures' name='jestures' rev='1.0.0'>
    <artifact name='jestures' ext='pom' ></artifact>
</dependency>

How can I use Jestures

Set Up The Framework

  1. Install the Kinect SDK
  2. Download natives - Natives dll for Kinect
  3. Put ufdw_j4k**bit.dll Natives into HOME/.Jestures/native. Jestures will find them.
    • Build
      You can download the source code of the library and build it as mentioned previously. Building Jestures will generate Jestures.jar under the Track4J/build/libs folder. To use Jestures, import Jestures.jar into your project and start recognizing gestures :).
    • Import the dependency
      Include the dependency for your build system.

Start The Recorder Tool

  1. Follow the step above and the recorder tool must work with your kinect version.

Code

Tracker only

final Sensor sensor = new Kinect(Joint.RIGHT_HAND, KinectSensors.SKELETON_ONLY, KinectVersion.KINECT1);
final Tracking tracker = Tracker.getInstance();
tracker.attacheSensor(sensor);
tracker.startSensor();
tracker.setOnJointTracked(new JointListener(){
....});

Start the Recognizer

final Sensor sensor = new Kinect(Joint.RIGHT_HAND, KinectSensors.SKELETON_ONLY, KinectVersion.KINECT1);
final Recognition recognizer = Recognizer.getInstance();
recognizer.attacheSensor(sensor);
recognizer.startSensor();
recognizer.setOnGestureRecognized(System.out::println);

Start via UI

final Sensor sensor = new Kinect(Joint.RIGHT_HAND, KinectSensors.SKELETON_ONLY, KinectVersion.KINECT1);
final Recognition recognizer = Recognizer.getInstance();
recognizer.attacheSensor(sensor);
final RecognitionView view = new RecognitionScreenView(recognizer);
recognizer.attacheUI(view);
recognizer.setOnGestureRecognized(System.out::println);

Define your own UI

public class Gui extends AbstractView {
    public Gui(Recognition recognizer) {
        super(recognizer);
        // TODO Auto-generated constructor stub
    }
    @Override
    public void notifyOnFrameChange(int frame, Vector2D derivative, Vector2D path) {
        // TODO Auto-generated method stub   
    }
    @Override
    public void notifyOnFeatureVectorEvent() {
        // TODO Auto-generated method stub   
    }
..... A lot of methods to implements
}

Supported sensors

  • Windows:
    • Kinect v1
    • Kinect v2

Future support

  • Windows:

    • Lipmotion
  • Linux:

    • Kinect v1
    • Kinect v2

Notes for Developers

Importing the project

The project has been developed using Eclipse, and can be easily imported in such IDE.

Recommended configuration

  • Install the required eclipse plugins:

    • In Eclipse, click "Help" -> "Eclipse Marketplace..."
    • In the search field enter "findbugs", then press Enter
    • One of the retrieved entries should be "FindBugs Eclipse Plugin", click Install
    • Click "< Install More"
    • In the search field enter "checkstyle", then press Enter
    • One of the retrieved entries should be "Checkstyle Plug-in" with a written icon whose text is "eclipse-cs", click Install
    • Click "< Install More"
    • Wait for Eclipse to resolve all the features
    • Click "Confirm >"
    • Follow the instructions, accept the license, wait for Eclipse to download and install the product, accept the installation and restart the IDE
    • When restarted, click "Help" -> "Install New Software..."
    • Click "Add..."
    • In "Location" field, enter https://dl.bintray.com/pmd/pmd-eclipse-plugin/updates/
    • The "Name" field is not mandatory (suggested: "PMD")
    • Click OK.
    • If not already selected, in "Work with:" dropdown menu choose the just added update site
    • Select "PMD for Eclipse 4" and click next
    • Follow the instructions, accept the license, wait for Eclipse to download and install the product, accept the installation and restart the IDE.
  • Set the line delimiter to LF (only for Windows users)

    • In Eclipse, click window -> preferences
    • In the search form enter "encoding", then press Enter
    • Go to General -> Workspace
    • In the section "New text file line delimiter" check "Other" and choose Unix
    • Apply
  • Use space instead of tabs

    • In Eclipse, click window -> preferences
    • Go to General -> Editors -> Text Editors
    • Check "insert spaces for tabs" option.
    • Apply.
    • Go to Java -> Code style -> Formatter
    • Click Edit button
    • In Indentation tab, under "General Settings", set "tab policy" to "Spaces only"
    • Apply (you should probably rename the formatter settings).

Screenshots

Recognition

Track4J Track4J

Dataset

Track4J

Recording

Track4J

License

Apache 2.0