Convert RGB image to label
Mostra commenti meno recenti
This function converts my labeled image into an RGB https://www.mathworks.com/help/images/ref/label2rgb.html Is it possible to convert an RGB image into a labeled one ? Because the algorithm I am running returns me a color per label but I need the label only.
I tried the solution posted below but it didnt give me the right results. The first image is the output of the algorithm, each cluster in the image has its own color. The second image is the result of running the code below.
BW = im2bw(I, graythresh(I));
CC = bwconncomp(BW);
L = labelmatrix(CC);
imagesc(L);


Risposta accettata
Più risposte (1)
Categorie
Scopri di più su Modify Image Colors in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
