readAllImages

버전 1.1.0.0 (5.03 KB) 작성자: Phil
Reads all the images in a given directory
다운로드 수: 128
업데이트 날짜: 2015/3/9

라이선스 보기

A simple class that iterates through a given directory and loads all the images. You can either iterate through the images with the getNext() function or load all the images into a cell array with the getAll() function.
obj=readAllImages(DIRNAME) constructs an object to read all images in
the directory DIRNAME. Use it with the getNext method or the
getAll methods to either iterate through the directory and return a
single image at a time, or return all the images within the directory
into a cell array. Multiple directories can be read if DIRNAME is a
cell array of directory names.

The list of extensions used to search for images is contained in the
extName property. This can be overridden either by directly modifying
the property or via the class constructor options.
Setting property returnTypeDouble to true forces all images to be of
type double and over the range 0 to 1.

An example use

%finds the Matlab directory with the the demo images
pth = fileparts(which('cameraman.tif'));
%use the default constructor
ra=readAllImages(pth);
%cycle through all images
while 1
img=ra.getNext();
if isempty(img)
%getNext returns [] when there are no more images.
break;
end
imshow(img)
pause(1)
end

인용 양식

Phil (2024). readAllImages (https://www.mathworks.com/matlabcentral/fileexchange/49891-readallimages), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Search Path에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Updated documentation, added support for multiple directories.

1.0.0.0