Skip to content

Victorma/LeapTrainer.CSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeapTrainer.CSharp

This is a port of https://github.com/roboleary/LeapTrainer.js to be used in Unity.

To use it, add it as a Component to any GameObject and link a LeapProvider to it.

To receive interaction, make sure you register to the events in LeapTrainer:

    public event StartedRecordingDelegate     OnStartedRecording;
    public event EndedRecordingDelegate       OnEndedRecording;
    public event GestureDetectedDelegate      OnGestureDetected;
    public event GestureCreatedDelegate       OnGestureCreated;
    public event GestureRecognizedDelegate    OnGestureRecognized;
    public event GestureUnknownDelegate       OnGestureUnknown;
    
    // THE RUNTIME TRAINING IS NOT WORKING YET, SEE FEATURES
    public event TrainingCountdownDelegate    OnTrainingCountdown;
    public event TrainingStartedDelegate      OnTrainingStarted;
    public event TrainingCompleteDelegate     OnTrainingComplete;
    public event TrainingGestureSavedDelegate OnTrainingGestureSaved;

Features

  • Train the trainer adding a set of recorded frames (LeapTrainer.loadFromFrames(...))
  • Train the trainer using a JSON (LeapTrainer.fromJSON(...)) This is not tested.
  • Runtime training: See #2 (comment)
  • Recognition using Geometric Template Matcher.
  • Recognition using Cross Correlation.
  • Recognition using Neural Networks.

Status

Some parts of the trainer are unfinished, but you might find help in these discussions:

Any contribution to finish the project is appreciated since I don't have a LeapMotion device anymore.