Creating an image datastore from the images already loaded in the memory

6 visualizzazioni (ultimi 30 giorni)
I was working with the [The Street View House Numbers (SVHN) Dataset][1] and primarily with the `train_32x32.mat` file given. Loading the file as:
load train_32x32.mat
loads 2 variables `X` and `y` in the workspace.
The dimensions of each `X` and `y` are `32 x 32 x 3 x 73257` and `73257 x 1` respectively. I am used to creating an `imageDatastore` and then using `augmentedImageDatastore` to put some form of pre-processing before attempting to create a `CNN`.
But now since `X` already contains the image pixels for `73257` images, is there a way I could still create an `imageDatastore`? For what I could make through the [documentation of imageDatstore][2], it only accepts the physical location of the image directory.
[1]: http://ufldl.stanford.edu/housenumbers/
[2]: https://in.mathworks.com/help/matlab/ref/matlab.io.datastore.imagedatastore.html

Risposte (1)

Image Analyst
Image Analyst il 14 Apr 2019
It doesn't look like there is a way unless you save them to disk files first.
You could then delete those files when your program exits if you want.

Categorie

Scopri di più su Convert Image Type in Help Center e File Exchange

Prodotti


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by