How to use Log polar transformation to recognize scale n rotation invariant images

18 views (last 30 days)
Hi,
Can any1 explain to how to use log polar transformation to recognize images that are scale and rotation invariant. I’m trying to apply that to image stitching application.
From what I have read so far, it seems that log polar is perform on 2 images then the log polar images is cross correlated to find the similarities. However I do not understand how cross correlation of the log polar images can help me get the transformation information. Or my understanding might be completely wrong.
Please advice.
Thanks

Accepted Answer

David Young
David Young on 1 Jun 2011
You can't use the log-polar transform on its own to match images where there is translation as well as scale and rotation change. One approach is to use a Fourier spectrum representation which is translation-independent, and use the log-polar representation of this to deal with the scale and rotation. Another is to iterate between estimating the translation in Cartesian space and scale/rotation in log-polar space.
To find scale and rotation correspondence, you cross-correlate the whole of the log-polar sampled images and find the peak (use zero-padding and windowing as necessary). This only works if the centres of the log-polar grids are at (or close to) corresponding points in the two original images, or alternatively if you use some translation-invariant representation such as the power spectrum.
The details go way beyond what I can deal with in a MATLAB answers discussion, I'm afraid. There was already a significant literature when I worked on this over 20 years ago (I think the seminal paper is this one by Weiman and Chaikin) and there is much more since. It may be significant, however, that modern approaches to stitching use discrete features, such as SIFT and SURF, and find correspondences, rather than using log-polar matching.
A more recent paper is here.
  4 Comments
Kyle
Kyle on 8 Jun 2011
Sorry i think i caused some misunderstanding. For image without scale and rotation invariant, just translation. With the below code ypeak and xpeak will give the location of the overlapping region in img a. Knowing where the image overlap i can know where to start stitching.
%The below code demo how is done more clearly. Assume b is cropped from second image and the cropped section overlaps with first image. ( I made assumption that any 1 of 4 corners of image will overlap with the other image)
a=imread('cameraman.tif');
b=imcrop(a,[1 1 100 100]);
c = normxcorr2(b,a);
[max_c, imax] = max(abs(c(:))) %max_c=1 means the img a contain img b (overlapping)
[ypeak, xpeak] = ind2sub(size(c),imax(1))
max_c =
1.0000
imax =
35701
ypeak =
101
xpeak =
101
However the method above only support stitching image with translation different. I tried SURF method but i had some problem in finding the rotation. Below links shows i get the rotation and scale from SURF.
http://www.mathworks.it/matlabcentral/answers/8934-need-suggestion-on-finding-rotation-angle
Now back to log polar method. I'm trying to know how to perform cross correlation between 2 log polar transformed images(imgA and imgB). So that I can get the scale and rotation information. Did u cropped part of imgA then cross correlation with imgB?
David Young
David Young on 8 Jun 2011
I've edited my answer to give a little more detail - but that's about as far as I can go without starting to write code. I think the key question to ask yourself is whether you'd be better off trying to fix your SURF method - and maybe you should make that a new question.

Sign in to comment.

More Answers (1)

Kyle
Kyle on 8 Jun 2011
%The below code demo how is done more clearly. Assume b is cropped from second image and the cropped section overlaps with first image. ( I made assumption that any 1 of 4 corners of image will overlap with the other image)
a=imread('cameraman.tif');
b=imcrop(a,[1 1 100 100]);
c = normxcorr2(b,a);
[max_c, imax] = max(abs(c(:))) %max_c=1 means the img a contain img b (overlapping)
[ypeak, xpeak] = ind2sub(size(c),imax(1))
max_c =
1.0000
imax =
35701
ypeak =
101
xpeak =
101

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!