本文介绍了运用体态的点云Kinect的SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提出一个程序的SDK,在检测到用户时,该方案利用了他们遵循的骨架。我最近看到一个游戏广告在我的Xbox,,我可以创建点云,但仍然围绕着人的身体不能收成。

Using this site, I can create point clouds, but still can't crop around the body of the person.

推荐答案

它看起来并不像他们展示一个完整的点云,而是一个蓝色阴影强度图。这可能与来自Kinect的深度图像用于Windows SDK来完成。
你所寻找的是播放器的索引。这是在深度图像的每个像素的提供的比特。为了让玩家指数位,你必须也使您的初始化代码骨骼流。

It doesn't look like they are displaying a complete point cloud but rather a blue shaded intensity map. This could be done with the depth image from the Kinect for Windows sdk.What you are looking for is the player index. This is a provided bit in each pixel of the depth image. In order to get the player index bit you have to also enable the skeletal stream in your initialization code.

因此​​,这是我会怎么做。我修改了Kinect的Windows SDK的一个快速入门发现加载它,并进行以下更改:

So this is how I would do it. I am modifying one of the Kinect for Windows SDK quickstarts found here load it up and make the following changes:

//Change image type to BGRA32
image1.Source =
                BitmapSource.Create(depthFrame.Width, depthFrame.Height,
                96, 96, PixelFormats.Bgra32, null, pixels, stride);

        //hardcoded locations to Blue, Green, Red, Alpha (BGRA) index positions
        const int BlueIndex = 0;
        const int GreenIndex = 1;
        const int RedIndex = 2;
        const int AlphaIndex = 3;

//get player and depth at pixel
int player = rawDepthData[depthIndex] & DepthImageFrame.PlayerIndexBitmask;
int depth = rawDepthData[depthIndex] >> DepthImageFrame.PlayerIndexBitmaskWidth;

//check each pixel for player, if player is blue intensity.

            if (player > 0)
            {
                pixels[colorIndex + BlueIndex] = 255;
                pixels[colorIndex + GreenIndex] = intensity;
                pixels[colorIndex + RedIndex] = intensity;
                pixels[colorIndex + AlphaIndex] = 100;

            }
            else
            {
                //if not player make black and transparent
                pixels[colorIndex + BlueIndex] = 000;
                pixels[colorIndex + GreenIndex] = 000;
                pixels[colorIndex + RedIndex] = 000;
                pixels[colorIndex + AlphaIndex] = 0;
            }



我喜欢用测试的颜色,因为它仍然为您提供了这个例子在右侧深度观察者。我重视以下运行的这种效果的图像:

I like using this example for testing the colors since it still provides you with the depth viewer on the right side. I have attached an image of this effect running below:

到左边的图像是强度地图略带色的像素级强度数据。

The image to the left is the intensity map with slightly colored pixel level intensity data.

希望帮助
大卫·贝茨

Hope that helpsDavid Bates

这篇关于运用体态的点云Kinect的SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 00:46