C#和Kinect手势时间 [英] C# and Kinect gesture time

查看:129
本文介绍了C#和Kinect手势时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用Kinect SDK在C#中开发一些手势识别.到目前为止,唯一的问题是手势识别是即时的.

I am currently developing some gesture recognition in C# with Kinect SDK.So far so good, the only problem being that the gesture recognition is instant.

例如:当我将手举过头顶时,我正在使用messageBox进行公告.如果我握住手2秒钟,它将打开数十个messageBox来宣布手势.

For example: i am using a messageBox to announce when i raise my hand above my head.And if i hold the hand for 2 seconds, it will open dozens of messageBoxes announcing the gesture.

有办法阻止这种情况吗?

Is there a way to stop this?

推荐答案

达伦说的是实话.您需要实现一个停止机制. Kinect一直在实时分析所有内容,因此当您的手在上面时,它就会一直存在:)因此,每次触发您的动作时.按Atuls所说做,或按我喜欢的做. 我更喜欢创建一个布尔标志.默认值为false.触发动作后,我将其设置为true,并且每次我t trigger the action again until the flag is false. In your example I would set it to true when I raise my hand above the head and set it to false when I have my hand below my head. That way I只会触发一次动作

Darren says the truth. You need to implement a stop mechanism. Kinect is analyzing everything in real time whole time so when your hand is above it is there until it is there :) So every time your action is triggered. Do as Atuls said OR do as I prefer. I prefere creating a bool flag. Default value is false. When my action is triggered I set it to true and I dont trigger the action again until the flag is false. In your example I would set it to true when I raise my hand above the head and set it to false when I have my hand below my head. That way Ill trigger the action only once every time i need it

这篇关于C#和Kinect手势时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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