To automatically detect SMT (surface mount technology) electronic modules, algorithms are investigated for geometry and shape features, module matching and detection in PCB (printed-circuit board) components. First, geometry and shape features of SMT electronic modules are presented. Then matching technology and process for SMT electronic modules are studied through optimization searching algorithms, such as similarity based detection and pyramid algorithms. Based on the analysis of major defects, algorithms for detecting major defects in SMT electronic modules are investigated. Finally, the crucial factors affecting inspection precision and speed, i.e., components contour, searching range and minimum similarity, are analyzed. The experimental results show the detection time for Circuit Boards without defect is 0.82s, and for those with one component absent 0.89s, yet for multiple components absent 10.68s. Therefore, it can satisfy the requirements of high reliability, stability, precision, inspection speed and anti-interference for defect detection in SMT electronic module of Circuit Boards.