Obstacle distance measurement is one of the key technologies for cable inspection robots on high-voltage transmission lines. This article develops a novel method based on binocular vision for extracting the feature points of images and reconstructing 3D scenes. The proposed method seamlessly incorporates camera calibration, dense stereo matching, and 3D reconstruction. We apply a novel calibration method to acquire intrinsic and extrinsic parameters and use an improved Semi-Global Matching (SGM) algorithm based on the least squares fitting interpolation to refine the basic disparity map. Based on the depth information of the optimized disparity map and the principle of binocular vision measurement, a model is established to estimate the distance of an obstacle from the cable inspection robot. Extensive experiments show that the proposed method achieves an estimation accuracy of less than 5% from 0.5 m to 5.0 m, offering extremely high distance estimation accuracy and robustness. The study improves the autonomy and intelligence of inspection robots used in the power industry.