kinect 深度数据的获取

这篇博客由小游撰写,详细介绍了如何通过Kinect设备获取深度数据,是个人博客文档的备份。
摘要由CSDN通过智能技术生成

本文档为个人博客文档系统的备份版本、作者:小游、作者博客:点击访问

这里只是简单的注释了一下

//------------------------------------------------------------------------------
// <copyright file="MainWindow.xaml.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

namespace Microsoft.Samples.Kinect.DepthBasics
{
   
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Globalization;
    using System.IO;
    using System.Windows;
    using System.Windows.Media;
    using System.Windows.Media.Imaging;
    using Microsoft.Kinect;

    /// <summary>
    /// Interaction logic for MainWindow
    /// </summary>
    public partial class MainWindow : Window, INotifyPropertyChanged
    {
   
        /// <summary>
        /// Map depth range to byte range
        /// </summary>
        /// map的深度数据
        private const int MapDepthToByte = 8000 / 256;
      
        /// <summary>
        /// Active Kinect sensor
        /// </summary>
        /// 传感器
        private KinectSensor kinectSensor = null;

        /// <summary>
        /// Reader for depth frames
        /// </summary>
        /// 深度框架的
        private DepthFrameReader depthFrameReader = null;

        /// <summary>
        /// Description of the data contained in the depth frame
        /// </summary>
        /// 色彩深度数据
        private FrameDescription depthFrameDescription = null;
          
        /// <summary>
        /// Bitmap to display
        /// </summary>
        /// bitmap对象
        private WriteableBitmap depthBitmap = null;

        /// <summary>
        /// Intermediate storage for frame data converted to color
        /// </summary>
        /// 深度像素数据
        private byte[] depthPixels = null;

        /// <summary>
        /// Current status text to display
        /// </summary>
        private string statusText = null;

        /// <summary>
        /// Initializes a new instance of the MainWindow class.
        /// </summary>
        public MainWindow()
        {
   
            // get the kinectSensor object
            //获取传感器
            this.kinectSensor = KinectSensor.GetDefault();

            // open the reader for the depth frames
            //获取深度传感器对象
            this.depthFrameReader = this.kinectSensor.DepthFrameSource.OpenReader();

            // wire handler for frame arrival
            //深度传感器处理函数
            this.depthFrameReader.FrameArrived += this.Reader_FrameArrived;

            // get FrameDescription from DepthFrameSource
            //深度数据
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值