when using function depth_point_2_world_point(), a problem will occur.
Hello. When I use the function depth_point_2_world_point(), I find there may be a bug.
As you can see in these picture, no matter what the input coordinates are, the output X and y change all the time, but the Z value remains unchanged at 20.48.

I really want to know why this problem occurs. Thanks very much.
I cannot say for sure what is going on, as when calling the depth_point_2_world_point function I just call the Kinect's transformation function MapDepthPointToCameraSpace and return the values, so I cannot know for sure what this function does internally.
But what I know is that the depth point is actually the z (distance from the Kinect Sensor) so you can actually get the z value like this:
if (int(depth_y) * 512 + int(depth_x)) < 512 * 424: world_z = float(depth[int(depth_y) * 512 + int(depth_x)]) # mm
where depth is just:
depth = kinect.get_last_depth_frame()

I happened to get the same problem, if i just get the depth_z it can be more accurate but it also isnt that accurate as you can see below

the image above is the output of color x,y and depth_z, noted that the object is a person's face mask and it's not moving that much considering the change in the depth_z is huge, and one more thing the object that's detected isnt 5 or 6 meters away, instead it's just about 1,5 meters away from the kinect.
The Kinect's sensor is very sensible, you cannot simply trust the raw data of Kinect, you have to apply a filter (most of the time Kalman filters) to smooth and reduce the Kinect's noise.