This document presents a novel stereo matching algorithm for object detection using a stereo camera system, aimed at reducing incorrect pixel matching through a four-stage process: matching cost computation, aggregation, optimization, and filtering. The algorithm achieves low error rates (12.11% non-occ and 14.01% all errors) on the KITTI dataset and competes favorably against existing methods. The paper elaborates on the methodology and experimental results, demonstrating improved accuracy in detecting and reconstructing objects in various scenarios.