International Journal of Innovative Computing, Information and Control ICIC International c 2012 ISSN 1349-4198 Volume 8, Number 5(A), May 2012 pp. 3239–3250 AN IMPROVED DEFECT CLASSIFICATION ALGORITHM FOR SIX PRINTING DEFECTS AND ITS IMPLEMENTATION ON REAL PRINTED CIRCUIT BOARD IMAGES Ismail Ibrahim 1 , Zuwairie Ibrahim 2 , Kamal Khalil 1 , Musa Mohd Mokji 1 Syed Abdul Rahman Syed Abu Bakar 1 , Norrima Mokhtar 3 and Wan Khairunizam Wan Ahmad 4 1 Faculty of Electrical Engineering Universiti Teknologi Malaysia 81310 UTM Skudai, Johor Darul Takzim, Malaysia tsuri inc@hotmail.com; { kamal; musa; syed }@fke.utm.my 2 Faculty of Electrical and Electronic Engineering Universiti Malaysia Pahang 26600 Pekan, Pahang, Malaysia zuwairie@fke.utm.my 3 Faculty of Engineering University of Malaya 50603 Kuala Lumpur, Malaysia norrimamokhtar@um.edu.my 4 School of Mechatronic Engineering Universiti Malaysia Perlis Main Campus Ulu Pauh, 02600 Perlis, Malaysia khairunizam@unimap.edu.my Received November 2010; revised October 2011 Abstract. Because decisions made by human inspectors often involve subjective judg- ment, in addition to being intensive and therefore costly, an automated approach for printed circuit board (PCB) inspection is preferred to eliminate subjective discrimination and thus provide fast, quantitative, and dimensional assessments. In this study, defect classification is essential to the identification of defect sources. Therefore, an algorithm for PCB defect classification is presented that consists of well-known conventional op- erations, including image difference, image subtraction, image addition, counted image comparator, flood-fill, and labeling for the classification of six different defects, namely, missing hole, pinhole, underetch, short-circuit, open-circuit, and mousebite. The de- fect classification algorithm is improved by incorporating proper image registration and thresholding techniques to solve the alignment and uneven illumination problem. The improved PCB defect classification algorithm has been applied to real PCB images to successfully classify all of the defects. Keywords: Printed circuit boards, Defect classification, Defect detection 1. Introduction. A bare printed circuit board (PCB) is a PCB that is used before the placement of components and the soldering process [1]. It is used along with other components to produce electronic goods. To reduce manufacturing costs associated with defected bare PCBs, the inspection of bare PCBs is required as the foremost step of the manufacturing process. Nevertheless, many important visual inspection systems are used in manufacturing processes. The processes start from inspection work, measurement, and 3239