dsnew = combine(ds1,ds2,...,dsN)
combines two or more datastores by horizontally concatenating the data returned by the
read function on the input datastores.
Create a datastore that maintains parity between the pair of images of the underlying datastores. For instance, create two separate image datastores, and then create a combined datastore that reads corresponding images from the two image datastores.
Create a datastore imds1 representing a collection of three images.
Create a second datastore imds2 by transforming the images of imds1 to grayscale images.
imds2 = transform(imds1,@(x) rgb2gray(x));
Create a combined datastore from imds1 and imds2.
imdsCombined = combine(imds1,imds2);
Read the first pair of images from the combined datastore. Each read operation on this combined datastore returns a pair of images represented by a 1-by-2 cell array.
ds1,ds2,...,dsN — Datastores to combine datastore objects
Datastores to combine, specified as two or more comma separated datastore objects.
For a complete list of built-in datastores, see Select Datastore for File Format or Application. You also can
specify custom datastores.