Automatic optical based print circuit board inspection (AOI) is an importantapplication of modern machine vision, which is widely used in print circuit boardmanufacture. To be applied in industry environment, AOI algorithm must be able todetect a variety of PCB defects with high accuracy.According to PCB defects’size and color, a classification of PCB defects isproposed.There are five classes: small defects, big defects, color featured defects, circlerelated defects and other defects. AOI algorithms for each class of defects are alsoproposed: for small defects and big defects, two old AOI algorithms, which is used inbinary PCB image, are modified to be able to applied to color PCB image.Experimentshows that these two algorithms both have90%average accuracy and their averageruntime are0.097s and1.335s respectively. For color featured defects, an AOI algorithmbased on connectivity analysis and histogram comparison is proposed. Experiment showthat this algorithm gain90%average accuracy and1.864saverage runtime. For circlerelated defects, a novel machine learning based AOI algorithm, which uses ana veBayesian classifier, is designed.Experiment shows that this algorithm has90.825%average accuracy and0.021s average runtime. For other defects, we propose a grab-cutbased AOI algorithm, experiment shows it has80%average accuracy and33.384saverage runtime. And a modified color quantization algorithm is also providedfor color image pre-processing, which is used in most of our AOI algorithm. Comparedto conventional algorithm, this modified algorithm has about43%speedup, and also hasadvantage on accuracy. |