(Not recommended) Select subset of images from image set
Read images from a folder.
imgFolder = fullfile(matlabroot,'toolbox','vision','visiondata','stopSignImages'); imgSet = imageSet(imgFolder);
Select images 2 and 4 from the image set.
imgSetOut = select(imgSet, [2, 4]);
Select every other image from the image set.
imgSetOut2 = select(imgSet, 1:2:imgSet.Count);
idx— Image location index
Image location index, specified as a scalar, vector of linear indices, or
a vector of logical indices. The function uses the
index to select the subset of images.
selectis not recommended
Not recommended starting in R2016b