当前位置:   article > 正文

Unity Kinect Azure使用_unity如何使用azure kinect

unity如何使用azure kinect

一:官方SDK和文档地址。

Azure Kinect DK 文档 | Microsoft Learn

1:Using Azure Kinect SDK

https://github.com/microsoft/Azure-Kinect-Sensor-SDK/blob/develop/docs/usage.md

2:Azure Kinect Body Tracking

Download Azure Kinect Body Tracking SDK v1.1.2 from Official Microsoft Download Center

3:更新固件

Azure Kinect 固件工具 | Microsoft Learn

4:Azure Kinect Examples for Unity

Azure Kinect Examples for Unity | Integration | Unity Asset Store

二:Kinect显示视频。

1:添加空白组件,添加KinectManger脚本。

三:显示Kinect是否初始化。


<code class="language-plaintext hljs"> bool isIni = KinectManager.Instance.IsInitialized();</code>

四:Kinect显示图片。


<code class="language-plaintext hljs">using com.rfilkov.kinect;
using Intel.RealSense;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UseKinectManger : MonoBehaviour
{
    public RawImage pic;


    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
        bool isIni = KinectManager.Instance.IsInitialized();
        if (isIni)
        {
            Texture kinectPic = KinectManager.Instance.GetColorImageTex(0);
            pic.texture= kinectPic;
        }
        
    }
}
</code>

图片是上下颠倒的话,将RawImage Scale 置为-1。

五:Kinect显示深度数据。


<code class="language-plaintext hljs">using com.rfilkov.kinect;
using Intel.RealSense;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class UseKinectManger : MonoBehaviour
{
    public RawImage pic;


    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
        bool isIni = KinectManager.Instance.IsInitialized();
        if (isIni)
        {
            Texture kinectPic = KinectManager.Instance.GetDepthImageTex(0);
            pic.texture= kinectPic;
        }
        
    }
}

</code>

教程

1:Azure Kinect微软摄像头Unity开发小结

Azure Kinect微软摄像头Unity开发小结_azure kinect examples for unity-CSDN博客

2:Unity AzureKinect所有Demo整理分析(持续更新中)

Unity AzureKinect所有Demo整理分析(持续更新中)_azure kinect examples for unity-CSDN博客

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/从前慢现在也慢/article/detail/135595
推荐阅读
相关标签
  

闽ICP备14008679号