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 views (last 30 days)
Show older comments
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
0 Comments
Answers (1)
DGM
on 8 Oct 2024
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:
0 Comments
See Also
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!