The distance of the obstacles ahead is the information that needs to be acquired first for technologies such as automatic driving and robot perception. Aiming at the problems of high mismatch rate and low measurement accuracy of the traditional binocular vision measurement method based on feature point matching, this paper proposes a binocular ranging method based on ORB feature and random sample consensus (RANSAC). First, in order to initially screen the correct matching point pairs, the method of combining epipolar constraint based on binocular position information and feature matching based on Hamming distance is used to delete mismatched points. Secondly, in order to further obtain high-reliability RANSAC interior points, the sequential consistency constraint method of nearest neighbors based on kd-tree is used to screen out the initial interior point set, and the iterative pre-check method is used to improve the matching speed of RANSAC. Finally, in order to obtain a higher precision distance, the sub-pixel point disparity is obtained by quadric surface fitting, and calculated actual distance. Experiments show that the algorithm in this paper improves feature matching and measurement accuracy, and meets real-time requirements.