Abstract:In order to improve the mounting efficiency of the patch element of the SOP class, a method of location recognition and detection based on machine vision was proposed. Aimed at the imaging characteristics of the package mount element of SOP class,the median filter was used to detect image edges instead of the Gaussian filter of the Canny operator, so as to achieve better denoising effect.According to the limitation condition of certain contour circumference and area, the root of interfering contour and pin contour was removed, and only the contour of pin foot was retained. The center coordinate of the pin foot was obtained by calculating the center moment, and the deflection angle of the element was calculated by combining the adjacency matrix and the improved least square method. The method is simple and effective,with less computation and high stability.The experimental result shows that the algorithm can not only ensure high precision positioning of SOP class components, but also achieve high efficiency mounting.