read

Class: imageSet

Read image at specified index

Syntax

image = read(imgSet,idx)

Description

image = read(imgSet,idx) returns an image from the imgSet image set, located at the index idx.

Input Arguments

expand all

Image set, specified as an array of imageSet objects.

Image location index, specified as a scalar value.

Examples

expand all

Create an image set.

imgFolder = fullfile(matlabroot,'toolbox','vision','visiondata','stopSignImages');
imgSet  = imageSet(imgFolder);

Display the fourth image from the set.

imshow(read(imgSet, 4));