Representing the result in grayscale
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
med-sweng
am 12 Nov. 2013
Kommentiert: med-sweng
am 13 Nov. 2013
I'm working with this script. The issue is that the result is coloured and I want it in grayscale, but couldn't figure what to change in the script to do that. Do you know what changes I should perform to get the result as grayscale?
Thanks.
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 12 Nov. 2013
L is the output of the classification. It's a monochrome image. Just use that and not Lrgb which he just created to make the classification regions colorful. So you already have what you want, which is the L array. There is nothing else you need to do.
3 Kommentare
Image Analyst
am 12 Nov. 2013
Bearbeitet: Image Analyst
am 12 Nov. 2013
That's because it has values of only 0, 1, or 2 due to there being 3 classes. So it looks too dark to see when the max range is 255. To increase the contrast, use []:
imshow(L, []);
0 will stay 0, 1 will map to 128, and 2 will be 255.
Weitere Antworten (1)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!