I got a question about using montage function,and I really need help. I was trying to use this function to display 16 pics together just like the video shows, but there were several bugs that I cannot figure it out,please look at two pictures down below.
imds = imageDatastore('I:\pics\test',... 'IncludeSubfolders',true,'LabelSource','foldernames') ; %% Display Class Names and Counts tbl = countEachLabel(imds) categories = tbl.Label;
%% Display Sampling of Image Data sample = splitEachLabel(imds,16); montage(sample.Files(1:16)); title(char(tbl.Label(1)));
%% Show sampling of all data for ii = 1:4 sf = (ii-1)*16 +1; ax(ii) = subplot(2,2,ii); montage(sample.Files(sf:sf+3)); title(char(tbl.Label(ii))); end

 採用された回答

KSSV
KSSV 2017 年 3 月 16 日

0 投票

montage accepts images of same size it seems. Resize the images to same dimensions using imresize.

1 件のコメント

Yoski Chard
Yoski Chard 2017 年 3 月 16 日
thank you,it works~

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeRead, Write, and Modify Image についてさらに検索

タグ

質問済み:

2017 年 3 月 16 日

コメント済み:

2017 年 3 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by