label2rgb() and custom color assigment
3 ビュー (過去 30 日間)
古いコメントを表示
Hello
I have a question concerning the label2rgb () function. I have used the decision tree classifier and I have come up with the classification result of a dataset. I would like to know to use the label2rgb() to assign specific colors to each labeled element. I have seen the examples contained in the label2rgb function but does not point out how can be used to assign specific colors to each label (except the background ).
Can you please give me a hint how this can be make ?
Thank you in advance.
0 件のコメント
回答 (2 件)
Sean de Wolski
2012 年 6 月 11 日
Feed it an nx3 map of colors you want with each row of the map corresponding to that label, e.g:
x = [1 0 2];
label2rgb(x,[0.1 0.17 0.67;0.3 0.49 0.72])
0 件のコメント
Dimitris M
2012 年 6 月 11 日
1 件のコメント
Veena Chatti
2020 年 10 月 5 日
Hi, did you ever figure this out? I'm trying to do something similar and was hoping there are some solutions already out there I can try.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!