An algorithm for the automatic registration of two image frames with local geographic distortion is proposed. The algorithm produces local pattern matching in multiple windows to obtain local misregistration vectors. The optimal average frame shift is estimated from these vectors by the least squares method. Finally, the residual local displacement vectors are interpolated to the whole frame to compensate for the distortion of the other frame. The precision of the pattern matching involving a fractional-pixed shift is evaluated by simulation with various signal-to-noise ratios of images and window sizes. As an example of practical application, a Digital Subtraction Angiogram registered by this algorithm is shown.