HAHA, I solved this problem. I created an environment and compared it by saving the depth in png and exr formats. The depth map in png format is completely nonlinear compared to the actual depth, while the exr format is the opposite.
png format depth map:
exr format depth map:
Even if you linearly map the depth of png, you can't get a depth value that matches exr.
depth_map_png = cv2.imread("images/depthpng.png", cv2.IMREAD_UNCHANGED)
depth_map_png = depth_map_png[:, :, 0].astype(np.float32)
height, width = depth_map_png.shape
depth_map_png = depth_map_png / 65535.0
depth_map_png = depth_map_png * (clip_far - clip_near) + clip_near
print(depth_map_png)
The reconstruction result of exr file:
Finally, I am still a little confused. Can I use the PNG depth map generated by blender through non-linear mapping?