This paper proposes a high-precision solution framework for garment size matching based on an optimization algorithm, which integrates binocular vision and feature extraction techniques to significantly improve the measurement accuracy. Firstly, the camera calibration is realized by using Zhang’s calibration method combined with Brown’s distortion model. And the innovative fusion of SIFT and Forstner algorithms optimizes the feature points, SIFT prescreening reduces the computational amount, and Forstner finely locates the corner points by error ellipse circularity thresholding. Further, the SGBM dense stereo matching algorithm is used to generate highprecision parallax maps by overcoming the “tail-dragging effect” through Sobel edge enhancement, multi-directional dynamic planning and post-processing. Experimental validation shows that the average error of the virtual grid calibration method at 10 positions is only 0.13mm, and the maximum error is 0.32mm, which meets the requirement of measurement error <1mm. In the DeepFashion dataset 13 types of clothing test, the average mAP reaches 77.37%, which is 4 percentage points higher than MKMnet, and the long-sleeved top has the best accuracy of 92.49%. The average matching accuracy under rotational interference is 88.46%, 22.69 percentage points higher than MKMnet, and the time consumed is 324ms, with an efficiency improvement of 7.2%.