Depth image is plotted is small and reverse

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Depth image is plotted is small and reverse

prashanth
Hello All

I am trying rtabmap  for my customized stereo camera. i have a perfect depth image and rgb image from my camera.But when i try to plot it in rtab map the depth is reversed.The depth value of  0-255 is plotted has 255-0 in the first image.Any idea how to change the parameters will be really helpfull and the out put i got is really small in second image.Any idea will be really helpfull.
 

Reply | Threaded
Open this post in threaded view
|

Re: Depth image is plotted is small and reverse

matlabbe
Administrator
Hi,

Depth values are rendered as 255 (white) for close values to 0 (black) for far or invalid values. Your depth image should not have 0-255 values. Values should be in mm 16UC1 or meters 32FC1. Scale of the point cloud is also dependent on the calibration (e.g., the baseline in case of stereo).

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Depth image is plotted is small and reverse

prashanth
Hello Mathieu

I am using RGB D input for my project in rtab map.I see the depth image what we get from kinect and other depth images  are plotted with black(0) has nearest values and 65535 or 1023 has far  value.In my depth image the 0 is plotted has far and 65535 or 1023 is plotted has near due to this my point cloud is plotted in invert. can u please suggest me where in rtab map to change the values for plotting the depth image exactly in 3d.The reply will be really helpful to get me my output.
Reply | Threaded
Open this post in threaded view
|

Re: Depth image is plotted is small and reverse

matlabbe
Administrator
Hi,

The 3D point clouds are created using directly the values in the depth image (so 0 mm is close and 65535 mm is far). For the grayscale 2D image representation of the depth image in Qt interface, the conversion is done here (for the CV_16UC1 case).

cheers,
Mathieu