Convert labeled image into RGB.
The labeled image L is converted into an RGB image using the colormap cmap. The label number of each region is used to select the color from cmap which can be specified as:
jet
).
In a labeled image, zero valued pixels are considered background and are colored according to the color background. It can be specified as an RGB triplet values (3 element vector of values between 0 and 1), or by name:
"w"
or "white"
(default)
"b"
or "blue"
.
"c"
or "cyan"
.
"g"
or "green"
.
"k"
or "black"
.
"m"
or "magenta"
.
"r"
or "red"
.
"y"
or "yellow"
.
The option order must be a string with values "shuffle"
or
"noshuffle"
(default). If shuffled, the colors in cmap are
permuted randomly before the image conversion.
The output RGB image is always of class uint8.
See also: bwconncomp, bwlabel, colormap, ind2rgb.
Package: image