The depth image from Distance To Camera(Depth) is wrong when I convert rgb+d to pointclouds it is distorted

When I generate point clouds using RGB and depth data, I observe distortions in the resulting point cloud. I suspect that the depth data, which represents the distance to the camera, might be inaccurate or misinterpreted during the conversion process.

There is distance_to_camera and distance_to_image_plane. Could it be that the wrong data format was used?