为解决双目视觉三维重建深度图边缘不连续的问题,提出基于加权最小二乘(weighted least squares,WLS)滤波的深度图优化,经双目标定、畸变矫正、立体校正、立体匹配建立三维深度图,加入WLS滤波,通过调整正则项更改约束条件,对梯度较大的区域减少约束,保留图像边缘,对梯度较小的区域平滑处理,去除噪声,采用峰值信噪比、结构相似性指数、平均绝对误差3个参数评价图像质量.评价结果表明:与半全局匹配算法相比,此算法的峰值信噪比增大1.849 dB,图像失真更少,质量更高;结构相似性指数增大0.415 1,与原图结构相似性更强;平均绝对误差减小21.542 2,还原度更高.重建的深度图视觉效果更好,改善立体匹配不连续的问题,减小匹配误差,使视差图质量更高.
Depth map reconstruction of binocular vision optimized by WLS filtering
To address the issue of discontinuities in the depth map of binocular vision three-dimensional reconstruction,a depth map optimization based on weighted least squares(WLS)filtering is proposed.A 3D depth map is established through binocular calibration,distortion correction,stereo rectification,and stereo matching.WLS filtering is applied.By adjusting the regularization term to modify the constraint conditions,constraints are reduced in regions with large gradients to preserve image edges,while smoothing is applied to regions with small gradients to remove noise.The image quality is evaluated using three parameters:peak signal-to-noise ratio(PSNR),structural similarity index(SSI),and mean absolute error(MAE).The evaluation results show that compared to the semi-global matching algorithm,this algorithm increases the PSNR by 1.849 dB,resulting in lower image distortion and higher quality.The SSI increases by 0.415 1,indicating stronger similarity to the original image structure.The MAE decreases by 21.542 2,leading to higher fidelity.The reconstructed depth map shows better visual effects,which improves the issue of discontinuities in stereo matching,reduces matching errors,and enhances the quality of the parallax map.