Segment-based stereo matching algorithms are not able to deal with the difficulty that disparity boundaries appear inside the initial color segments. To solve this problem, we propose a novel algorithm that segments the reference image by combining color and depth segmentation information. Then we construct the energy function in segment domain, which embodies the smoothness and visibility constraints to penalize the discontinuities of edge pixels and potential occluded regions, respectively. Finally, the optimal disparity plane labeling is approximated by applying loopy belief propagation. Experimental results on the benchmark images demonstrate that our algorithm is comparable to the state-of-the-art algorithms.