简体   繁体   English

如何通过传感器检测这种特定的运动手势?

[英]how to detect this specific movement gesture via sensors?

I'm working on an Android project. 我正在开发一个Android项目。 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. 如果设备在轴(X,Y或Z)上旋转45度然后旋转回到第一个位置(第一个和第二个位置不准确,我的意思是它旋转了50度而不是45度,不是重要!!!)然后手势发生了,应用程序应该检测到它。

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. 所以让我试着这样做。

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. 此外,人类并不那么快,因此不需要每秒进行10000个值来识别任何特定的移动。

在此输入图像描述

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: 所以请检查:

在此输入图像描述

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. 让我们想象一下,我拿着手机,我需要逆时针旋转90度,然后顺时针旋转180度。 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. 我希望你不要指望我在空中做一些复杂的3D形状(它会破坏可用性,坦率地说我不想丢失我的手机),所以有可能说我们可以追踪或者我们可以很容易模拟它。

在此输入图像描述

Please see my other answer in order to see simple, but working solution of a similar problem: 请查看我的其他答案 ,以便查看类似问题的简单但有效的解决方案:

在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM