The template matching algorithm of digital image is studied to improve the matching speed that is critical for the semiconductor packaging industry. The moment matching of circular windows is a fast algorithm
which divides the template into a series of circular ring and computes the moment of corresponding circular ring between template and source image to find the matching point. But the arithmetic product operation is needed to determine a pixel belonging to which circular ring
which consumes much time. For this reason
an improved algorithm by using a distance map before matching is proposed. The radius is stored in the distance map to record the distance between each pixel and the center of circular rings. Thus
simple comparison operation on the indexes of a pixel can determine a pixel belonging to which circular ring
which can save much time. Experiments show that the improved algorithm can improve the matching speed greatly and meet the needs of precision electronic packaging.