2016-04-16 221 views
5

对于我的应用,我分析了Kinect v2的空间分辨率。Kinect v2:空间分辨率/深度分辨率/相机校准

为了分析空间分辨率,我记录了一个垂直和平面的平面到给定的距离,并将平面的深度图转换为点云。然后我通过计算欧几里德距离来比较一个点与他的邻居。

计算这种情况下的欧几里德距离(平面与kinect之间的距离为1米),点之间的分辨率接近3 mm。对于2米距离的飞机,我得到了高达3毫米的分辨率。

比较这与文献,我认为我的结果是相当糟糕的。

例如Yang等人得到了同为4米距离Kinect的一个一个平面平均厚4毫米(Evaluating and Improving the Depth Accuracy of Kinect for Windows v2

这里平面平面(2米的距离我的Kinect)我的点云实例解析:

Plane 2 meters to Kinect v2

任何人都对Kinect v2的空间分辨率或者为什么我的分辨率不好的想法做了一些观察?

在我看来,我认为在将我的深度图像转换为世界坐标时发生了错误。因此,这里的代码剪断:

%normalize image points by multiply inverse of K 
u_n=(u(:)-c_x)/f_x; 
v_n=(v(:)-c_y)/f_y; 
% u,v are uv-coordinates of my depth image 

%calc radial distortion 
r=sqrt(power(u_n,2)+power(v_n,2)); 
radial_distortion =1.0 + radial2nd * power(r,2) + radial4nd * power(r,4) + radial6nd * power(r,6); 

%apply radial distortion to uv-coordinates 
u_dis=u_n(:).*radial_distortion; 
v_dis=v_n(:).*radial_distortion; 

%apply cameramatrix to get undistorted depth point 
x_depth=u_dis*f_x+c_x; 
y_depth=v_dis*f_y+c_y; 

%convert 2D to 3D 
X=((x_depth(:)-c_x).*d(:))./f_x; 
Y=((y_depth(:)-c_y).*d(:))./f_y; 
Z=d; % d is the given depth value at (u,v) 

编辑:到目前为止,我也试图去直接从coordinate mapper包括点,无需校准步骤。

有关分辨率的结果仍然相同。有没有人有任何比较结果?

回答

4

@JavaNullPointer,使用Kinect v2将信息转换为3D的方式尚未被社区所接受。

而且那些你正在计算是非常以下尼古拉斯·伯勒斯的工作 - http://burrus.name/index.php/Research/KinectCalibration

对于Kinect的V2,没有仍对如何这个问题,以及很多信息。不过,新的SDK功能允许您保存Kinect校准表格空间。

的过程很简单:

1 - 您需要保存该表信息 - 一旦你将这些信息保存到文件https://msdn.microsoft.com/en-us/library/windowspreview.kinect.coordinatemapper.getdepthframetocameraspacetable.aspx

2-,那么你的确可以将您深度点(2D)进入3D相机空间。

这里去的代码,你应该使用:

// Get the depth for this pixel 
ushort depth = frameData[y * depthFrameDescription.Height + x]; 

// Get the value from the x/y table 
PointF lutValue = this.cameraSpaceTable[y * depthFrameDescription.Height + x]; 

// create the CameraSpacePoint for this pixel 
// values are in meters so convert 
CameraSpacePoint csp = new CameraSpacePoint(); 
csp.X = lutValue.X * depth * 0.001f; 
csp.Y = lutValue.Y * depth * 0.001f; 
csp.Z = depth * 0.001f; 

同时,采取了很多的:

https://msdn.microsoft.com/en-us/library/windowspreview.kinect.coordinatemapper.mapdepthframetocameraspace.aspx

https://msdn.microsoft.com/en-us/library/windowspreview.kinect.coordinatemapper.mapdepthframetocameraspaceusingibuffer.aspx

此外,深度,红外线,bodyindex流都是al签署(相同的决议),因此你真的这个。如果您还需要获取色彩点,则还应保存该映射。所有这些信息都可以在Kinect MSDN 2.0网站上找到。

我希望你能保存这些信息,然后重新做这个空间分辨率测试。

+0

我也想过保存cameraSpaceTable的方法!但我放弃了它,因为我已经读过Kinect v2的出厂校准不太好。所以我想做我自己的校准并将其添加到我的应用程序中。这就是为什么我用更复杂的方式来计算我的世界坐标! – JavaNullPointer

+1

你是从哪里读的? – 16per9

+0

标题:使用Kinect v2传感器进行近距离三维建模的第一次体验。作者:Lachat,E. Macher,H .;链接:http://www.int-arch-photogramm-remote-sens-spatial-inf-sci.net/XL-5-W4/93/2015/isprsarchives-XL-5-W4-93-2015.pdf – JavaNullPointer