필터 지우기
필터 지우기

find total number of images in a folder

조회 수: 180 (최근 30일)
Elysi Cochin
Elysi Cochin 2013년 3월 2일
댓글: Walter Roberson 2019년 8월 12일
how to find total number of images in a folder through coding....

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 3월 2일
편집: Azzi Abdelmalek 2013년 3월 2일
a=dir([yourfolder '/*.jpg'])
out=size(a,1)

추가 답변 (1개)

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

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by