필터 지우기
필터 지우기

ifft2 on an asymmetric matrix does not work correctly?

조회 수: 2 (최근 30일)
Gili
Gili 2015년 1월 14일
답변: David Young 2015년 1월 14일
I have a complex matrix of size 256x128. When I perform ifft2 the picture is folded across the y direction. The same ifft2 function works well on a symmetric matrix (128x128). Help

답변 (1개)

David Young
David Young 2015년 1월 14일
ifft2 works correctly.
You can demonstrate this with the following code
img = rgb2gray(imread('peppers.png')); % example image
img = img(1:256, 1:128); % make it 256x128
img = double(img)/256; % double, scale to 0-1
imshow(img); % have a look
imgTrans = fft2(img); % transform
imgRestored = ifft2(imgTrans); % inverse transform
figure; imshow(imgRestored); % looks ok
There must be some other problem with the way you generate the 256x128 matrix.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by