Get disparity value from specifi pixel

Hi all,
I’am working with t265 camera and this example here
So I get a depth image and disparity

# compute the disparity on the center of the frames and convert it to a pixel disparity (divide by DISP_SCALE=16)
disparity = stereo.compute(center_undistorted["left"],center_undistorted["right"]).astye(np.float32) / 16.0

 # re-crop just the valid part of the disparity
 disparity = disparity[:,max_disp:]

So I know if I want to compute the real distance I need to do this math

Depth = (focal length * distance between cameras) / (disparity value)

But for now I don’t know how I can get a specifi disparity value of a pixel for example how to get disparity value of pixel 150,150 (this pixel is the pixel at the center of my image)?

it works like with any other numpy array:

value = disparity[y,x]
1 Like