C# Kinect sdk 2.0与sdk 1.7
我编写了一个c#程序,与旧kinect一起工作。 我的图形库处理kinect。由于旧的Kinect不再正式销售,我现在将其更新为新的Kinect,使用Microsoft SDK2.0。对于我更新的库,我尽量保持大多数编码相同。 所以我可以发布一个更新库,而不是更新整个程序 我想知道的是,新的kinect深度数据是否仍然像在1.7 SDK中那样包含播放器数据?我使用以下方法执行了位掩码操作以删除该数据:C# Kinect sdk 2.0与sdk 1.7,c#,kinect,kinect-sdk,C#,Kinect,Kinect Sdk,我编写了一个c#程序,与旧kinect一起工作。 我的图形库处理kinect。由于旧的Kinect不再正式销售,我现在将其更新为新的Kinect,使用Microsoft SDK2.0。对于我更新的库,我尽量保持大多数编码相同。 所以我可以发布一个更新库,而不是更新整个程序 我想知道的是,新的kinect深度数据是否仍然像在1.7 SDK中那样包含播放器数据?我使用以下方法执行了位掩码操作以删除该数据: realDepth[i16] = (short)(realDepth[i16] >>
realDepth[i16] = (short)(realDepth[i16] >> DepthImageFrame.PlayerIndexBitmaskWidth);
如果还需要这个,我找不到任何关于原始深度格式的信息
旧的Kinect也有一些
- 距离未知
- 距离接近
- 相距遥远
它仍然提供此功能吗?在Microsoft Kinect SDK 2.0中,您不需要位掩码操作来获得正确的深度值 当您访问
DepthFrame
对象时,可以使用如下内容:
private void ProcessDepthFrame(DepthFrame frame)
{
int width = frame.FrameDescription.Width;
int height = frame.FrameDescription.Height;
ushort minDepth = frame.DepthMinReliableDistance;
ushort maxDepth = frame.DepthMaxReliableDistance;
ushort[] depthData = new ushort[width * height];
frame.CopyFrameDataToArray(depthData);
int colorIndex = 0;
for (int depthIndex = 0; depthIndex < depthData.Length; ++depthIndex)
{
ushort depth = depthData[depthIndex];
byte intensity = (byte)(depth >= minDepth && depth <= maxDepth ? depth : 0);
// Do what you want
}
}
private void ProcessDepthFrame(DepthFrame)
{
int width=frame.FrameDescription.width;
int height=frame.FrameDescription.height;
ushort minDepth=帧深度最小可靠距离;
ushort maxDepth=frame.DepthMaxReliableDistance;
ushort[]depthData=新的ushort[宽度*高度];
frame.CopyFrameDataToArray(深度数据);
int colorIndex=0;
对于(int-depthIndex=0;depthIndex 字节强度=(字节)(深度>=minDepth&&depth在Microsoft Kinect SDK 2.0中,不需要位掩码操作即可获得正确的深度值
当您访问DepthFrame
对象时,可以使用如下内容:
private void ProcessDepthFrame(DepthFrame frame)
{
int width = frame.FrameDescription.Width;
int height = frame.FrameDescription.Height;
ushort minDepth = frame.DepthMinReliableDistance;
ushort maxDepth = frame.DepthMaxReliableDistance;
ushort[] depthData = new ushort[width * height];
frame.CopyFrameDataToArray(depthData);
int colorIndex = 0;
for (int depthIndex = 0; depthIndex < depthData.Length; ++depthIndex)
{
ushort depth = depthData[depthIndex];
byte intensity = (byte)(depth >= minDepth && depth <= maxDepth ? depth : 0);
// Do what you want
}
}
private void ProcessDepthFrame(DepthFrame)
{
int width=frame.FrameDescription.width;
int height=frame.FrameDescription.height;
ushort minDepth=帧深度最小可靠距离;
ushort maxDepth=frame.DepthMaxReliableDistance;
ushort[]depthData=新的ushort[宽度*高度];
frame.CopyFrameDataToArray(深度数据);
int colorIndex=0;
对于(int-depthIndex=0;depthIndex=minDepth&&depth抱歉不在工作中(度假时阅读此内容),它是否真的做了minDepth和maxDepth所做的事情,我使用的代码与之类似,但尽管它无法从te摄像头中理解,它返回零抱歉不在工作中(度假时阅读此内容),它是否真的做了minDepth和maxDepth所做的事情,我使用了类似的代码,但它从te camera无法理解,它返回零