如何使用加速度计进行手势识别 [英] How to do Gesture Recognition using Accelerometers

查看:30
本文介绍了如何使用加速度计进行手势识别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的目标是识别安装在太阳黑子上的加速度计的简单手势.手势可以像旋转设备或以几种不同的动作移动设备一样简单.该设备目前只有加速度计,但我们正在考虑添加陀螺仪,如果它能让它更容易/更准确.

My goal is to recognize simple gestures from accelerometers mounted on a sun spot. A gesture could be as simple as rotating the device or moving the device in several different motions. The device currently only has accelerometers but we are considering adding gyroscopes if it would make it easier/more accurate.

有没有人有关于如何做到这一点的建议?Java 中有哪些可用的库?你推荐我检查的示例项目?您推荐的论文?

Does anyone have recommendations for how to do this? Any available libraries in Java? Sample projects you recommend I check out? Papers you recommend?

太阳点是一个 Java 平台,可帮助您快速制作系统原型.它使用 Java 编程,可以将命令转发回连接到计算机的基站.如果我需要解释硬件的工作原理,请发表评论.

The sun spot is a Java platform to help you make quick prototypes of systems. It is programmed using Java and can relay commands back to a base station attached to a computer. If I need to explain how the hardware works more leave a comment.

推荐答案

加速度计将记录由重力引起的恒定加速度,加上设备受到的任何加速度以及噪音.

The accelerometers will be registering a constant acceleration due to gravity, plus any acceleration the device is subjected to by the user, plus noise.

您需要对样本进行低通滤波,以尽可能多地去除不相关的噪声.最糟糕的噪音通常会比任何可能的人为加速度更高.

You will need to low pass filter the samples to get rid of as much irrelevant noise as you can. The worst of the noise will generally be higher frequency than any possible human-induced acceleration.

意识到当设备没有被用户加速时,唯一的力是由重力引起的,因此你可以推断其在空间中的姿态.而且,当总加速度从1g变化很大时,一定是由于用户加速了设备;通过减去上次已知的重力估计,您可以粗略估计用户加速设备的方向和速度,从而获得可以开始与已知手势列表进行匹配的数据.

Realise that when the device is not being accelerated by the user, the only force is due to gravity, and therefore you can deduce its attitude in space. Moreover, when the total acceleration varies greatly from 1g, it must be due to the user accelerating the device; by subtracting last known estimate of gravity, you can roughly estimate in what direction and by how much the user is accelerating the device, and so obtain data you can begin to match against a list of known gestures.

使用单个三轴加速度计,您可以检测当前的俯仰和滚转,以及设备在直线上的加速度.积分加速度减去重力将为您提供当前速度的估计值,但由于噪声,估计值会迅速偏离现实;您必须在手势之前/之间/期间对用户的行为做出假设,并引导他们通过您的 UI,提供设备未加速的点,您可以重置您的估计并可靠地估计重力方向.再次积分以找到位置根本不可能在任何有用的时间长度内提供可用的结果.

With a single three-axis accelerometer you can detect the current pitch and roll, and also acceleration of the device in a straight line. Integrating acceleration minus gravity will give you an estimate of current velocity, but the estimate will rapidly drift away from reality due to noise; you will have to make assumptions about the user's behaviour before / between / during gestures, and guide them through your UI, to provide points where the device is not being accelerated and you can reset your estimates and reliably estimate the direction of gravity. Integrating again to find position is unlikely to provide usable results over any useful length of time at all.

如果你有两个相距一定距离的三轴加速度计,或者一个和一些陀螺仪,你也可以检测设备的旋转(通过比较加速度矢量,或直接从陀螺仪检测);在几秒钟内对角动量进行积分会为您提供相对于您开始积分时的当前偏航的估计值,但这同样会迅速偏离真实情况.

If you have two three-axis accelerometers some distance apart, or one and some gyros, you can also detect rotation of the device (by comparing the acceleration vectors, or from the gyros directly); integrating angular momentum over a couple of seconds will give you an estimate of current yaw relative to that when you started integrating, but again this will drift out of true rapidly.

这篇关于如何使用加速度计进行手势识别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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