使用Kinect交互进行事件或轮询 [英] Events or Polling with Kinect Interaction

查看:115
本文介绍了使用Kinect交互进行事件或轮询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试将我的Kinect交互代码添加到使用Kinect其他功能的旧项目中。

I'm trying to add my Kinect Interaction code into an old project that uses other features of Kinect.

问题是我的旧项目是通过Polling编程的,我在每个网页和文档中都看到Kinect Interaction Toolkits的功能是用事件编写的。

The problem is that my old project is programmed by Polling, and I've seen in every webpage and documentation that Kinect Interaction Toolkits features are programmed with Events.

这个事实会让我的实施起来非常困难。是否必须使用Events进行编程?或者Kinect Interactions是否也允许通过轮询进行编程?

That fact would make my implementation to be very difficult. Is it mandatory to program with Events? Or is Kinect Interactions also allowed to be programmed by polling?

谢谢。

推荐答案

只要您只向交互库提供有效的帧,就可以使用轮询模型。请记住,当您尝试处理手状态事件时,轮询将阻止您的线程。可以使用超时0,但可能需要一些
的试验和错误,以确保它能够满足您的需要。
You can use a polling model as long as you are providing only valid frames to the interactions library. Keep in mind, polling will block your thread when you are trying to process the hand state event. A timeout of 0 can be used, but may take a bit of trial and error to ensure it works as you need it.


这篇关于使用Kinect交互进行事件或轮询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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