I am currently developing some gesture recognition in C# with Kinect SDK.So far so good, the only problem being that the gesture recognition is instant.
For example: i am using a messageBox to announce when i raise my hand above my head.And if i hold the hand for 2 seconds, it will open dozens of messageBoxes announcing the gesture.
Is there a way to stop this?
Darren says the truth. You need to implement a stop mechanism. Kinect is analyzing everything in real time whole time so when your hand is above it is there until it is there 🙂 So every time your action is triggered. Do as Atuls said OR do as I prefer.
I prefere creating a bool flag. Default value is false. When my action is triggered I set it to true and I don
t trigger the action again until the flag is false. In your example I would set it to true when I raise my hand above the head and set it to false when I have my hand below my head. That way Ill trigger the action only once every time i need it