How to load many images at the same time?
I have a problem loading multiple images at the same time using matlab. Could anyb开发者_StackOverflowody me?
How about writing a small program?
- 'uigetdir' [http://www.mathworks.com/help/techdoc/ref/uigetdir.html] to let user to select the directory where image files are.
- 'dir' and determine the names of the files in that directory.
- 'listdlg' to create a list of files on a GUI, with 'SelectionMode' as 'multiple'
- check the file extension (you can do this before #3 also to show only image files in the list.)
- count (N) how many image files the user wants to load and plot ('length' of the selected filename string).
- loop for N times and go through the list of filenames, and open each one with the appropriate loader function (by determining the file extension of each file before loading)
- as you load the data from the files, you can plot them however you like either in a single figure or multiple.
Best, Y.T.
精彩评论