This paper proposes a novelty dense stereo matching method based on TC-MST (Threshold Constrained Minimum Spanning Tree), which aims to improve the accuracy of distance measuring. Due to the threshold has a great impact on the results of image segments, to select a better threshold, we adopt iteration threshold method. And then we uses MST to calculate the cost aggregation, and utilize the winner-take-all algorithm for the cost aggregation to obtain the disparity. Finally the method proposed is used in a distance measuring system. The experiment results show that this method improves the distance measuring accuracy compared with BM (block matching).