Daily Archives: August 3, 2015

[DDM] Hello Leap Motion


For my project I will use Leap Motion controller as my motion sensor. For this purpose I have to learn about Leap Motion itself and of course how to code or create application using it. Leap Motion SDK available for a lot of programming languages. For my project I choose LeapJS, Leap Motion javascript library. Why I choose javascript because it can run in almost all modern browser so it will be easy for client.

I have to choose which hand and fingers that I will use, what information do I need, what data I can get from Leap Motion, etc. After some time poking around its documentation, I found some useful information on how to use it for my need. Image below is what Leap Motion see from its perspective.

Hand image from Leap Motion

Hand image from Leap Motion

I make this hand form because this form is the closest one with the actual thing when you hold Angklung. From this image you can see that there are three fingers that I can use as a reference. These fingers are the most visible from leap motion point of view and after some trial that I do, I choose thumb as my reference. Why thumb? It was because pinky finger can be mistaken as other fingers and sometime index finger not really visible when I shake.

I can’t stop here, I have to choose which point/position that I will use in thumb. According below image from Leap Motion documentation there are 5 (five) position that I can use and another 3 (three) bone type that I can use too (because I can get its center position).

Capture2

I want to use “btipPosition” but I think it can be unclear. I want to get the closest point to “btipPosition” and the closest point is the center point of Distal Phalanges bone. So I decided to use the center point of Distal Phalanges.

To get this point/position is not that difficult in code, the challenge now is how to get the movement velocity of this point/position. Using this velocity then I can define some shaking parameter for my project.

Advertisement
Tagged , , ,