主要内容

本页采用了机器翻译。点击此处可查看英文原文。

立体视觉

立体相机标定、矫正、视差估计和稠密三维重建

立体视觉通过比较同一场景的两个视图来估计深度。这种计算的输出是三维点云,其中每个点都对应于其中一个图像中的一个匹配像素。工作流从立体相机标定开始,使用立体相机标定器估计内参和外参。标定完成后,立体图像矫正会将图像对对齐到一个公共平面上,从而简化视差估计中的对应点匹配。有关介绍,请参阅Using the Stereo Camera Calibrator App。要对未标定的图像执行立体矫正,请参阅Uncalibrated Stereo Image Rectification

您可以使用分块匹配或半全局匹配等经典算法来计算视差图。然后,您可以应用三角剖分和对极几何等几何原理,使用视差图来执行稠密三维场景重建。有关详细信息,请参阅Reconstruct 3-D Scene from Stereo Image Pair Using Semi-Global MatchingCompare RAFT Optical Flow and Semi-Global Matching for Stereo Reconstruction

立体视觉还支持视觉 SLAM 和真实世界距离测量等高级应用。有关详细信息,请参阅Stereo Visual SLAM for UAV Navigation in 3D SimulationMeasure Real-World Distances to Objects Using a Stereo-Camera

Stereo Vision Capabilities Overview

App

立体相机标定器估计立体相机的几何参数

函数

全部展开

estimateCameraParameters标定单目或立体相机
estimateStereoBaselineEstimate baseline of stereo camera
stereoParameters用于存储立体相机系统参数的对象
stereoCalibrationErrorsObject for storing standard errors of estimated stereo parameters
undistortImage校正镜头畸变后的图像
undistortPoints校正镜头畸变的点坐标
disparityBMCompute disparity map using block matching
disparitySGMCompute disparity map through semi-global matching
rectifyStereoImages校正一对立体图像
estimateStereoRectificationUncalibrated stereo rectification (自 R2022b 起)
reconstructSceneReconstruct 3-D scene from disparity map
triangulate立体图像中未去畸变的匹配点的三维位置
epipolarLineCompute epipolar lines for stereo images
isEpipoleInImageDetermine whether image contains epipole
lineToBorderPointsIntersection points of lines in image and image border
showReprojectionErrorsVisualize calibration errors
showExtrinsicsVisualize extrinsic camera parameters
stereoAnaglyphCreate red-cyan anaglyph from stereo pair of images
pcshowPlot 3-D point cloud
plotCameraPlot camera in 3-D coordinates
stereoParametersFromOpenCVConvert stereo camera parameters from OpenCV to MATLAB (自 R2021b 起)
stereoParametersToOpenCVConvert stereo camera parameters from MATLAB to OpenCV (自 R2021b 起)
rotmat2vec3d将三维旋转矩阵转换为旋转向量 (自 R2022b 起)
rotvec2mat3d将三维旋转向量转换为旋转矩阵 (自 R2022b 起)

主题

精选示例