フィルターのクリア

sprintf in a loop with a file name

2 ビュー (過去 30 日間)
Richard Catania
Richard Catania 2020 年 10 月 1 日
コメント済み: Adam Danz 2020 年 10 月 1 日
I lost on how to proceed. I need to save each iteration as its own png file:
Code:
for i=1:76
mask=pixel_labels==(i);
cluster=RGB.*uint8(mask(i));
imagename=sprintf('Cluster%d.png',i);
imwrite(cluster,imagename)
end
  2 件のコメント
madhan ravi
madhan ravi 2020 年 10 月 1 日
And the above doesn’t do it?
Adam Danz
Adam Danz 2020 年 10 月 1 日
imwrite does not support writing of indexed PNG files that have insufficient colormap entries. If that's the case for your images, try using imwrite(A,map,filename)

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeBlue についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by