简体   繁体   English

如何获取Kinect中像素深度的X,Y坐标?

[英]How to get X, Y coordinates of the pixel depths in Kinect?

I have a Bitmap, and coordinates on it. 我有一个位图,并在其上进行协调。 And there depthData array, filled only by the values of depth. 并且有depthData数组,仅由depth的值填充。

How do I get the depth of the pixel in the coordinates X, Y Bitmap? 如何获得坐标X,Y位图中的像素深度?

For example: I have a rectangle, and its coordinates. 例如:我有一个矩形及其坐标。 How do I get deep inside reсtangle. 我如何深入了解内部纠缠。

Developing in the Kinect v2, I use the code below to get the x,y values. 在Kinect v2中进行开发,我使用下面的代码来获取x,y值。 desc is the DepthFrameDescription. desc是DepthFrameDescription。

var x = i % (int)desc.Width;
var y = i / (int)desc.Width;

Hope this could help you. 希望这可以对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM