使用Kinect交互进行事件或轮询

编程入门 行业动态 更新时间:2024-10-09 16:26:38
本文介绍了使用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交互进行事件或轮询

本文发布于:2023-11-28 08:20:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1641645.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:事件   Kinect

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!