0
$\begingroup$

I am trying to find the correct filter to convolve with an image so they have the same PSF.

I have the final PSFs of both images:

  • A: PSF of the image with the wider PSF.
  • B: PSf of the image with the narrower PSF.

(So the FWHM of B is smaller than A).

For the time being I am trying to do the most simple (naive) deconvolution: by simply dividing the Fourier transform of A with that of B. The reason is that the type of data that I am working with (astronomical images) will not have zeros in the fourier transform. Also I am using very high signal to noise images of stars (point sources) so the effect of noise is minimal. Later on, I will try to implement the Wiener deconvolution. But my problem seems to be more basic than that!

When I take the naive deconvolution steps, it seems the Final PSF I get is translated by half the image width as you can see below. Just a note: I have set the sums of both images to 1 before this process. Also, the images are all inverted so zero is shown with white.

This is A (the wider PSF):

A:

This is B (the narrower PSF, same image size as A):

B

This is the Fourier transform of A:

Fourier transform of A

This is the Fourier transform of B:

enter image description here

This is the pixel by pixel division of the Fourier transform of A divided by the Fourier transform of B. Following the advice in this stackexchange-Mathematics question, I have set all the pixels with a very small B value to zero (a plus-like figure in the center that is all white).

enter image description here

And this is the inverse Fourier transform of the division:

enter image description here

It seems reasonable, but it is not centered, its as if it has been translated by half the image size! I know I can multiply the Fourier domain results with constants to center it. But I don't understand why this happens. I am affraid I might have made a mistake somewhere! If I understand it, then applying that translation is easy.

I am using this exact algorithm for convolution (where the Fourier transforms are multiplied) and the inverse discrete Fourier transform result is centered. So, I know there is no error in my inverse discrete Fourier transform steps.

As a summary, my question is that why does the inverse Fourier transform of the frequency space appear to give a translated (by half the image size) spatial image in division?

$\endgroup$
  • $\begingroup$ If you use matlab for simulation, please consider fftshift command...Fourier transform in matlab by default does not create coordinates at the center, however, with the help of fftshift you can overcome this problem $\endgroup$ – Oliver Aug 3 '15 at 7:21
  • $\begingroup$ Thanks. I am using GNU Scientific Library for the FFT. I manually shifted the final array and it seems to work very nicely. However, I still don't understand why this shift or translation is caused after division and not after multiplication. $\endgroup$ – makhlaghi Aug 3 '15 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.