How to show all jpg images saved in MATLAB folder?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
storedStructure = dir('*.jpg')
How should I proceed?
2 commentaires
Réponse acceptée
Plus de réponses (4)
Bjorn Gustavsson
le 1 Fév 2016
Perhaps one of the submissions creating thumbnails (into tables guis or the like) found on the file exchange does what you want: Thumbnaily submissions
0 commentaires
DGM
le 14 Fév 2023
Modifié(e) : DGM
le 24 Fév 2023
(Almost) straight from the docs for montage:
% Create a montage from a series of JPG images in a directory
targetpath = fullfile(matlabroot,'toolbox','images','imdata','*.jpg');
imds = imageDatastore(targetpath);
montage(imds);
Alternatively, without using imageDatastore():
% Create a montage from a series of JPG images in a directory
targetpath = fullfile(matlabroot,'toolbox','images','imdata','*.jpg');
S = dir(targetpath);
allpaths = fullfile({S.folder},{S.name});
montage(allpaths);
In either case, if you want to actually save the output to a new image file, don't use montage(). Use imtile() instead and save the result using imwrite(). Most of the syntax overlaps between the two, so it should be fairly straightforward.
Image Analyst
le 1 Fév 2016
This is answered in the second chunk of code in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F
0 commentaires
Voir également
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
