A file does not appear

4 ビュー (過去 30 日間)
PEDRO ALEXANDRE Fernandes
PEDRO ALEXANDRE Fernandes 2022 年 7 月 13 日
コメント済み: Stephen23 2022 年 7 月 18 日
I have a code that fetches the files about images from a folder. However, if I put two files it only returns 1 and not both. If I want to go to a directory and have two subfolders and want to get files from one folder and the other folder how can I do it?
clc;
close all;
clear;
workspace;
fontSize = 10;
imagePath = uigetdir('c:\');
imageFiles = [dir(fullfile(imagePath,'*.jpeg')); dir(fullfile(imagePath,'*.TIF')); dir(fullfile(imagePath,'*.PNG'))];
files = size({imageFiles.name},2);
filename = {imageFiles.name};
for i=1:files
f = fullfile(imagePath,char(filename(i)));
image= imread(f);
imshow(image)
FT=fft2(image);
magnitude=abs(fftshift(FT));
end
  6 件のコメント
PEDRO ALEXANDRE Fernandes
PEDRO ALEXANDRE Fernandes 2022 年 7 月 18 日
Good afternoon.
Stephen23 you are right. The problem is that I am not seeing a way to solve the problem..
Stephen23
Stephen23 2022 年 7 月 18 日
"The problem is that I am not seeing a way to solve the problem.."

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by