GUI for reading multiple images into MATLAB

1 次查看(过去 30 天)
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.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2015-7-22
Use
file=fullfile(PathName,FileNames{i})
image = imread(file);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by