运动跟踪 [英] Motion tracking

查看:88
本文介绍了运动跟踪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!

我最近开始研究KinectExplorer WPF示例,我似乎无法为我工作。

I recently started to work on the KinectExplorer WPF sample, and I can't seem to get something to work for me.

我只是想在"KinectWindow"中设置一个textBox。它实时显示左手腕的X,Y,Z坐标。

I'm simply trying to have a textBox in the "KinectWindow" that shows in real time the X,Y,Z coordinates of the left hand wrist.

我在SkeletonBasics样本中这样做了(这是在DrawBonesAndJoints函数中添加的):

I did it in the SkeletonBasics sample like so (this was added within the DrawBonesAndJoints function):

Wrist = skeleton.Joints[JointType.WristLeft];

            this.textBox2.Text = "x=" + (Wrist.Position.X * 100).ToString() +
                            "   y=" + (Wrist.Position.Y * 100).ToString() +
                            "   z=" + (Wrist.Position.Z * 100).ToString();

当然我也添加了这一行:

Of course I added this line as well:

public Joint Wrist;

在SkeletonBasics示例中,它完美无缺。但是,当涉及到KinectExplorer示例时,我遇到了一堆错误。我试图调整一些东西然后它只是隐藏或关闭DepthTreatment并因某种原因禁用了骨架。

In the SkeletonBasics sample, it worked flawlessly. However, I get a bunch of errors when it comes to the KinectExplorer sample. I tried to tweak some stuff and then it just hid or turned off the DepthTreatment and disabled the skeleton for some reason.

所以回到我的问题:我如何设法在"KineckWindow"中显示左手腕的当前X,Y,Z坐标的文本框。窗口?

So back to my question: How do I manage to have a textBox displaying the currect X,Y,Z coordinates of the left hand wrist in the "KineckWindow" window?

提前谢谢你,这对我来说真的很重要!

Thank you so much in advance, this is truly important to me!

推荐答案

Kinect Expolorer主应用程序与实际处理骨架跟踪可视化工具的WpfViewers分开。  您可以在KinectSkeletonViewer.xaml / .cs文件中创建文本框,这应该有效。否则,你可能需要
在控件上创建一个可绑定属性,这样每次更新你的手腕值时,主用户界面上的更新都会生效。 
Kinect Expolorer main application is separate from the WpfViewers that actually handle the visualizers for the skeleton tracking. You can create the textbox in the KinectSkeletonViewer.xaml/.cs file and that should work. Otherwise, you probably will need to create a bindable property on the control so that any time you update your Wrist value, the update on the main UI will take effect. 


这篇关于运动跟踪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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