sprintf in a loop with a file name
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Adam Danz
am 1 Okt. 2020
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)
Antworten (0)
Siehe auch
Kategorien
Mehr zu Blue finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!