FREENECT_DEPTH_register对libfreenect无效 [英] FREENECT_DEPTH_REGISTERED has no effect with libfreenect

查看:98
本文介绍了FREENECT_DEPTH_register对libfreenect无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在libfreenect驱动程序上玩Kinect(原始Xbox版本)(顺便说一下,我在Ubuntu 12.04上).我已经从git中克隆了最新版本,并按照此处的说明进行了手动安装: http://openkinect .org/wiki/Getting_Started#Ubuntu_Manual_Install

I'm playing around with a Kinect (the original Xbox version) on the libfreenect driver (I'm on Ubuntu 12.04 by the way). I have cloned the most recent version from git and installed it manually, as per the instructions here: http://openkinect.org/wiki/Getting_Started#Ubuntu_Manual_Install

我想访问注册的深度值.据我了解,Kinect已经过工厂校准,并且有一个查找表,将深度像素与适当的RGB像素匹配.

I would like to access the registered depth values. As far as I understand, the Kinect is factory calibrated, and there is a lookup-table matching depth pixels to the proper RGB pixels.

我可以很好地打开Kinect并检索原始的11位深度数据.对于1到7.5米的距离,这使我的值在730到1045之间非线性地变化.

I can open the Kinect just fine and retrieve the raw 11 bit depth data. That gives me values ranging non-linearly from around 730 to 1045 for distances from 1 to 7.5 meter.

运行device->setDepthFormat(FREENECT_DEPTH_MM);使Kinect的输出距离以毫米为单位,因此setDepthFormat似乎可以工作.

Running device->setDepthFormat(FREENECT_DEPTH_MM); makes the Kinect output distances in mm, so setDepthFormat seems to work.

运行device->setDepthFormat(FREENECT_DEPTH_REGISTERED);似乎没有任何效果,因为仅输出原始深度值.我想念什么?

Running device->setDepthFormat(FREENECT_DEPTH_REGISTERED); seems to have no effect, as only the raw depth values are output. What am I missing?

推荐答案

FREENECT_DEPTH_MMFREENECT_DEPTH_REGISTERED都应返回以毫米为单位的深度.区别在于后者是对齐的,以匹配RGB视频图像.

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.

libfreenect.h中的freenect_depth_format枚举提供以下选项:

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 */

来源: libfrenect git问题页面

配准变换生成深度图像,就好像RGB和IR摄像机物理上位于同一位置,并且不偏移2.5cm.如果您对详细信息感到好奇,请看一下源代码.

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.

来源: libfreenect源代码

这篇关于FREENECT_DEPTH_register对libfreenect无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆