File Exchange

image thumbnail

version 1.1 (220 KB) by

A very fast subpixel image registration

3 Ratings



View License

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

Comments and Ratings (5)


my that's working.

ButI am getting another error:

Error using ==
Matrix dimensions must agree.

Error in fastreg>regsurf (line 83)
[M0 N0]=find(im==max(im(:)));

Error in fastreg (line 51)
[m n im]=regsurf((standimage2.*w),(compimage2.*w));


Min (view profile)

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.


Basel (view profile)

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!

Song Ming



Add a screenshot

MATLAB Release
MATLAB 6.0 (R12)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video