Kinect深度从毫米到像素的转换 [英] Kinect depth conversion from mm to pixels

查看:195
本文介绍了Kinect深度从毫米到像素的转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道从kinect for xbox360拍摄的图像中每毫米深度值对应多少个像素吗? 我正在使用标准分辨率和设置...

Does anybody knows how many pixels correspond for each millimeter of depth value in images taken from kinect for xbox360? I'm using the standard resolution and settings...

谢谢!

推荐答案

1个像素对应于多个限制器,该限制器取决于该像素的深度值(即其灰度等级).

1 pixel corresponds to a number of millimiters that depends on the depth value of that pixels (i.e. its level of gray).

获取深度图像中两个像素之间距离的最简单方法是,将这些像素(在 Depth Space 中表示)转换为现实世界坐标(即在 Skeleton Space中) ) 1 .然后,您可以使用常见的欧几里德距离公式来计算这些点之间的距离.

The simplest way you can get the distance between two pixels in a depth image is to convert those pixels (which are expressed in Depth Space) in real world coordinates (i.e. in Skeleton Space)1. Then, you can calculate the distance between those points using a common euclidean distance formula.

因此,如果您有两个像素P 1 和P 2 ,其深度值 分别等于D 1 和D 2 ,您可以执行以下操作:

So if you have two pixels P1 and P2, with depth values respectively equal to D1 and D2, you can proceed as follows:

DepthImagePoint dip1 = new DepthImagePoint();
dip1.X = P1.x;
dip1.Y = P1.y;
dip1.Depth = D1;
DepthImagePoint dip2 = new DepthImagePoint();
dip2.X = P2.x;
dip2.Y = P2.y;
dip2.Depth = D2;
SkeletonPoint sp1 = CoordinateMapper.MapDepthPointToSkeletonPoint(DepthImageFormat.Resolution640x480Fps30, dip1);
SkeletonPoint sp2 = CoordinateMapper.MapDepthPointToSkeletonPoint(DepthImageFormat.Resolution640x480Fps30, dip2);

double dist = euclideanDistance(sp1, sp2);


1 有关更多信息,请参见坐标空间.


1 See Coordinate Spaces for more information.

这篇关于Kinect深度从毫米到像素的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆