i want to display multiple images in the folder using montage function, to display as all images in one rectangular frame. please any one help me

4 次查看(过去 30 天)
if true
% fileFolder='folder path';
dirOutput = dir(fullfile(fileFolder,'*.jpg'));
fileNames = {dirOutput.name};
montage(fileNames.names);
end
the code i have used is
i got message error images.internal.getImageFromFile

回答(1 个)

DGM
DGM 2024-10-8
The variable fileNames is a cell array. It doesn't have a .names field. It's a list of filenames, but the filenames don't have the path prefix, so they're not usable as they are. Construct a cell array of complete filenames. Either that, or use an imageDatastore.
See:

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by