This paper presents an optimization framework for the 3D reconstruction of the surfaces from stereo image pairs. The method is based on employing popular graph cut methods under the dual mesh optimization technique. The constructed system produces noticeably better results by running two separate optimization processes that communicate with each other. The communication mechanism makes our system more robust against local minima and it produces extra side information about the scene such as the unreliable image sections. We validated our system by running experiments on real data with ground truth and we compared our results with the other optimization methods, which showed the accuracy and effectiveness of our method.