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 classi cation is essential to the identi cation of defect sources. Therefore, an algorithm for PCB defect classi cation is presented that consists of well-known conventional op- erations, including image difference, image subtraction, image addition, counted image comparator, ood- ll, and labeling for the classi cation of six different defects, namely, missing hole, pinhole, underetch, short-circuit, open-circuit, and mousebite. The de- fect classi cation algorithm is improved by incorporating proper image registration and thresholding techniques to solve the alignment and uneven illumination problem. The improved PCB defect classi cation algorithm has been applied to real PCB images to successfully classify all of the defects.