kinect运动 [英] kinect motor movement
本文介绍了kinect运动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何根据用户的身高和与他所在设备的距离动态地上下移动Kinect电机的代码
How do you move the Kinect motor up and down in code dynamically depending upon the user height and distance from the device he is present
Any C# examples out there?
推荐答案
您可能应该将整个程序包装在try-catch中,因为至少在这里将ElevationAngle设置为经常会抛出异常. br/>
例如
You should probably wrap the entire thing in a try-catch since at least here setting the ElevationAngle to often spits out an Exception.
for example
using System;
using Microsoft.Research.Kinect.Nui;
namespace Kinect.Extensions
{
public static class CameraExtensions
{
public static bool TrySetAngle(this Camera camera, int angle)
{
try
{
camera.ElevationAngle = angle;
return true;
}
catch (Exception e)
{
return false;
}
}
}
}
希望能给你一个主意
还是CP的此示例代码将指导您
Kinect –入门–成为不可思议的绿巨人 [ ^ ]
Hope it will give you an idea
Or this Sample Code From CP Will Guide You
Kinect – Getting Started – Become The Incredible Hulk[^]
这篇关于kinect运动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文