ros-perception / image_transport_plugins

A set of plugins for publishing and subscribing to sensor_msgs/Image topics in representations other than raw pixel data.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Disparity (inverse depth) can overflow

shuntaraw opened this issue · comments

In compressed_depth_image_transform for float depth maps, the disparity (i.e. inverse depth) can have the value greater than 65535 if the depth is small. This results in artifacts in depth map due to integer wrapping.

In particular, itInvDepthImg in codec.cpp overflows.
https://github.com/ros-perception/image_transport_plugins/blob/indigo-devel/compressed_depth_image_transport/src/codec.cpp#L238

Here is an example captured by Azure Kinect. Notice the artifacts on the right.
https://pasteboard.co/Iv0RCDu.png