How to specify custom colors for labels in a labeled image? "label2rgb"
8 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Aliyu Abdu
el 11 de En. de 2018
Comentada: Aliyu Abdu
el 11 de En. de 2018
I want to save a label image assigning custom colors to each label. For example label 0 'red', label 1 'blue' etc. I used the function 'label2rgb' and obtained the image shown.
.....
Label_Image = label2rgb(pixel_labels);
figure, imshow(Label_Image)
Please I need help in specifying my own custom colors for each label.
0 comentarios
Respuesta aceptada
Walter Roberson
el 11 de En. de 2018
https://www.mathworks.com/help/images/ref/label2rgb.html
Pass your color map as the second argument
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!