English 中文(简体)
深入细化数据
原标题:Working with depth data - Kinect
  • 时间:2011-11-10 17:32:58
  •  标签:
  • c#
  • kinect

我刚刚开始通过一些快速的开端录像了解Kinect,并试图用深入的数据来制定该守则。

However, I am not able to understand how the distance is being calculated using bit-shifting and various other formulas that are being employed to calculate other stuff too while working with this depth data.

http://channel9.msdn.com/Series/KinectSDKickstarts/Working-with-Depth-Data

Are these the particulars which are Kinect-specifics explained in the documentation etc.? Any help would be appreciated.

Thanks

最佳回答

Pixel depth

当你没有为检测参与者而设的镜子时,它只是一阵 by,有两条 by是单一深度测量。

因此,就象16幅色图一样,每16个比方代表深度,而不是肤色。

如果阵列是假设的2x2 pixel深度图像,那么你可以看到:[0x12 0x34 0x56 0x78 0x91 0x23 0x45 0x67],这代表以下四个图子:

AB
CD

A = 0x34 << 8 + 0x12
B = 0x78 << 8 + 0x56
C = 0x23 << 8 + 0x91
D = 0x67 << 8 + 0x45

<代码><< 8 简单地将斜体移至16倍的八分位。 这与将其乘以256。 整个16个轨道编号为0x3412, 0x7856, 0x2391, 0x6745。 相反,你可以做A = 0x34 * 256 + 0x12。 简言之,我说的是329件物品和456 000件物品。 如果我拥有这些物品,我可以把456件增加到1 000件,并增加329件,使项目总数增加。 旁观者把全部数字分成两部分,你只得加一。 我可以“临时”将456人推至左边,由3名零数组成,与乘数1 000人相同。 然后是456 000人。 因此,轮班和倍增等于10美元。 在计算机中,2项总金额相同——8项比值为256项,因此乘数为256项,与8项差幅相同。

这将是你的四位六位深度图象,每张画出16个比数就是该图纸的深度。

Player depth

当你选择显示参与者数据时,它就变得更令人感兴趣。 整个16个轨道数的下三个参数告诉你,人数是其中一部分。

简化情况,无视它们用来获取其余13个深度数据的复杂方法,也只是上述方法,并偷走了以下3个轨道:

A = 0x34 << 8 + 0x12
B = 0x78 << 8 + 0x56
C = 0x23 << 8 + 0x91
D = 0x67 << 8 + 0x45

Ap = A % 8
Bp = B % 8
Cp = C % 8
Dp = D % 8

A = A / 8
B = B / 8
C = C / 8
D = D / 8

如今,甲型六氯环己烷已进入A角和深度。 <>%>> 接获了该司的其余部分——因此为A,将其分成8个,其余为参与者。 该司的结果是深度,其余部分是参与者,因此A现在含有深度,因为A=A/8将参与者排除在外。

如果你不需要参与者的支持,至少是在你们开始发展的时候,就能够做到这一点,并公正使用第一种方法。 如果你确实需要参与者的支持,这是获得支持的许多途径之一。 方法较快,但汇编者通常将上述司和其余(Modulus)业务转化为更有效的双向逻辑操作,因此,一般而言,你不需要担心。

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签