Page 1 of 1

Gesture Recognition!!!!!!

PostPosted: Mon Apr 17, 2006 6:44 am
by Joshua Worth
I have created a gesture recognition program that only requires ONE object! The pacman in the middleis the object that does the recognition. The objects in the lower left hand corner are just debugging. The gesture gets put into a string called "gesture". In the string, u means up, d means down, l means left and r means right(the initials of the directions). Usually you have to do somthing, for example, like this
Code: Select all
if (strcmp(gesture, "udlrd") == 0){
    ExitGame();
                          }

to see if the gesture is Up, down, left, right, then down, and thaen close the game if it if true.

Get it here: http://www.worth.id.au/~joshua/gesturerec.zip

:wink: :) :D ENJOY :D :) :wink:

PostPosted: Tue Apr 18, 2006 4:42 am
by DilloDude
Pretty cool! The next step would be to recognize diagonals, and have it draw on a canvas the shape you draw so it looks like it recognizes the shape rather than a series of directions.

PostPosted: Tue Apr 18, 2006 5:05 am
by DilloDude
Diagonals are pretty trick; maybe it would be easier to use a slightly different script for them.

PostPosted: Wed Apr 19, 2006 8:09 am
by Joshua Worth
Divide it by 8 instead of 4

PostPosted: Wed Apr 19, 2006 9:25 am
by DilloDude
I did try that, but I think it might be better to find out if it is in a certain range of angles.