问题描述
有人知道从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中) ).然后,您可以使用常见的欧几里德距离公式来计算这些点之间的距离.
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). Then, you can calculate the distance between those points using a common euclidean distance formula.
因此,如果您有两个像素P 和P ,其深度值分别等于D 和D ,您可以执行以下操作:
So if you have two pixels P and P, with depth valuesrespectively equal to D and D, 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);
有关更多信息,请参见坐标空间.
See Coordinate Spaces for more information.
这篇关于Kinect深度从毫米到像素的转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!