How to obtain a picture like this in python?

Could u please tell me how can i obtain a picutre like this, which i saved from depth viewer, using python? Or not?
Thank you so much!

Hi,

The ZED SDK does not provide API to retrieve the coloured depth, only the grey scale depth is available.

You can get it by using the retrieve_image method with the VIEW flag set to DEPTH :

depth= sl.Mat()

zed.retrieve_image(depth, sl.VIEW.DEPTH)

Jean-Loup MACARIT
R&D Engineer
Stereolabs Support

thanks for your reply.
But i still wonder if i can generate a picuture like that from depth map using API in python. Is it a pseudo color mapping?
And does the pixel of the colored depth map represent a determined depth value/distance?

Yes the color depends on the distance to the camera.

We do not provide a way to convert a grey scale depth to a colored depth. Unfortunately, that’s something you’ll have to implement on your side.

Best,

Well, appreciate your reply