how to compute the number of image from subfolder ?

1 回表示 (過去 30 日間)
youb mr
youb mr 2020 年 9 月 7 日
編集済み: Jan 2020 年 9 月 7 日
hello every one i want to compute the number of images from image dataset witch have many subfolder
d = dir(fullfile(('.\databasee\')))
num =length(d)
witch databasee it's the folder that contain many subfolder of images when i run the code it doesn't give me the number of imges

採用された回答

Jan
Jan 2020 年 9 月 7 日
編集済み: Jan 2020 年 9 月 7 日
fullfile(('.\databasee\')) is exactly the same as its input: '.\databasee\'. The unnecessary parentheses are confusing only.
To get all .jpg images in subfolders:
d = dir('.\databasee\**\*.jpg');
num = numel(d)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by