如何检测通过传感器这一特定的运动姿态? [英] how to detect this specific movement gesture via sensors?

查看:216
本文介绍了如何检测通过传感器这一特定的运动姿态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的一个Android项目。它的目标是检测设备的predefined运动姿态。如果设备通过一个轴(X,Y或Z)旋转45度,然后旋转回其第一位置(在第一和第二位置都不会是精确的,我的意思是,如果它是旋转50度,而不是45,不重要!),那么的姿态已经发生和应用程序应该检测到它。

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.

我想,用加速度计和设备的磁性传感器不断监测设备的方向和检测的姿态做的,但结果是不能接受的(<一href="http://stackoverflow.com/questions/18786694/whats-wrong-with-my-sensor-monitoring-technique-so-that-i-lose-some-data">explained这里)。任何起点或想法,请?

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 ?

推荐答案

这似乎并不像有人是要提供一个具体的和有价值的答案。因此,让我尝试这样做。

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

首先,甚至有点原始,直接的方法允许发现你并不需要处理所有来自传感器的数据事实。而且人类不是那么快,所以没有必要进行,以确定任何具体的举措,以及每秒10000值。

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.

你真正需要的就是找出关键点,使你的决定。听起来是不是像一个 tanget 给你?

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

什么实际上,我的建议是,以测试使用的是普通鼠标和可用的手势识别框架,您的解决方案。因为实际的想法是pretty的大致相同。所以,请检查:

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.

更新

让我们想象一下,我拿着我的手机,我需要顺时针逆时针再旋转180度90度。我希望你不要指望我做一些复杂的3D图形在空气中(它会破坏易用性和坦白说,我不想失去我的手机),因此可以说有可能是一个点,我们可以跟踪,或者我们可以轻松地模拟它。

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:

这篇关于如何检测通过传感器这一特定的运动姿态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆