FFT2 command error

13 ビュー (過去 30 日間)
William Klingenstein
William Klingenstein 2020 年 11 月 29 日
コメント済み: Stephan 2020 年 12 月 1 日
I have written a program implementing the fft2 command to get the Fourier transformation of an image along with other changes and i keep recieving an out put error for:
Error in fft2 (line 17)
F=fft2(imdata);
Below is my code for this program. I also wrote the program another way and had the same error fo the same function.
clear all; close all; clc
imdata = imread('BluOrn Star.jpg');
figure(1);imshow(imdata);
originalRGBImage = imdata; % Save original image for later display in figure (7)
title('Original Image');
imdata = rgb2gray(imdata);
figure(2); imshow(imdata); title('Gray Image');
%Get Fourier Transform of an image
F = fft2(imdata);
% Fourier transform of an image
S = abs(F);
figure(3);imshow(S,[]);title('Fourier transform of an image');
%get the centered spectrum
Fsh = fftshift(F);
figure(4);imshow(abs(Fsh),[]);title('Centered fourier transform of Image')
%apply log transform
S2 = log(1+abs(Fsh));
figure(5);imshow(S2,[]);title('log transformed Image')
%reconstruct the Image
F = ifftshift(Fsh);
f = ifft2(F);
figure(6);imshow(f,[]),title('reconstructed Image')
h7 = figure(7);
imshow(originalRGBImage);
  1 件のコメント
Stephan
Stephan 2020 年 12 月 1 日
What shows up for:
which fft2 -all

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by