how to read disparity map instead of depth from kinect

1,227 views
Skip to first unread message

stereo

unread,
Mar 15, 2012, 7:27:39 AM3/15/12
to rgbdemo
Hi all,
I would like to get the raw disparity information from the kinect and
store it as pgm big endian format.

Right now I am using rgbviewer from rgbdemo to capture both depth and
color data. But I am not sure whether the depth information provided
by the application is in the form of disparity or depth (in mm).

I am new to kinect/opencv/openni and hence kindly help me with this.

Thanks

Igor Barros Barbosa

unread,
Mar 15, 2012, 7:31:09 AM3/15/12
to rgb...@googlegroups.com
"A DepthGenerator node generates a depth map as an array of pixels, where each pixel is a depth value representing a distance from the sensor in millimeters. "

http://openni.org/docs2/Tutorial/smpl_simple_view.html


01001001011001110110111101110010
I.

stereo

unread,
Mar 15, 2012, 10:44:12 AM3/15/12
to rgbdemo
Thanks Barros for your reply.
It looks like I have to convert the depth values in mm to disparity
data.
Following the link(https://groups.google.com/group/openkinect/
browse_thread/thread/31351846fd33c78/e98a94ac605b9f21?
lnk=gst&q=stephane&pli=1)
is it possible to convert the depth values to disparity? Are the
constants used in the computation still valid. Kindly advice.
(or)
Are is there any low level api which kinect exposes to retrieve the
disparity map?

Thanks

On Mar 15, 7:31 pm, Igor Barros Barbosa <igo...@gmail.com> wrote:
> "A DepthGenerator node generates a depth map as an array of pixels, where
> each pixel is a depth value representing a distance from the sensor in
> millimeters. "
>
> http://openni.org/docs2/Tutorial/smpl_simple_view.html
>
> *01001001011001110110111101110010*

Igor Barros Barbosa

unread,
Mar 15, 2012, 11:29:03 AM3/15/12
to rgb...@googlegroups.com
If the disparity is what you need you can try to use Opencv 2.3.1. It has an option to produce disparity map using Openni.
http://opencv.itseez.com/doc/user_guide/ug_highgui.html

Cheers
01001001011001110110111101110010

李培

unread,
Jan 21, 2016, 11:33:13 PM1/21/16
to rgbdemo
Hi stereo,
I have the same problem with you when I do the Kinect V2 calibration,I have got the depth(in mm),using the Kinect SDKv2. I want to convert the depth into disparity,  but what is the formula between disparity and depth? what is your method to solve the problem ? thanks!

在 2012年3月15日星期四 UTC+8下午7:27:39,stereo写道:
Reply all
Reply to author
Forward
0 new messages