爲什麼我不能得到我使用傅立葉變換和圖像處理轉換的圖像的逆?該程序的代碼是below.here圖像被通過圖像處理轉換,但我不能得到反轉圖像back.pls幫我傅立葉變換圖像的逆
clc;
clear all;
close all;
a=imread('lenna.png');
j=rgb2gray(a)
figure,imshow(a);
figure,imshow(j);
p=size(j);
[x,y]=size(j);
n1=rand(220,220);
b=exp(2*pi*i*n1);
k=fft2(j);
c=k.*b;
d=fft2(c);
figure,imshow(d);
s=size(d);
[r,t]=size(d);
n2=rand(220,220);
e=exp(2*pi*i*n2);
f=fft2(e);
figure,imshow(f);
g=fft2(f);
h=conj(e);
i=g.*h;
k=ifft(i);
figure,imshow(k);
請至少在你的代碼中添加註釋!另請說明出了什麼問題,以及在哪裏 – Dan
當然,您需要'ifft2'而不是'ifft'? –