How to show all jpg images saved in MATLAB folder?

25 views (last 30 days)
Explorer
Explorer on 1 Feb 2016
Answered: Image Analyst on 1 Feb 2016
storedStructure = dir('*.jpg')
How should I proceed?
  2 Comments
Explorer
Explorer on 1 Feb 2016
Yes, it may be. But still I want to know how can I do this?

Sign in to comment.

Accepted Answer

Stephen23
Stephen23 on 1 Feb 2016
Edited: Stephen23 on 1 Feb 2016
This displays all of the jpg images in the current directory:
S = dir('*.jpg');
for k = 1:numel(S)
figure();
image(imread(S(k).name))
axis('image');
end
Note: this code will not work with indexed image formats.

More Answers (3)

Bjorn Gustavsson
Bjorn Gustavsson on 1 Feb 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

Walter Roberson
Walter Roberson on 1 Feb 2016
ls *.jpg
if you just want to list them to the screen.
  1 Comment
Explorer
Explorer on 1 Feb 2016
No, I do not want their names. I want to show images.

Sign in to comment.


Image Analyst
Image Analyst on 1 Feb 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

Community Treasure Hunt

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

Start Hunting!

Translated by