countEachLabel
ImageDatastore 레이블의 파일 개수 계산
설명
예제
레이블 개수
ImageDatastore
객체를 만들고 이 객체가 포함되는 폴더에 따라 각 이미지의 레이블을 지정합니다.
imds = imageDatastore(fullfile(matlabroot, 'toolbox', 'matlab', {'demos','imagesci'}),... 'LabelSource', 'foldernames', 'FileExtensions', {'.jpg', '.png', '.tif'})
imds = ImageDatastore with properties: Files: { ' ...\matlab\toolbox\matlab\demos\cloudCombined.jpg'; ' ...\matlab\toolbox\matlab\demos\example.tif'; ' ...\matlab\toolbox\matlab\demos\landOcean.jpg' ... and 5 more } Labels: [demos; demos; demos ... and 5 more categorical] ReadFcn: @readDatastoreImage
각 레이블에 대한 파일 개수를 나열합니다.
T = countEachLabel(imds)
T = Label Count ________ _____ demos 6 imagesci 2
입력 인수
imds
— 입력 데이터저장소
ImageDatastore
객체
입력 데이터저장소로, ImageDatastore
객체로 지정됩니다. 이미지 데이터에서 ImageDatastore
를 생성하려면 imageDatastore
함수를 사용하십시오.
출력 인수
T
— 레이블 개수를 보여주는 테이블
2열 테이블
레이블 개수를 보여주는 테이블로, imds
에 포함된 각 레이블의 이름과 각 레이블에 연결된 파일의 개수를 포함하는 2열 테이블로 반환됩니다.
데이터형: table
확장 기능
스레드 기반 환경
MATLAB®의 backgroundPool
을 사용해 백그라운드에서 코드를 실행하거나 Parallel Computing Toolbox™의 ThreadPool
을 사용해 코드 실행 속도를 높일 수 있습니다.
이 함수는 스레드 기반 환경을 완전히 지원합니다. 자세한 내용은 스레드 기반 환경에서 MATLAB 함수 실행하기 항목을 참조하십시오.
버전 내역
R2016a에 개발됨
참고 항목
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)