image IFFT of a zero padded FFT gives a washed out image

600 Views Asked by At

For practice, I am slowly implementing image processing concepts with the FFT, and I have started with zero-padding. The result is supposed to rescale the size of the image (in this case, double the width and height), but my output is washed out. I was thinking that it had to do with my normalization after the ifft, since the width and height had changed after the padding, but nothing I have tried has produced a better image. Any ideas on where I may be scaling the data incorrectly, or quick fixes to increase the power of my output? Before I save my image, I scale all the pixel data to a range between 0 and 255, but it almost seems like the output is between 128 and 255 instead.

Original:

enter image description here

Zero-padded FFT:

enter image description here

IFFT:

enter image description here

1

There are 1 best solutions below

1
On

I should have tested some more before posting. All I was doing wrong was scaling the image between 0 and 255 one too many times. This messed up the data, especially since my scaling function uses a logarithmic scale to better display the fft.