How does rviz create point cloud from depth image
I am using an intel realsense L515. While in rviz I opened the topic /camera/depth/image_rect_raw. If you choose DepthCloud, it displays as a point cloud, and if you choose camera it shows a depth image.
My question is how does rviz generate a pointcloud from a depth image? I inspected this topic and it is of type sensor_msgs/Image.
When using echo to view the contents of the message, the values appear to be 8 bits.
From my knowledge, the realsense returns a 16 bit depth image that is used to calculate a point cloud.
Furthermore, I calculated the point cloud with the 16 bit depth values and overplayed it on the one rviz created from the 8bit depth image... and they matched exactly.
Is there something I am missing? How is the point cloud calculated this accurately from only 8 bit values?
I hope this makes sense. Thanks in advance