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 visualizaciones (últimos 30 días)
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

Respuestas (1)

DGM
DGM el 8 de Oct. de 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:

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by