convert label to RGB image
2 次查看(过去 30 天)
显示 更早的评论
I use the label2rgb() function to convert pixellabel produced by image labeller to RGB image for set of images, but the code is not working.
for a=1:100
I =imread(‘image location, (num2str’a’), .png’)
Camp= [101; 011;100]
RGB= label2rgb(I,cmap)
imwrite(image location,’num2str(a))
end
1 个评论
KALYAN ACHARJYA
2018-7-29
编辑:KALYAN ACHARJYA
2018-7-29
Can you share one image, for example, so we can try? Suggest you use the function label2rgb for the single image separately and check, whether it working their or not? What is error?
回答(1 个)
Image Analyst
2018-7-29
I is most likely not a labeled image. Also, the Camp line is messed up.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!