read
Read data from randomPatchExtractionDatastore
Description
Input Arguments
patchds
— Random patch extraction datastore
randomPatchExtractionDatastore
Random patch extraction datastore, specified as a randomPatchExtractionDatastore
object. The datastore specifies a MiniBatchSize
number of
observations in each batch, and a numObservations
total
number of observations.
Output Arguments
data
— Output data
table
Output data, returned as a table with MiniBatchSize
number of rows.
The first variable is
InputImage
and contains input image patches.If the network responses are images in an image datastore, then the second variable is
ResponseImage
.If the network responses are pixel label images in a pixel label datastore, then the second variable is
ResponsePixelLabelImage
.
Each column contains a cell array of patches of size determined by
PatchSize
and the type of image data.
For 2-D single-channel images, the patches are size m-byn, where m specifies the number of rows and n specifies the number of columns in the patch.
For 2-D multi-channel images, the patches are size m-byn-by-c, where c specifies the number of color channels of the patch. c is 3 for RGB images.
For 3-D single-channel volumetric images, the patches are size m-byn-by-p, where p specifies the number of planes of the volume.
For the last batch of data in the datastore patchds
, if
numObservations
is not cleanly divisible by
MiniBatchSize
, then read
returns a partial batch
containing all the remaining observations in the datastore.
info
— Information about read data
structure array
Information about read data, returned as a structure array. The structure array can contain the following fields.
Field Name | Description |
---|---|
RandomPatchRectangles | MiniBatchSize -by-4 numeric matrix. Each row specifies
the size and position of the patch in the format [xywidthheight]. The elements
define the x- and y-coordinate of the top left corner, and the width and
height of the patch. |
ImageIndices | MiniBatchSize -by-1 numeric vector that specifies the
indices of the read images in the input datastores. |
InputImageFilename | MiniBatchSize -by-1 cell array that specifies the fully
resolved path containing the path string, name of the file, and file extension
of each input image. |
ResponseImageFilename | MiniBatchSize -by-1 cell array that specifies the fully
resolved path containing the path string, name of the file, and file extension
of each response image or pixel label image. |
Version History
Introduced in R2018b
See Also
randomPatchExtractionDatastore
| read (Datastore)
| readByIndex
| readall
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)