Help with Matlab to resize an image using fft2 function?
LEED77
2006-12-12 01:02:42 UTC
I need help to resize an image using fft2 function in matlab. I use imread to load the image and then fft2 to get the transform, then I add zeros and use ifft2, but at the end I get an ugly picture. I can add more details if needed. Thank you.
Three answers:
2006-12-12 11:18:05 UTC
You might need to convert the image to another format such as double then convert it back to uint8 or similar. For example:
load imdemos saturn2;
B = fft2(saturn2);
figure;
imshow(saturn2);
figure;
imshow(log(abs(fftshift(B))),...
[]), colormap(jet(64)), colorbar;
saturn_rec = uint8(ifft2(B));
figure;
imshow(saturn_rec);
This creates three plots. The first one is the original image, the second is the real part of the fft of the image and lastly is the image after the inverse fft.
2016-05-23 12:09:08 UTC
For resizing image using MATLAb, you have imresize function there.Try finding help. type, "Doc imresize" or in try to get it using MATLAB help section.
tekchand
2017-02-24 08:11:59 UTC
Fft2 Image Matlab
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.