双目视觉深度计算器

Stereo Vision Depth Calculator

Input stereo camera focal length f (pixels), baseline B, and disparity d (pixels), compute depth Z = f·B/d for visual navigation and obstacle avoidance.

📐 计算公式
双目立体视觉深度(本页代码口径):深度 Z=焦距 f×基线 B÷视差 d(m,f、d 单位 px、B 单位 m)。校验:三字段经输入守卫必填且须为合法数值,否则提示并中止。判据:无固定分级,深度与视差成反比,视差减半深度加倍,物体越远视差越小、深度测量误差随之放大。

输入焦距 f(像素)、基线 B、视差 d(像素),求深度。

📌 计算说明
  • Z = fB/d(小孔模型)。
  • f=500,B=0.1,d=25 → 2 m。

📚 深度解析:双目立体深度

💡 常见使用场景

焦距 500px、基线 0.1m、视差 25px
Z=f·B/d=500×0.1/25=2.0m。
视差减半
d=12.5 → Z=4m,视差越小越远(深度与视差成反比)。

❓ 常见问题(FAQ)

单位?
f、d 同取像素,B 取米,则 Z 为米。
近处误差大?
是;深度对视差变化敏感,近处更不稳。

Formula & Standard References

Item Formula / Note Source / Standard
Stereo depthZ = fB/dHartley-Zisserman 2004
Disparity nonlinearityError ∝ Z²H-Z 2004
Epipolar constraintRectified epipolarH-Z 2004