Giter Site home page Giter Site logo

hololens-and-leap-motion's Introduction

HoloLens with Leap Motion controller

This repository contains the solution developed for combining the HoloLens with a Leap Motion Controller (LMC). The work was done as a Master's Thesis work for Aalto University at Futurice and the complete work detailing how everything works can be found here. The purpose is to enable the creation of better hand and gesture based interactions for the HoloLens by making use of the hand tracking data provided by the LMC.

Requirements

The Leap Motion client requires the Orion SDK and OpenCV to run. The Skin Detection Trainer only requires OpenCV to run.

The Unity application uses Zenject for dependency injection and UniRx for Reactive extensions, but these are already included in the project.

Solution details

The entire solution is made up of three separate applications (the Unity application running on the HoloLens, the Leap Motion client that provides the Leap Motion data, and the Skin Color Detection Trainer that calculates the parameters used for skin detection) and solves three key problems. These problems are:

  1. Calibrating the HoloLens and the LMC. This is done with Perspective-n-Point and uses the user's fingertips in 1 or more images in combination with the 3D fingertip coordinates provided by the LMC. The implementation of the hand detection in an RGB image can be found here and the fingertip detection can be found here.
  2. Calculating the parameters needed for the hand detection. Skin colour detection is done using a combination of k-means clustering and Mahalanobis distances. The required paramaters are calculated based on a set of training images with corresponding ground truths. The trainer can be found here, the training set here, and the ground truths here.
  3. Streaming and converting the Leap Motion data. Once calibration is done the data provided by the LMC are streamed using UDP to minimise latency. The data are converted on the HoloLens side to the HoloLens's coordinate system.

Current limitations

The biggest current limitation is the skin colour detection. Since this project was done as a proof-of-concept, the training data for the skin colour detection was gathered only from a single person. If the hand detector doesn't seem to be working properly or accurately enough, this might be the cause. One option is then to collect additional training data using the HoloLens. But one problem that will probably still persist is that pure colour-based detection has problems with some colours (see chapters 4.1.5 and 5.1.1 of the thesis for more info). The optimal solution would be to change to a more reliable way of doing hand detection.

Another thing to note is that the results are not 100% accurate and further investigation of the source(s) of the error is needed. See chapter 5.1.2 of the thesis for a discussion of this error.

Third, the current networking code was written quite hastily, so any improvement suggestions to this are very welcomed. The HoloLens's UI is also very quickly thrown together, so any improvement suggestions to this are also very welcomed.

Feedback, suggestions, and questions

Any feedback, suggestions for improvements, and questions about how something works are extremly welcome. Send any of these to [email protected].

License

This software is licensed under Apache License 2.0.

UniRx is licensed under MIT license, © 2014 Yoshifumi Kawai.

Zenject is licensed under MIT license, © 2016 Modest Tree Media Inc.

hololens-and-leap-motion's People

Contributors

nkohler avatar

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.