Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to do image registration using phase correlation as described in the Reddy Chatterji paper. In my case, the images may be scaled and translated relative to each other.

The algorithm for finding the relative scale, as I understand it, is (see: the flowchart from the paper):

F1 = DFT(I1)
F2 = DFT(I2)
H1 = Highpass(F1)
H2 = Highpass(F2)
L1 = LogPolar(Magnitude(H1))
L2 = LogPolar(Magnitude(H2))
PC = PhaseCorrelate(L1,L2)
PM = norm(PC)
R = IDFT(PhaseCorr/PM)
P = Peak(R)
Scale = LogBase^P[1]

Scale gives me seemingly nonsensical values (wildly different from image to image and never correct).

But ignoring scale, the same phase correlation approach works fine for translation; and so I suspect I have a problem with my log-polar transform. Here's an example, where I've solved for translation--the left image is the original and the right has been cropped and translated--the solution is shown on top of the orignal:

Translation alone works

For the log-polar transform, I first transform into polar space: $$ \hat{I}(\rho,\theta) = I\left(r+\rho\cos\left(\frac{2\pi\theta}{N_{\theta}}\right),r-\rho\sin\left(\frac{2\pi\theta}{N_{\theta}}\right) \right) $$ where $I$ is the original image, $r$ is the image radius (half-width) and $N_{\theta}$ is the number of samples in the $\theta$ direction. I then sample from this to transform into log polar space: $$ \hat{I}_{log}(\rho,\theta) = \hat{I}\left(\log_{b}(\rho),\theta\right) $$ where $b = (2r)^{-N_{\rho}}$ as described in 1 so that it spans the whole polar space.

Here're the example images in log-polar space with $\rho=\theta=256$ (in case there's something glaringly wrong):

Log Polar

Lastly, this shows the actual transformation the images go through before the phase correlation step (top is DFT magnitude post highpass filter, bottom is that in log polar space):

Log Polar of DFT

I'm using OpenCV, which has LogPolar and PhaseCorrelate methods. While the PhaseCorrelate, like my manual implementation, gives me the correct answer for translation, it's incorrect on scale. Since using the OpenCV LogPolar or my own doesn't affect the correctness, I must be missing something.

Any help would be appreciated.

share|improve this question
1  
Did you figure out what was wrong? – Mr.WorshipMe Jan 9 at 21:52
1  
@Mr.WorshipMe Unfortunately not. – Drew Cummins Jan 15 at 19:29

I guess it is due to specific implementation issues. For example, (1) it is better to perform the windowing pre-processing before the DFT; (2) you can check the Highpass() function, and you can refer to the one in Reddy Chatterji's paper Eq.(23)-(24). Also, there is limit for the scale value, and you can try other scale values.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.