Abstract:The most popular electrolytic capacitor detection method can be divided into two stages:inner circle detection and polarity detection. However, when affected by the light, the luminance of the inner circle can be very close to that of the outside, the small difference is difficult to be captured by GHT-based circle detection, thus making the inner circle mislocated. In addition, the polarity detection method based on the sliding window smoothness does not consider the three cases of low luminance or high noise in the polar region and the existence of high luminance pollution in the non-polar region, so the application of this method is limited. In this paper, we propose a novel method of inner circle detection based on the clustering segmentation of super pixels, which takes the relationship of luminance and position among super pixels into consideration simultaneously and can obtain the correct position even under poor illumination conditions. Furthermore, we propose a polarity detection method based on the selection among peaks and valleys that calculated by gray-level mean and variance of the sliding windows. The method has the ability to handle the general cases as well as the three complex cases mentioned above. It is worth noting that with our approach it is possible to provide direction directly, which was not possible in any previous approach, and facilitate full automation. The experimental results show that the test accuracy of the method reaches 98.6%, and the average detection time of a single image is 192ms±23ms. The solution has been accepted by many manufacturers and performs well.