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)
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

Answers (1)

DGM
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:

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!