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

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 Exchange에서 Images에 대해 자세히 알아보기

질문:

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