A very fast and accuracy subpixel image registration or alignment based on cross correlation and modified moment algorithm . Its accuracy is around 0.01-0.1 pixel according to the SNR and the size of images.
standimage: the first image
compimage: the second image. It should be the same size as the first image