The two prerequisites for the referential-based image comparison method, perfect registration and stable lighting, are hard to achieve under real PCB inspection environment. In this paper, an objection description based on learning for PCB inspection is proposed to compensate for allowable minor variations of object placement and lighting variations, and the threshold image approach is provided to effective avoid false defects. The experimental results show that the developed method is successful in locating defects occurring on PCB, and the result can be used to quality control.