Effacer les filtres
Effacer les filtres

find total number of images in a folder

181 vues (au cours des 30 derniers jours)
Elysi Cochin
Elysi Cochin le 2 Mar 2013
Commenté : Walter Roberson le 12 Août 2019
how to find total number of images in a folder through coding....

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 2 Mar 2013
Modifié(e) : Azzi Abdelmalek le 2 Mar 2013
a=dir([yourfolder '/*.jpg'])
out=size(a,1)

Plus de réponses (1)

Mritula C
Mritula C le 17 Déc 2018
Thanks,
a=dir([yourfolder '/*.jpg'])
This worked fine!!
  2 commentaires
Saurabh Sharma
Saurabh Sharma le 11 Août 2019
What did you write in place of "yourfolder" ?
Walter Roberson
Walter Roberson le 12 Août 2019
The folder name that you wanted to find the images of.
We recommend using fullfile() instead of the code there:
yourfolder = 'C:\Students\CS907\Assignment3\BananaPictures';
a = dir(fullfile(yourfolder, '*.jpg'));

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by