Page 1 of 1

How do I draw/read touch gestures?

PostPosted: Thu Nov 24, 2016 8:58 pm
by SeoMarkers
I think a question of something similar has been asked and answered, but mine is different:

So, say I want the system to perform an action when a circle is drawn on the screen, in the middle. I want to be able to draw a circle on the screen, then, as soon as you stop drawing it, the system would read the canvas and say "well hey that's a circle" and associate that with a certain action.
Basically, I want to have the system associate different hand-drawn symbols with pre-programmed symbols, and perform an action after the user-friendly symbol is associated with the system's symbol in its memory.
Can I do this in a practical way, and if so, how would I go about doing this?

Re: How do I draw/read touch gestures?

PostPosted: Fri Nov 25, 2016 10:45 pm
by randomly
This is a real tough thing to program and that's probably why you didn't get any responses yet.
If you are trying to do this as a hobbyist, you would probably be better off trying to control the input by a different system.

This requires a really good, strong and complex algorithm. It is possible, but the only useful stuff I found when googling for this was by university professors. (e.g. here)

If this is doable at all, there are probably just a few people in this forum who can help you, most likely @R0j0hound.

I don't want to crush your "dreams", but I think you would make life a lot easier for yourself if you considered a different approach. ;)

Re: How do I draw/read touch gestures?

PostPosted: Sat Nov 26, 2016 4:23 am
by Tylermon
I made a very rough and quick version of how I would do gestures. feel free to give it a try/look.
I suggest clicking once before doing anything. This clears the screen.

browser test
password: construct

capx ... 0test.capx

Some explanation of that implementation. Basically, I have shapes or gesture symbols created. if the touchpoints follow along the general shape, then a gesture action can be performed.

If I were to take it a step further I would have the gesture shapes try and resize themselves to see if it can find a better gesture match.
I would also have the gesture symbol flip and rotate a few times to attempt and find a better match.

To take the accuracy even further I would place image points on key locations to each gesture and make sure a touch point falls within that area. This would help in accurately determining a gesture.

Im sure there are also other ways to go about this, but this way is quick and mostly effective.

Re: How do I draw/read touch gestures?

PostPosted: Sat Nov 26, 2016 8:46 am
by Laurent

Re: How do I draw/read touch gestures?

PostPosted: Sat Nov 26, 2016 3:16 pm
by SeoMarkers
Aight, thanks for all your responses. @Tylermon, thanks a bunch, I'll try your .capx out in a bit. @randomly, thanks for the link, and I'll probably check with r0j0 at some point to see if it's able to be made in C2. @Laurent, thanks for the link as well, I'll check out the plugin.

Re: How do I draw/read touch gestures?

PostPosted: Sat Nov 26, 2016 3:19 pm
by SeoMarkers
@Tylermon, just checked out the browser preview, this is really great. I understand what you mean by "touch points", so I'll see if I can build off this. Thanks a lot ^-^