This article proposes a new disparity map algorithm for three-dimensional (3D) surface reconstruction. Fundamentally, this map provides important information, which commonly used in autonomous vehicle navigation, three-dimensional (3D) surface reconstruction, and virtual reality. The development of this map requires several important stages which start with matching cost computation, cost aggregation, optimization, and refinement stage. To develop an accurate disparity map, the framework must be robust against the challenging regions which are low texture, plain color, and repetitive pattern. Hence, the novelty of this work is to develop a new framework for stereo matching algorithm to improve the accuracy on these regions. This framework starts with Sum of Squared Difference (SSD) and the combination of two edge-preserving filters to increase the robustness against the challenging regions. The SSD convolves using the block matching technique to increase the efficiency of the matching process on the low texture and plain color regions. Moreover, two edge-preserving filters will increase the accuracy of the repetitive pattern region. The results show the framework is accurate and capable to work with these challenging regions. Moreover, this work is competitive with other published methods such as Adaptive Deconvolution Stereo Matching and Binary Stereo Matching.