The testing technique for the quality of printed circuit board (PCB) pattern is developing with the progress of PCB. The automatic optical inspection (AOI) method for online examination of PCB was introduced, including image acquisition and the morphological analysis and algorithm for image processing. Furthermore, the development trend of PCB and AOI are discussed.