Software Archive
Read-only legacy content

Slowing down gesture recognition speed

HexLord
Beginner
695 Views

Hi,

I am working with the gesture recognition feature but the recognition of a specific gesture happens too quickly.

If I make a fist, it recognizes it 3-4 times in quick succession.

I want it to recognize one fist at a time and then pause for a second before recognizing the next gesture.

Is there a way to do that?

 

Thanks,

Shaleen

 

0 Kudos
3 Replies
Piotr_P_
Beginner
695 Views
You can pause gesture module for one second after catching the first gesture.
0 Kudos
HexLord
Beginner
695 Views

hi,

I tried to put the thread to sleep but that does not help.

how can I pause gesture recognition?

 

Pls help.

Thanks,

Shaleen

0 Kudos
Rupam_D_
Beginner
695 Views

Assuming that your frame rate is about 20, you have about 50ms delay par call. Use a global counter.

So recognition part will be triggered once par say 3 seconds. Hope this helps.

dontRec=0;

void gestureRecMethod()
{
if(dontRec<=0)
{
 //recognize gesture code
if(SOME_GESTURE_IS_RECOGNIZED)
{
dontRec=150;
}
}
else
{
if(dontRec>0)
dontRec--;
}
}

}

0 Kudos
Reply