We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi,
When I use the Leap Motion SwipeGesture function, a single motion of the hand could create more than 5 swipe gestures. I believe that it's because Leap Motion detects fingers instead of hand. I tried to reduce the motion detection by making the function only detects index finger. However, occasionally, the function still detects 2-3 swipe gestures. Is there anyway to make the function only detects 1 swipe gesture in a single swipe?
Regards.
Answers
Fewer people has this experience as this technology is not as common here in the forum. Consider exploring previous posts: https://forum.processing.org/two/search?Search=leapmotion
Can you display your leapMotion together with video streaming? Would this multiple finger detection be caused by the system getting confused and detecting the other fingers as the index finger?
Kf
I'm wanna do something like this:
I got this code from this Leap Motion forum: https://forums.leapmotion.com/t/increase-range-and-decrease-sensitivity-for-swipe-gesture/3064/4
But I am unable to convert this code to use it in Processing due to my poor programming skill.
Can you post the Processing code that you have at the moment?
I have more experience with Processing than with the Leap Motion--I confess I've had the Leap Motion for over a year now, but it was only today that I discovered that Processing has the "Leap Motion for Processing" library. :-bd
EDIT: Ok, after getting a bit more up to speed on the "Leap Motion for Processing" library I think I can offer a solution. The confusing part is that your source code snippet is in C++ and for a completely different Leap Motion library. :-(
The code below is borrowed from the example sketch "LM_2_Gestures", based on the code snippet you posted it looks like it testing to determine the duration of the swipe.
As for getting only one reading, I have to use millis() to record the time between when the swipe gestures stop. Though, I occasionally still see duplicates, try reducing the allow number of milliseconds (see
if ( (currentTime - previousTime) < 100)
) until it works the way you want it to. :-??