FREENECT_DEPTH_REGISTERED has no effect with libfreenect

此生再无相见时 提交于 2019-12-03 08:21:16

Both FREENECT_DEPTH_MM and FREENECT_DEPTH_REGISTERED should return depth in mm. The difference is that the latter is aligned to match the RGB video image.

The freenect_depth_format enum in libfreenect.h gives these options:

FREENECT_DEPTH_11BIT = 0, /**< 11 bit depth information in one uint16_t/pixel */
FREENECT_DEPTH_10BIT = 1, /**< 10 bit depth information in one uint16_t/pixel */
FREENECT_DEPTH_11BIT_PACKED = 2, /**< 11 bit packed depth information */
FREENECT_DEPTH_10BIT_PACKED = 3, /**< 10 bit packed depth information */
FREENECT_DEPTH_REGISTERED = 4, /**< processed depth data in mm, aligned to 640x480 RGB */
FREENECT_DEPTH_MM = 5, /**< depth to each pixel in mm, but left unaligned to RGB image */
FREENECT_DEPTH_DUMMY = 2147483647, /**< Dummy value to force enum to be 32 bits wide */

Source: the libfrenect git issues page

The registration transformation produces a depth image as if the RGB and IR cameras were physically situated in the same place, and not offset by 2.5cm. Have a peek at the source code if you're curious about the details.

Source: libfreenect source code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!