Efficient and fast stereo matching is a challenging task due to the presence of occlusion and low texture areas. In stereo matching, the correspondence between left and right images may be difficult owing to the lack of matching information. The cost metrics proposed before are not robust enough or are computationally expensive. In this work, we propose a novel generic tree structure, Pyramid-tree, which improves the single mode of traditional tree, and can achieve cross-regional connection between different regions with similar colors and similar depths. This unique structure can achieve cross-regional cost smoothing, significantly reducing the possibility of mismatch due to occlusion or lack of corresponding matching information, and has stronger robustness to occlusion and low texture regions. In addition, we also propose a new bearings-only cost metric, Log-angle, which is not affected by occlusion, low texture, illumination and other factors. Log-angle combines with traditional metrics can show better performance. We show that the Pyramid-tree structure and Log-angle are very important as it efficiently expands the state-of-the-art stereo matching methods and leads to significant improvements. Qualitative and quantitative experiments on Middlebury data sets verify the superior performance of the algorithm, and very effective compromise between the accuracy and computation load is achieved.