The document summarizes a novel fast stereo matching algorithm that considers cost functions and dynamic programming. It proposes using a dynamic programming approach to find a dense disparity map while reducing computational costs. The algorithm iteratively obtains a new disparity map through interpolation and only updates selected areas based on local matching costs and depth differences, rather than updating the whole map. This allows it to obtain a smooth disparity map while preserving discontinuities. The algorithm is evaluated on rectified stereo image pairs and achieved better quality results with improved running speed compared to other approaches.