cannot resize images in a datastore
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (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)
Categorías
Más información sobre Image Processing and Computer Vision en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!