1. A method for aligning image frames, comprising steps of: selecting a reference image; selecting a sample image to be aligned to the reference image; Fourier-transforming the reference image to obtain a Fourier transform of the reference image; Fourier-transforming the sample image to obtain a Fourier transform of the sample image; coordinate-transforming an absolute value of the Fourier transform of the reference image to obtain a coordinate-transformed Fourier transform of the reference image; coordinate-transforming an absolute value of the Fourier transform of the sample image to obtain a coordinate-transformed Fourier transform of the sample image; obtaining a first phase shift from the coordinate-transformed Fourier transform of the reference image and the coordinate-transformed Fourier transform of the sample image; inverse-Fourier-transforming the first phase shift to obtain an inverse Fourier transform of the first phase shift; finding a first transformation factor from the inverse Fourier transform of the first phase shift; transforming the sample image by the first transformation factor to obtain a first-transformed sample image; Fourier-transforming the first-transformed sample image to obtain a Fourier transform of the first-transformed sample image; obtaining a second phase shift of the Fourier transform of the reference image and the Fourier transform of the first-transformed sample image; inverse-Fourier-transforming the second phase shift to obtain an inverse Fourier transform of the second phase shift; finding a second transformation factor from the inverse Fourier transform of the second phase shift; and transforming the first-transformed sample image by the second transformation factor.