Combine Image Datastore - Error using preview

1 view (last 30 days)
Hi, I am trying to combine three types of image datastores - raw image datastore, augmented image datastore and denoising image datastore.
I have used the combine() as below:
----------
imdsTrainCombined = combine(augimdsTrain,dndsimdsTrain, imdsTrain);
minibatchCom = preview(imdsTrainCombined);
montage(minibatchCom.input)
----------
However, when i try to preview the contents of the combined store, I get the following error:
----------
Error using matlab.io.datastore.CombinedDatastore/read (line 109)
All tables in the bracketed expression must have the same number of rows.
Error in matlab.io.Datastore/preview (line 273)
data = read(copyds);
Error in CVCW_TrainModels (line 64)
minibatchCom = preview(imdsTrainCombined);
----------
Each datastore has 1700 grayscale images with size 224x224
Could anyone pls help understand what is going wrong here?

Answers (1)

Sai Bhargav Avula
Sai Bhargav Avula on 12 May 2020
Hi,
I think the error is because of different sizes of the datastore. All tables being horizontally concatenated must have the same number of rows. This might be happening because of the augumented datastore that was used.
A workaround is to directly read the data from the combinedDatastore and use montage over that accordingly.
Hope this helps!

Categories

Find more on Images 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!