本文介绍了智能手机的加速计的手势algorightms的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发适用于iPhone和Android平台简单的移动应用程序,我找的算法,让我来触发某些事件(功能),当我们发现某个手势使用内部加速度计。我的工作与PhoneGap的,利用HTML5和JavaScript从加速度计在pre设置的时间间隔读取三个坐标(X,Y和Z)(例如每0.04秒)。

I am developing simple mobile app for iPhone and Android platform and I am looking for algorithms that would allow me to trigger certain events (functions) when we detect a certain gesture using internal accelerometer. I work with Phonegap that utilizes HTML5 and javascript which reads three coordinates (x,y and z) from accelerometer on pre-set interval (e.g. every 0.04 sec.).

我写了一个简单的功能,可检测震动运动和它的作品相当不错,但它是原语(只侦测到震动,而不是方向) - 我想发现一些其他的手势,如: - 倾斜(向左/右) - /动摇下跌 - 摇左/右 - 圆周运动 - 颠倒 - 等...

I wrote a simple function that detects a shaking motion and it works quite fine but it is primitive (it only detects shaking, not the direction) - and I want to detect some other gestures such as:- tilt (to the left/right)- shake up/down- shake left/right- circular motion- turn upside down- etc....

没有任何人有算法(或至少是数学公式/函数)可以计算(检测)这种手势的基础上输入值我有(X,Y,Z和时间间隔为每个调用)?

Does anybody have algorithms (or at least mathematical formulas/functions) that can calculate (detect) this kind of gestures based on input values I have (x,y,z and time interval for each call)?

我要寻找任何code任何编程语言(我将它改写成JavaScript我自己。在此先感谢!

I am looking for any code in any programming language (I will rewrite it to javascript myself. Thanks in advance!

推荐答案

动态时间规整(DTW)做得很好,不过,我会建议使用快速动态时间规整(快速DTW)。特别是对于移动场景,FastDTW真的是适用!对于一个详细的版本,看看这个研究论文: http://cs.fit埃杜/〜PKC /纸/ tdm04.pdf

Dynamic Time Warping (DTW) does a good job, however I would recommend using Fast Dynamic Time Warping (Fast DTW). Especially for mobile scenarios, FastDTW is really applicable!For a detailed version, take a look at this research paper: http://cs.fit.edu/~pkc/papers/tdm04.pdf

编辑:前一段时间,我写我的论文对3D手势控制的智能家居环境的设备。看到它在行动这里(有一个链接到PDF,太)。我用FastDTW识别手势在iPhone上。

Some time ago, I wrote my thesis about 3D gestures for controlling devices in a smart-home setting. See it in action here (there is a link to the PDF, too). I used FastDTW for recognizing gestures on an iPhone.

这篇关于智能手机的加速计的手势algorightms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-28 18:02