How to get depth scale value for zed mini

I used realsense d435, i use some like that to get the depth scale value:
profile = pipeline.start()
depth_sensor = profile.get_device().first_depth_sensor()
depth_scale = depth_sensor. get_depth_scale()
print(depth_scale) # depth_scale: 0.0010000000474974513

But how can I get the depth scale from zed mini camera?, please help me

I am using this method SF-Mask-RCNN, i run his demo.py with realsense D435 successfully, but i need to run it again with ZED.

the codes in his demo.py with realsense:

self.min_dist = 0.35 / 0.0010000000474974513
self.max_dist = 0.80 / 0.0010000000474974513
… …
… …

depth[self.min_dist > depth] = self.min_dist
depth[self.max_dist < depth] = self.max_dist
depth = (depth-self.min_dist) / (self.max_dist-self.min_dist)
depth = depth.transpose(0, 2).transpose(1, 2)

and i want to do the same but with ZED api, i don’t know how to write it, i hope someone can look this demo.py and give me some ideas :wave:

Hello and thank you for reaching us out,

The scale of the depth of the ZED is 1. What you are looking for maybe to change the coordinates units (meters, millimeters…).
I strongly advice you to look into our samples and tutorials, this one especially : https://www.stereolabs.com/docs/tutorials/depth-sensing/

I don’t have enough code here to understand what your program is supposed to do, So I cannot translate this, but I’m sure you’ll find everything you need in our tutorials.

Regards

Antoine Lassagne
Senior Developer - ZED SDK
Stereolabs Support

1 Like