Abstract:In view of the problems in traditional manual inspection methods for electronic component defects, such as large amount of labor, low efficiency and automation, and high cost, a vision inspection system based on Halcon was proposed. According to the particularity of the research object, a multi-feature automatic detection method of twice acquisition and twice judgment was proposed, and a verification test platform was built; the CCD camera was used to acquire the component image in real time, and then the image was preprocessed with median filter to reduce the image noise. Finally, the methods of threshold segmentation and Blob analysis were used to recognize the morphological features of the image defect features and the judgment result was gotten. The experimental results show that the detection method can be used to extract the defect features of electronic components quickly, accurately and efficiently. The average image processing time of a single image is 131 ms, and the average detection accuracy is 95%; on the other hand, the automatic control system has strong stability and high accuracy, the average detection cycle time of a single component is 4.7 s, and the detection efficiency is increased by 38% compared with manual detection, which meets the industrial requirements.