什么是旧的NuiApi.h的等价物 [英] What is the equivalent of the old NuiApi.h

查看:107
本文介绍了什么是旧的NuiApi.h的等价物的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我使用Visual Studio 2010制作了一个使用Xbox 360 Kinect的工作程序。现在 我试图将代码放到Visual Studio 2013上并计划使用更新的Xbox One传感器。我已经下载了SDK 2.0。现在当我运行程序时 - 显然
不起作用。这似乎是因为我使用了NuiApi.h,NuiImageCamera.h,NuiSkeleton.h,NuiSensor.h。与此相关的所有内容现在都不再有效了。


所以像初始化一样。


HRESULT hr;


hr = NuiInitialize(NUI_INITIALIZE_FLAG_USES_SKELETON ......)


等 - >还有更多的Nui,NUI_SKELETON_FRAME,列表继续


所以对于这个新的SDK 2.0 - 我在include文件夹中看不到这个NuiApi。


那相当于什么?我怎样才能完成这项工作,我所看到的就像Kinect.h或Kinect.face.h


如何使程序完成以前的工作。


提前致谢












解决方案

查看SDK中提供的BodyBasics示例:

 HRESULT HRESULT CBodyBasics :: InitializeDefaultSensor()
{
HRESULT小时;

hr = GetDefaultKinectSensor(& m_pKinectSensor);
if(FAILED(hr))
{
return hr;
}

if(m_pKinectSensor)
{
//初始化Kinect并获取坐标映射器和正文阅读器
IBodyFrameSource * pBodyFrameSource = NULL;

hr = m_pKinectSensor-> Open();
...
}



Hi,

I had a working program with the Xbox 360 Kinect using Visual Studio 2010. Now  I have tried to put the code over to Visual Studio 2013 and plan to use the Newer Xbox One sensor. I have downloaded the SDK 2.0. Now when I run the program - it obviously does not work. This seems to be due to the fact that I used the NuiApi.h, NuiImageCamera.h,NuiSkeleton.h, NuiSensor.h. Everything associated with this, is now no longer working.

so things like initialising.

HRESULT hr;

hr = NuiInitialize(NUI_INITIALIZE_FLAG_USES_SKELETON......)

etc - > there is so much more of the Nui, NUI_SKELETON_FRAME, list goes on

So for this new SDK 2.0 - there is none of this NuiApi that I can see in the include folder.

So what is the equivalent ? How can I make this work, all I see are things like Kinect.h or Kinect.face.h

How can I make the program do what it used to.

Thanks in advance

解决方案

Review the BodyBasics samples provided in the SDK:

HRESULT HRESULT CBodyBasics::InitializeDefaultSensor()
{
    HRESULT hr;

    hr = GetDefaultKinectSensor(&m_pKinectSensor);
    if (FAILED(hr))
    {
        return hr;
    }

    if (m_pKinectSensor)
    {
        // Initialize the Kinect and get coordinate mapper and the body reader
        IBodyFrameSource* pBodyFrameSource = NULL;

        hr = m_pKinectSensor->Open();
...
}


这篇关于什么是旧的NuiApi.h的等价物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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