How can I save augmented images to file or folder ?

I would like to see, how images would be after apply image augmentation.

7 Comments

I have the same question. After careful review of the documentation on imageDataAugmenter, there is no clear way to access/view/save the perturbed images to visually confirm that transformations are being applied as intended.
And I agree that it would be useful to be able to save-out perturbed images.
I have the same problem,too. Any one has idea??
I too have the same problem.. If anyone could find an answer .. please reply
It doesn't seem to be an option in the Computer Vision System Toolbox for R2018.
I have same issue.. have you found some solution? please reply..
How can I save augmented images to file or folder ?
anyone please share your experience

Sign in to comment.

 Accepted Answer

2 Comments

sorry, for the question is not clear. Here is my code:
imds = imageDatastore({'street1.jpg','street2.jpg','peppers.png','corn.tif'})
imageAugmenter = imageDataAugmenter('RandRotation',[-180 180]);
imageSize = [28 28 1];
datasource = augmentedImageSource(imageSize,imds,'DataAugmentation',imageAugmenter);
I would like to see augmented images in datasource after apply augmentedImageSource(). Furthermore, I would like to know how many images that will generate from an original image after apply augmentedImageSource()?
Thank you.
Sorry, I don't use imageDatastore() or augmentedImageSource(), so you'll just have to read the documentation or call tech support.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 10 Apr 2020
Edited: Image Analyst on 10 Apr 2020
From the help for augmentedImageSource():
Tips
  • You can visualize many transformed images in the same figure by using the imtile function. For example, this code displays one mini-batch of transformed images from an augmented image datastore called auimds.minibatch = read(auimds);
imshow(imtile(minibatch.input))
  • By default, resizing is the only image preprocessing operation performed on images. Enable additional preprocessing operations by using the DataAugmentation name-value pair argument with an imageDataAugmenter object. Each time images are read from the augmented image datastore, a different random combination of preprocessing operations are applied to each image.

2 Comments

imshow(imtile(minibatch.input))its working ...
what is the procdure for store the images? ...
out = imtile(I) returns a tiled image containing all the frames of the multiframe image array I. A multiframe image array can be a sequence of binary, grayscale, or truecolor images.
You can then use imwrite to save the out image to a file.

Sign in to comment.

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!