Is there a way to visualize augmented image data created by imageDataAugmenter()?

I would like to confirm a few images just to understand what imageDataAugmenter does. Is there a way to visualize the augmented image data created by the imageDataAugmenter?

ANSWER provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

For R2018a.

In R2018a, the ‘augmentedImageSource’ has been replaced by ‘augmentedImageDatastore’ and the ‘preview’ method can be used to preview the data as follows:

augimds = augmentedImageDatastore(…)
ims = augimds.preview();
montage(ims{1:6,1}) % to visualize 6 images

‘preview’ does not reset the datastore.

In alternative, the method ‘read’ can be used to view the next batch of data as shown below:

augimds = augmentedImageDatastore(…);
numBatches = ceil(augimds.NumObservations / augimds.MiniBatchSize);
for i = 1:numBatches
ims =;


For R2017b:

The built-in functionality to do this is not available on Neural Network Toolbox (R2017b).

1) One of the possible workarounds is to make use of augmentedImageSource’s hidden methods and properties for iterating over the data. For example:




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Technical Source

Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.