iOS Gesture recognition utilizing accelerometer (and gyroscope)
I would like to detect gestures on an iOS device using the accelerometer and perhaps the gyroscope. The Application should detect movements like drawin开发者_如何学JAVAg a circle or a rectangle in the air. I've found several papers on gesture recognition on iPhones but there is no actual code which I could use. I wonder if there is a library which could assist me in approaching this goal in any way? If not, I have to start building one on my own! :) Thanks in advance! Markus
You'll probably have to develop those functions on your own. The built in gesture recognition features are all for touch based events.
I related question is here, it may help little.
Beside the paper mentioned there, you might find interesting this paper too, page 363, 5. boundary conditions and page 364. I am curious how DTW works for your application. Good luck anyhow!
Use Core Motion and a lot of mathematical functions.
I'll take a guess (for which I'll be probably wrong): If you want to capture circular motions (drawing with the device a circle in the air in one plane), take regular samples (> 20 Hz) and save the maximum values of x, y and z in an array each (to recognize in all 3 planes). If you want the gesture to be 5 seconds long, keep 100 samples (at 20 Hz). Then analyze if any of the three arrays has values which change sinusoidally. If it does, you've got a gesture.
I guess it's a bit of trial and error, or drawing on paper a circle and guessing the accelerometer values in the progress of moving.
Hope you find the answer. I'm very interested already.
精彩评论