gestures

Custom Multi-Touch Gestures (Composition by dust)

Author: dust
License: (unknown)
Date: 2009.09.12
Compatibility: 10.6
Categories:
Required plugins:
(none)

so i have made a new source file for custom multi-touch gesturing using the tuio protocol. this is using the same method i have been doing before but i have added the multi-touch environment as well a time element for added positive gesture results. i was going to use the value historian and parse out my arrays for a copy and paste into java script so i can have some pre recorded gestures but the VH isn't working for me in SL. i have recoded a two min video to verify and explain the gesture recording process as it relates to recording and the run-time evaluation mode in order to match a gesture. my tolerance settings are pretty tight .01 on x an y and point .05 on time.

with my last attempt i was only matching the sum total of my gestures x pos which was a little flaky. with this iteration i am doing a true point to point match with three elements and a sum total tolerance as well. to start recording a gesture you need to put one finger down and double tap with the second finger then draw your gesture. the global time of the gesture is 2 seconds so if you are recording gestures keep that in mind. to enter runtime evaluation you need to touch down with all 3 fingers. once you have enabled the eval you can do your gesture at anytime. something i will add in the future is a offset to x and y so no matter where you are on the screen the evaluation will be the same in addition im going to add some square roots to evaluate multiple size gestures. right now this is only doing a 1-1 map at the original scale.

http://si02.info/mt_gesture.mov

so this is a 10.6 comp but it should be safe down to 10.4. the requisite plug ins are gl-tools but that is only showing some cursor triangulation and not required for the gesture map to work. maybe there is a circle from 10.6 but again that is only for drawing a cursor and not needed.

Gesture Recognition Qtz Tutorial

dust's picture

So i know there has been lots of rants on how to create multi-touch gestures and what not a little while back. So i have been trying to port the viterbi algorithm to java script for a few months now so I can do advanced pattern recognition and other cool stuff, but for some reason I can not figure out how to do multi dimensional associative arrays with key in java script. Although now that i think about I might be able to do with kineme structure ?

So while I was tinkering around today with some multi - touch approaches while getting ready for a class I will be taking this semester on the related subject I came up with a great idea. That is to do pattern recognition or 1 to 1 point mapping to create the gestures I need with noting more than grade school math. The logic is a bit complex and there lots of work to be done, but within a few hours I was able to wip up a pattern matching system. No this isn't that fancy $ stuff or the wii-mote probability smoothing algorithms discussed on here. Im not sure if this would count as filling a feature request but it demonstrates how to record gestures and match them on the fly.

You can watch the video tutorial and get the source here.

http://si02.info/index.php/comps/conceptual/24-g

I have been having some memory management issues with my server tonight but I think I have got some snappier settings. Im attaching the source here incase my site goes down. Last night I looked at my stats and I had 300 guests on my server doing what I don't know because my content hits are no where near that many. I guess people are watching my illusion on the homepage, I don't have that archived as content yet but just incase look at the attachment.

The 1 key records your gesture the right mouse clears the gesture recorded and the left mouse acts as single touch and triggers the runtime evaluation so the patch knows if a gesture as been hit or not.

I have left a few simple things up to someone to do. 1 add conditional and counter the more hits the better. 1 hit = false positive but 2 hits with my tolerance settings = gesture. i urge you to watch the video so you will see how it works but it dosent matter mess around with it improve it, laugh at I don't care I hope someone will find it useful. Like I said I accomplished more with a simple approach in an hour than I have done all year trying to convert viterbi.

so 1 key saves gesture right mouse clears left mouse activates. oh yeah you have to hold the one key down until your done with your gesture. eventually that will be a three finger trigger to swipe or something to enable recording i don't know haven't got that far yet.

just so you understand you can record a star gesture then set a tolerance. you can then draw the same gesture anywhere on the screen to get matches. This doesn't match big star with little star although some simple math averages could make that possible. And yes I know i could do this with a few lines of java script. Give me a break I like noodles. The macros can do the same thing even faster sometimes with simple things like this.