ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

That function is used only for depth images. For RGB/Mono, the cv::resize() function is used directly. For the depth case, we should not interpolate between pixels with depth difference above depthErrorRatio. For example, there is a pixel at 6 meters, the next one is at 50 meters, if you upsample by 4, you would get new pixels at 17, 28 and 38 meters between them, which is wrong. However, if there is a pixel at 49 meters and next one at 50 meters, you would accept interpolation 49.25, 49.50 and 49.75 meters.

In general, interpolating depth image is bad. It is used mainly in rtabmap just for the masking visual feature (opencv feature mask) which doesn't need to be super accurate, and never used to actually compute depth of a visual feature.