how to detect this specific movement gesture via sensors?

泪湿孤枕 提交于 2019-12-05 02:28:11

问题


I'm working on an Android project. it's goal is to detect predefined movement gesture of the device. if the device rotates 45 degrees over an axis(X,Y or Z) and then rotates back to its first position( the first and second positions are not going to be accurate, I mean if it was rotated 50 degrees instead of 45, not important !!!)then the gesture has happened and the app should detect it.

I tried to do that using Accelerometer and Magnetic sensors of device to continually monitor the orientation of the device and detect gesture but the results weren't acceptable(explained here). any start point or idea please ?


回答1:


It doesn't seem like anybody is going to provide a concrete and valuable answer. So let me try to do that.

First of all, even a bit primitive and straightforward approach allows to spot the fact you do not need to process all the data coming from sensors. Moreover humans are not that fast, so there is no need to proceed 10000 values per second in order to identify any specific move as well.

What you actually need is just to identify key points and make your decision. Does it sound like a tanget to you?

What I'm actually suggesting is to test your solution using an ordinary mouse and available gesture recognition framework. Because the actual idea is pretty much the same. So please check:

  • iGesture - Gesture Recognition Framework
  • Mouse Gestures

It such a way it might be easier to develop a proper solution.

Update

Let's imagine I'm holding my phone and I need to rotate it 90 degrees counterclockwise and then 180 degrees clockwise. I hope you will not expect me to do some complex 3D shapes in the air (it will break usability and frankly I do not want to loose my phone), so it is possible to say there might be a point we can track or we can easily simulate it.

Please see my other answer in order to see simple, but working solution of a similar problem:



来源:https://stackoverflow.com/questions/18811780/how-to-detect-this-specific-movement-gesture-via-sensors

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!