In traditional stereo matching, global approach is more accurate but time consuming, also have high accuracy in occlusion area. On the contrary, local approach is usually fast but have bad performance, and easily influenced by noise. This paper proposed a novel method to compute disparity between two images. It is based on local approach, but our new cost function aggregated the cost in global way. This aggregation is processed by a weight map which created by the bilateral filter. Every pixel transfers its own cost information to all pixels on the same object, but this information would be restricted by the weight map. After finishing preliminary depth map, we use L-R check to find occlusion and mismatch pixels to refined our depth map. These refinement mechanics fix occlusion areas by the smallest disparity nearby. At last, we use bilateral filter clean up whole depth map. All of above computing process can be parallelized on GPU or cloud sever. Although this algorithm is designed for lowlevel machine, it still exerts high performance in high-level hardware.