The primary aim of this paper is to develop an accurate stereo matching algorithm based on cost aggregation with adaptive support weight (CAASW). In this study, we use a pair of images (from left and right cameras) to find corresponding points. First, the truncated absolute difference is represented as cost computing, and the cost aggregation is completed with adaptive support weight. The winner take all method is then used to find the minimum cost aggregation value of the location in order to obtain the initial disparity. In order to enhance the accuracy of this study, a disparity map is employed, which uses continuity for disparity neighboring relationships; the histogram is represented as a disparity refinement, making it possible to reduce the disparity map's errors. In this paper, the CAASW can be divided into two parts. The first part is CABSW, a method employing binary target and reference images with an area of intersection to form an irregular adaptive support window. The second part is CAASW, using similarity and proximity as features of an adaptive support window with CABSW. In order to better represent the accuracy of this method, the experiment uses the Middlebury database, in addition to other methods, for comparison and analysis, to explore the experimental results and to obtain results with a lower percentage of unsatisfactory matching pixels. Future research will explore applications of this method in robot navigation, industrial manufacturing, human interface, three-dimensional reconstruction and improved computer intelligence capabilities.