目的针对难以快速获得高精度的稠密视差图问题,提出一种基于边缘特征和可信度的立体匹配算法。方法为了增加像素点之间的区分性,采用鲁棒性较好的AD-Census函数作为匹配代价测度函数。针对匹配窗口跨越视差不连续区域时造成误匹配问题,算法首先对参考图像进行边缘特征提取,基于边缘特征约束,获取形状和大小均具有自适应特性的匹配窗口。视差计算时,使用WTA算法计算每个像素点的视差值,同时计算该像素点视差的可信度。最后通过边缘检测图和信度图进行联合优化,修复可信度较低的像素点的视差。结果该算法能够快速有效地处理视差遮挡区域和视差不连续区域的误匹配问题。结论基于边缘特征和可信度的立体匹配算法是一种高效可行的立体匹配算法。
Objective Aiming to solve the problem of difficulty in quickly obtaining dense disparity map with high precision, a stereo matching algorithm was proposed based on edge features and confidence. Methods In order to increase the distinction between the pixels, the algorithm used AD-Census function as the matching cost measure function. Targeting at the mismatch problem caused by the matching window across the parallax discontinuity region, firstly we obtained sparse feature points of edge from the reference image, and then obtained the matching window with self-adaptive size and shape based on edge feature constraints. Using the WTA algorithm to calculate the disparity of each pixel when computing parallax, and meanwhile calculate the confidence of each pixel'disparity. Finally, we repaired the disparity of pixels with low disparity confidence through combined optimization of edge detection image and confidence image. Results The experimental results showed that the algorithm could fast and effectively deal with the mismatch problems of occlusion and disparity discontinuities. Conclusion The stereo matching algorithm based on edge features and confidence is an efficient and feasible stereo matching algorithm.