shuffle
Shuffle all data in datastore
Syntax
Description
Examples
Create an ImageDatastore object
imds. Shuffle the files to create a new datastore
containing the same files in random order.
imds = imageDatastore(["cloudCombined.png","example.tif","landOcean.jpg","street2.jpg","corn.tif"]); imdsrand = shuffle(imds)
imdsrand =
ImageDatastore with properties:
Files: {
'C:\folder1\landOcean.jpg';
'C:\folder1\cloudCombined.png';
'C:\folder1\corn.tif'
... and 2 more
}
Folders: {
'C:\folder1'
}
AlternateFileSystemRoots: {}
ReadSize: 1
Labels: {}
SupportedOutputFormats: ["png" "jpg" "jpeg" "tif" "tiff"]
DefaultOutputFormat: "png"
ReadFcn: @readDatastoreImage
Input Arguments
Input datastore, specified as a datastore object. The input datastore can
be any datastore for which isShuffleable returns true (such as
imageDatastore). The input
datastore also can be a CombinedDatastore, SequentialDatastore, or TransformedDatastore for which all underlying datastores are
shuffleable.
Output Arguments
Output datastore, returned as a datastore object containing randomly
ordered data from ds.
Extended Capabilities
The shuffle function supports
thread-based environments with these usage notes and limitations:
In a thread-based environment, you can use
shuffleonly with the following datastores:ImageDatastoreobjectsCombinedDatastore,SequentialDatastore, orTransformedDatastoreobjects you create fromImageDatastoreobjects by usingcombineortransform
You can use
shufflewith other datastores if you have Parallel Computing Toolbox™. To do so, run the function using a process-backed parallel pool instead of usingbackgroundPoolorThreadPool(use eitherProcessPoolorClusterPool).
For more information, see Run MATLAB Functions in Thread-Based Environment.
Version History
Introduced in R2016a
See Also
ImageDatastore | datastore | isShuffleable | matlab.io.Datastore
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)