IOS gesture recognition using an accelerometer (and gyroscope)

I would like to detect gestures on an iOS device using an accelerometer and possibly a gyroscope. The application should detect movements, such as drawing a circle or rectangle in the air. I found several gesture recognition documents on the iPhone, but there is no real code that I could use. I wonder if there is a library that could help me achieve this goal? If not, I should start building one myself! :) Thanks in advance! Marcus

+6
source share
3 answers

You may have to develop these features yourself. Built-in gesture recognition features - everything for touch-based events.

+1
source

I related a question here , this might help a bit.

Besides paper , you can find this document interesting, pp. 363, 5. boundary conditions and p. 364. I'm curious how DTW works for your application. Good luck anyway!

+1
source

Use Core Motion and many math functions.

I will assume (for which I am probably mistaken): if you want to capture circular motions (using a device to draw a circle in the air in the same plane), take regular samples (> 20 Hz) and store the maximum values ​​of x, y and z in the array each (recognize in all 3 planes). If you want the gesture to be 5 seconds, keep 100 samples (at 20 Hz). Then analyze if any of the three arrays has values ​​that change sinusoidally. If so, you have a gesture.

I assume that this is a bit of trial and error, or draws a circle on paper and guesses the values ​​of the accelerometer during the movement.

I hope you find the answer. I am already very interested.

0
source

Source: https://habr.com/ru/post/891501/


All Articles