2

Ive been working with the iOS sensors a bit off late and i wanted to write an app that would accurately track the motion of the phone in space. I wanted to know if its possible to track the motion of the device and detect gestures, such as drawing a circle with your phone or even moving in a straight line.

I've been searching online about this, and i wanted to know two things:-

1.Is it possible to do this with the CoreMotion framework. 2.If Yes, what is the alternative for older devices that do not support CoreMotion. Without the double integral method using the accelerometer!

This would really help!

Any other alternative ideas are most welcome!

Thanks in advance!

Sagar
  • 555
  • 9
  • 24

1 Answers1

2

As your write, you cannot do the double integral.

For gesture recognition, I would try dynamic time warping. See my earlier answer here.

Community
  • 1
  • 1
Ali
  • 56,466
  • 29
  • 168
  • 265
  • Thanks for the suggestion! If i wanted to try dynamic time wrapping, shouldn't already have a database of accelerometer readings for each gesture? Then i could compare the real time values with these. Am i thinking in the right direction? Thanks! – Sagar Mar 13 '12 at 11:44
  • Yes, you need to have some database, that is correct. You could also try the gyro readings as well. Good luck! – Ali Mar 13 '12 at 14:52
  • Thanks a lot Ali! I will try this out and let you know the outcome! It might take me a while though! Cheers! – Sagar Mar 14 '12 at 08:08
  • Ali, I should thank you for your idea. I wrote a Mac app that establishes a connection with a HID BT device and used DTW to do the gesture recognition for it based on the data i got from the device. The algo works! Thanks again! – Sagar May 17 '12 at 10:20
  • Glad to hear it worked! Feel free to accept / upvote my answer! ;) – Ali May 17 '12 at 10:40
  • Sagar, I'm struggling with the same issue but I see you solved it. Do you have to code or know the solution? – Dirk Feb 12 '20 at 22:36