如果焦距和视差以像素为单位,视差图是否以米为单位提供深度? [英] does disparity maps give depth in meter if focal length and disparity are in pixel?

查看:60
本文介绍了如果焦距和视差以像素为单位,视差图是否以米为单位提供深度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用立体声相机查找深度.我创建了一个深度图或视差矩阵,其范围是0到255(像素值).现在,在创建深度图之后,我想使用公式

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.

推荐答案

如果替换单位,您将得到:深度=基线(米)*焦距(像素)/视差值(像素).因此结果以为单位,因为像素被抵消了.

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.

这篇关于如果焦距和视差以像素为单位,视差图是否以米为单位提供深度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆