GUI for reading multiple images into MATLAB

Hi, I am using the following code to load and read multiple images into matlab.
[FileNames,PathName] = uigetfile('*.bmp', 'Chose files to load:','MultiSelect','on');
nfiles = length(FileNames);
image_array = {nfiles};
for i = 1:nfiles
image = imread(FileNames(i));
image_array{i} = image;
end
But, its throwing an error at first line within the for loop. Can you let me know how to fix this ? Thanks.

2 件のコメント

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 22 日
What error? show the message
Karthik
Karthik 2015 年 7 月 22 日
I fixed it. I din't specify the path name in imread. Thanks

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

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2015 年 7 月 22 日

0 投票

Use
file=fullfile(PathName,FileNames{i})
image = imread(file);

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

2015 年 7 月 22 日

回答済み:

2015 年 7 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by