- Home /
Gesture Recognition (e.g. circle, numbers) from many x, y coordination system values (Google Daydream)
I want to detect gestures in C# from 2D, so x and y float values which gives me the Google Daydream Controller. But this is problem is not Google Daydream specific I think. So, input are many x, y values and output should be "circle 90% probability" with patterns or algorithms. But how can I figure out whether it is a circle or another gesture?
Example input for a circle (beginning up middle):
(0.5, 0.1)
(0.6, 0.1)
(0.7, 0.2)
(0.8, 0.3)
(0.8, 0.4)
(0.9, 0.4)
(0.9, 0.5)
(0.9, 0.6)
(0.9, 0.7)
(0.8, 0.8)
(0.9, 0.5)
(0.9, 0.6)
(0.9, 0.7)
(0.8, 0.7)
(0.8, 0.8)
(0.7, 0.8)
(0.7, 0.9)
(0.6, 0.9)
(0.5, 0.9)
(0.4, 0.9)
(0.3, 0.9)
(0.3, 0.8)
(0.2, 0.8)
(0.2, 0.7)
(0.1, 0.7)
(0.1, 0.6)
(0.1, 0.5)
(0.1, 0.4)
(0.1, 0.3)
(0.2, 0.2)
(0.3, 0.2)
(0.3, 0.1)
(0.4, 0.1)
(0.5, 0.1)
Any ideas? Thank you!
Answer by Desoxi · Nov 17, 2016 at 09:27 AM
Hm.. My inital idea would be to take the first value pair as reference point (im assuming that, at this point, you roughly know where the midpoint is, here its obviously 0, 0 i think). Then again you could take the x and y params of that reference point and calculate two rings. One with lower radius and one with slightly higher radius. The difference of the two ring radius(es?) would be the threshhold for you recognition. So, if the y value of the other value pairs are in between those two rings, you could say that its still a circle. But if its outside, you could say that it is no ring anymore. Hope i could explain what i wanted to say :X
Answer by tanoshimi · Nov 17, 2016 at 10:15 AM
Try the $ family of gesture recognisers (e.g. $P or $1). There are plenty of free libraries available in different languages that can be integrated into Unity. https://depts.washington.edu/aimgroup/proj/dollar/pdollar.html
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
how to save the values of hmd and controller position rotation in a list 0 Answers
Player Movement 0 Answers
Google Daydream Controller pick up objects 0 Answers
Htc Vive Controller script issue 2 Answers