"Attempt to execute SCRIPT fft2 as a function" Don't know how to solve this mistake. fft2 is a function of matlab. Thanks!
3 ビュー (過去 30 日間)
古いコメントを表示
clc;clear;
datos = imread('/users/Desktop/arroz.png');
U = im2double(datos);
[N,M] = size(datos);
P = 2*N;
Q = 2*M;
K1 = [0.0509 0.1238 0.0509;0.1238 0.3012 0.1238;0.0509 0.1238 0.0509];
K2 = [0.4444 0.1111 0.4444;0.1111 -2.2222 0.1111; 0.4444 0.1111 0.4444];
h1 = conv2(U,K1,'same');
h2 = conv2(U,K2,'same');
figure;
subplot(1,2,1);imshow(h1,[]);title('Convolución con kernel K1');
subplot(1,2,2);imshow(h2,[]);title('Convolución con kernel K2');
ZP1 = zeros(P,Q);
ZP2 = zeros(P,Q);
ZP1(1:N,1:M) = h1;
ZP2(1:N,1:M) = h2;
DFT1 = fft2(ZP1);
DFT2 = fft2(ZP2);
figure;
subplot(1,2,1);imshow(log(abs(DFT1))+1,[]);title('DFT de imagen convolucionada con K1');
subplot(1,2,2);imshow(log(abs(DFT2))+1,[]);title('DFT de imagen convolucionada con K2');
0 件のコメント
採用された回答
Star Strider
2016 年 11 月 21 日
You have a file in your user directory called ‘fft2’. Find it with:
which fft2 -all
then find the file in your user directory, and re-name it to something that does not conflict with any built-in MATLAB function name.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!