Filter löschen
Filter löschen

GUI for reading multiple images into MATLAB

1 Ansicht (letzte 30 Tage)
Karthik
Karthik am 22 Jul. 2015
Beantwortet: Azzi Abdelmalek am 22 Jul. 2015
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 Kommentare
Azzi Abdelmalek
Azzi Abdelmalek am 22 Jul. 2015
What error? show the message
Karthik
Karthik am 22 Jul. 2015
I fixed it. I din't specify the path name in imread. Thanks

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 22 Jul. 2015
Use
file=fullfile(PathName,FileNames{i})
image = imread(file);

Weitere Antworten (0)

Kategorien

Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by