0

请你能帮我更正这段代码吗?我想将每个图像的快速傅立叶变换的结果分开保存,这样我就可以为从 FFT 获得的每个波段重新使用适当的系数来计算函数的贝塞尔势能?我的代码如下,

clc;
close all;
imagefiles = dir('*.jpg'); %any jpg file found in the folder
nfiles = length(imagefiles);    % Number of image files found
stored_values = cell(1,nfiles); % Preallocate the array for saving the values

for ii=1:nfiles

    currentfilename = imagefiles(ii).name;
    I = imread(currentfilename);
    myimage = rgb2gray(I);
    Y = fft2(myimage)
    fftMagnitude = abs(fftshift(Y))
    stored_values{ii}=fftMagnitude %store values of fft

    syms Y
    A = [-1, pi; Y, 0];
    J = besselj((1/2), A)
    stored_values{ii}=J  %save the besselj result in another cell ??

end

代码运行正确,但它没有给出数组中的数字,它只是显示图像的尺寸,所以我认为我误会了再次保存和调用数据的方式。你能帮忙吗?谢谢你。

4

0 回答 0