The time complexity and precision of the registration algorithm are two factors affecting the system per- formance of the automatic optical inspection, and only to reduce the time complexity and to improve the precision can ensure reliable real-time system. Beause of large calculation and low accuracy of the traditional reference meth- od, this article puts forward a method which is based on defect detection algorithm of printed circuit board of edge gradient vector. Under the premise of registration, we use the edge gradient vector to search the defect place. Exper- iments show that compared ...