I have a similar problem I think to yours. I am using the same code on files exchange.
I am trying to get the absolute frame difference between the two aligned images. But since the two images are of different sizes 'imabsdiff' does not work. I only need to therefore apply imabsdiff to the overlapping region of the two aligned images. I am having some difficulty in doing this. Please share with me if you ever figure this out.