1
votes

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.

1

1 Answers

3
votes

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.