필터 지우기
필터 지우기

How do we take the inverse fourier transformof this image

조회 수: 13 (최근 30일)
Arya Gopan
Arya Gopan 2020년 12월 6일
댓글: Arya Gopan 2020년 12월 7일
I need to find the inverse tramsform of the second image

채택된 답변

Setsuna Yuuki.
Setsuna Yuuki. 2020년 12월 6일
Your image:
img = imread('imagen','jpg');
h = ifft2(img); %inverse fourier transform
imagesc(abs(h(:,:,1)));
inverse fourier transform:
[r,c,~] = size(h);
H = abs(h(fix(c/2):end,fix(c/2):end,1));
H2 =[H fliplr(H)];
H = [H fliplr(H); flip(H2)];
figure
imagesc(H)
  댓글 수: 1
Arya Gopan
Arya Gopan 2020년 12월 7일
Sir this is the code I used so far from reading the image to taking its fourier transformand then cropping one part of it. Can you please check the last part of the code. I want the inverse fourirer transform using ifftshift
clear all
I = imread('a35.jpg');
I = rgb2gray(I);
[r , c] = size(I);
for i = 1:r
X(i,:)=fft(I(i,:));
end
for j = 1:c
Y(:,j)=fft(X(:,j));
end
figure(1)
imshow(I)
figure(2)
M=Y;
M=fftshift(M);
Ab=abs(M);
Ab=(Ab-min(min(Ab)))./(max(max(Ab))).*225;
imshow(Ab)
X=zeros(size(Ab));
X(475:563,556:639,:)=1;
p = Ab.*X;
subplot(2,1,1)
imshow(Ab);
title('Orginal')
subplot(2,1,2)
imshow(p);
title('Cropped')
IFF=(ifftshift(ifft(p)));
Final=uint8(real(IFF));
figure
imshow(Final);

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by