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
m: the shift in X
n: the shift in Y
This code is implemented based on the following algorithm. Please cite：
Song Min, June, 2013
my mistake...now that's working.
ButI am getting another error:
Error using ==
Matrix dimensions must agree.
Error in fastreg>regsurf (line 83)
Error in fastreg (line 51)
[m n im]=regsurf((standimage2.*w),(compimage2.*w));
yes, it is pretty tricky . Usually, we choice R0 between 2 and 4. Acutally, it is related with the size and the content of your images. We have not found a rule yet.
Thanks Song, Can you please elaborate more on the impact of R0 & R1 in your code? changing them have big influence on the performance so any guidelines about them?
Thanks for the code. John says it saved me 1 month worth of for loop work. Awesome!
Add a screenshot
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.