How to make a code that loads specific images from multiple subfolders within a single folder?
4 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Image Analyst
2018 年 6 月 12 日
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 件のコメント
jonas
2018 年 6 月 12 日
編集済み: jonas
2018 年 6 月 12 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Computer Vision Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!