Semiconductor packaging equipment has high precision requirements for XY motion platform, and in recent years, with the development of the semiconductor industry, the accuracy of semiconductor packaging equipment has been continuously improved, and the requirements for checking the accuracy of the motion platform through the vision module are getting higher and higher. The positioning accuracy of traditional edge detection algorithms is usually pixel-level, which can no longer meet the requirements of some industrial production, so it is necessary to apply subpixel edge detection, which is a higher precision edge detection algorithm. Aiming at the problems of low accuracy and complex calculation of existing subpixel edge positioning algorithms, a subpixel edge detection algorithm based on the combination of improved Canny operator and Gaussian fitting is proposed, and more accurate subpixel edge point are obtained. Traditional Canny edge detection has problems such as poor adaptability and discontinuous edges may be detected. Through adaptive median filter instead of the original Gaussian filter to improve the image noise processing, the gradient calculation is extended from the traditional 2*2 neighborhood to the 3*3 neighborhood, and then the maximum variance between classes (Otsu) method is used to obtain the adaptive optimal threshold, so as to improve the accuracy of coarse positioning, obtain the coarse edge of the image with more accuracy, and finally improve the edge accuracy to subpixel by combining Gaussian fitting. The experimental results show that compared with the traditional Canny operator, the mispositioning is significantly reduced, and the accuracy of edge positioning is effectively improved without replacing the hardware equipment such as cameras, which can be used to test the accuracy of the motion platform of semiconductor packaging equipment, save production costs and have certain practical significance.