Color Code Labels
Color codes the labels of object masks by a random permutation.
colorLabels(x, normalize = TRUE)
x |
an |
normalize |
if TRUE normalizes the resulting color image |
Performs color coding of object masks, which are typically obtained using the bwlabel
function. Each label from x
is assigned an unique color. The colors are distributed among the labels using a random permutation. If normalize
is set to TRUE
the intensity values of the resulting image are mapped to the [0,1] range.
An Image
object containing color coded objects of x
.
Bernd Fischer, Andrzej Oles, 2013-2014
x = readImage(system.file('images', 'shapes.png', package='EBImage')) x = x[110:512,1:130] y = bwlabel(x) z = colorLabels(y) display(z, title='Colored segmentation')
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.