How to make a code that loads specific images from multiple subfolders within a single folder?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
So basically I used readtable to create a table of several hundred image names from different folders. I am trying to load the images listed in the table, which are from multiple sub-folders within a main folder. I have 2 days of coding experience so I don't really know where to start.
0 Commenti
Risposte (2)
Image Analyst
il 12 Giu 2018
See if you have the ImageDatastore function in your release:
Description An ImageDatastore object manages a collection of image files, where each individual image fits in memory, but the entire collection of images does not necessarily fit. To create an ImageDatastore object, use either the imageDatastore function or the datastore function. Once the object is created, you can specify ImageDatastore properties using dot notation and use functions that access and manage the data.
It can handle images in subfolders of some top level folder. Otherwise, see dir() like in the attached examples.
0 Commenti
jonas
il 12 Giu 2018
Modificato: jonas
il 12 Giu 2018
search for 'Add Folder and Its Subfolders to Search Path'
if you have all image names in your table, just load them by
imread('filename')
Best general advice I can give you: google your issues and you will in 9 times out of 10 find a solution within a minute, either from the doc or from a previous question on this forum
0 Commenti
Vedere anche
Categorie
Scopri di più su Computer Vision Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!