convert label to RGB image

2 次查看(过去 30 天)
marwa Saad
marwa Saad 2018-7-29
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, (num2stra), .png)
Camp= [101; 011;100]
RGB= label2rgb(I,cmap)
imwrite(image location,num2str(a))
end
  1 个评论
KALYAN ACHARJYA
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
Image Analyst 2018-7-29
I is most likely not a labeled image. Also, the Camp line is messed up.

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by