1

I am trying to find depth using a stereo camera. I created a depth map or disparity matrix which are from 0 to 255 (pixel value). Now after creating a depth map, I want to find real depth using formula,

depth = (baseline*focallength)/disparity-value
Here,
the baseline in (meter)
focal length in (pixel)
disparity-value in (pixel)

So I want to ask if I calculate depth, will that depth in pixel or in a meter.

Nikhil Manali
  • 72
  • 1
  • 8

1 Answers1

3

If you substitute your units you get: depth = baseline (meter) * focal length (pixel) / disparity-value (pixel). So the result is in meters because pixels are canceled down.

Piotr Siekański
  • 1,665
  • 8
  • 14
  • Piotr Siekański Thank-you. I want to ask another question. Is disparity matrix value which is from 0 to 255 (0 for black and 255 for white) are pixel values? I just want to confirm. – Nikhil Manali Jul 29 '19 at 10:44