Unity Kinect Azure使用

该文详细介绍了如何利用官方SDK在Unity中设置和使用AzureKinect,包括显示视频、检查设备初始化状态、显示图片和深度数据。同时,提供了UnityAssetStore上的AzureKinect示例以及相关的开发小结和Demo分析。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一:官方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是否初始化。

 bool isIni = KinectManager.Instance.IsInitialized();

四:Kinect显示图片。

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;
        }
        
    }
}

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

五:Kinect显示深度数据。

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;
        }
        
    }
}

教程

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博客

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值