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

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

问题描述

我正在处理一个 Android 项目.它的目标是检测设备的预定义移动手势.如果设备在轴(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.

    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.

    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. 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天全站免登陆