cannot resize images in a datastore
Afficher commentaires plus anciens
I was going through the Deep Learning with MATLAB course and working on the first project. I tried to resize the images to feed them into googlenet. The original datastore had 1000+ images of size [200 200 3]. I tried:
trainds = augmentedImageDatastore([224 224],original_trainds);
but when I read the first image, the size had not changed. The baffling part was that when I looked at the provided solution, it was exactly what I had thought.
trainDs = augmentedImageDatastore([224 224],trainImgs);
I don't know which step went wrong. Thanks for your help.
Réponse acceptée
Plus de réponses (1)
yes,sir,may be augmentedImageDatastore process as function,such as
which cameraman.tif
imdsTrain = imageDatastore(fullfile(matlabroot,'toolbox/images/imdata'), ...
'IncludeSubfolders',true,'LabelSource','foldernames');
augimdsTrain = augmentedImageDatastore([224 224],imdsTrain,'ColorPreprocessing','gray2rgb');
img1 = readimage(imdsTrain,1);
size(img1)
db = read(augimdsTrain);
img2 = db.input{1};
size(img2)
Catégories
En savoir plus sur Image Processing and Computer Vision dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!