How to depth image in real value

Hello,
These days, I’m making some datasets for video deblurring using blender.
I have the clean image sequences, the blurred image sequences, the depth images and the camera parameters.

My problem is that I need the data that records the real z-value from camera point to each point of image, not just depth images(like below image), and I have no idea to do this.


I think I should use the Blender Python API.
Could anyone point me how to get the 2D-array data that records the real z-values(maybe in a txt file)? Please

Looks like that depth map is a normalised image. It will therefore not show any real depth data. If the depth map had been rendered as a .OpenEXR file it could show real depth since each pixel can be > 1 (value of each pixel is the z depth)

I think this is clearly a case for using the compositor. You can either make sure the Z value is passed into something like the exr, or you can output it to another file. Or process it some further!

just save it as a NOT / NON ( do not ) normalize it
32 bit floating point ( full float ) openexer .exr image

that will give you the RELATIVE z distance

now not all image editors can open the 4 layer rgba openexer image that is outputted by blender

i use cinepaint ( my default program has a BUG with the exr format )
so i can not use Nip2

or

use Gmic or a custom build of imagemagick ( Q32)