Filter löschen
Filter löschen

find total number of images in a folder

142 Ansichten (letzte 30 Tage)
Elysi Cochin
Elysi Cochin am 2 Mär. 2013
Kommentiert: Walter Roberson am 12 Aug. 2019
how to find total number of images in a folder through coding....

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 2 Mär. 2013
Bearbeitet: Azzi Abdelmalek am 2 Mär. 2013
a=dir([yourfolder '/*.jpg'])
out=size(a,1)

Weitere Antworten (1)

Mritula C
Mritula C am 17 Dez. 2018
Thanks,
a=dir([yourfolder '/*.jpg'])
This worked fine!!
  2 Kommentare
Saurabh Sharma
Saurabh Sharma am 11 Aug. 2019
What did you write in place of "yourfolder" ?
Walter Roberson
Walter Roberson am 12 Aug. 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'));

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by