In this paper, we present a real-time PCB inspection system which can detect defects including the breaks in the wires and short circuit. The proposed inspection algorithm is based on referential matching between the stored reference image and the test (observed) image and is significantly faster when compared to existing algorithms. In the proposed method, block matching with half-pixel precision is performed to solve the translational and rotational misalignment in referential matching. We also present an image processing algorithm for compensating for the non-uniformity of the illumination source. In order to reduce the computational complexity, we optimize the proposed algorithm using the Single Instruction Multiple Data (SIMD) instructions implemented in Intel Pentium IV, so called the Streaming SIMD Extensions 2 (SSE2).