OutputSizeMode error in augmentedImageDatastore?

3 vues (au cours des 30 derniers jours)
Nisar Ahmed
Nisar Ahmed le 4 Sep 2021
The images in my dataset are all 512x512 color images but when I process them with the following code:
imageSize=[299 299];
imageAugmenter = imageDataAugmenter('RandXReflection',true, 'RandXTranslation',[-100 100],'RandYTranslation',[-100 100],'RandRotation',[-5,5]);
augimdsTrain = augmentedImageDatastore(imageSize,imdsTrain,'DataAugmentation',imageAugmenter,'OutputSizeMode','centercrop');
augimdsValidation = augmentedImageDatastore(imageSize,imdsValidation,'OutputSizeMode','centercrop');
I get the error that the image size should be smaller then OutputSizeMode which is already true as the images are larger then [299 299]. Please assist me to guide where I am wrong.
When 'OutputSizeMode' in augmentedImageDatastore is 'centercrop', requested 'OutputSize' must be smaller than input image size.

Réponses (0)

Catégories

En savoir plus sur Read, Write, and Modify Image dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by