How Can I save magnitude & phase of 10 gray images in 2 folders

1 visualización (últimos 30 días)
Ali Noori
Ali Noori el 3 de Mzo. de 2015
Editada: Ali Noori el 3 de Mzo. de 2015
Storing FFT results in two folder (the first folder for magnitude (10 magnitude images) and another for phase (10 phase images)
my code: srcFiles = dir('C:\Users\Documents\MATLAB\Framesali2\*.png'); % the folder in which % ur images exists for i = 1 : length(srcFiles) filename = strcat('C:\Users\Documents\MATLAB\Framesali2\',srcFiles(i).name); I = imread(filename); %########################################################### Gray =rgb2gray(I); % convert all images to gray fftA = fft2(Gray); %
figure, imshow(abs(fftshift(fftA)),[24 100000]), colormap gray title('FFT Magnitude') figure, imshow(angle(fftshift(fftA)),[-pi pi]), colormap gray title('FFT Phase') end
I'd like to save magnitude images and phase images in 2 separated folders.
Regards

Respuestas (0)

Categorías

Más información sobre Blue en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by