label2rgb(label, image=None, colors=None, alpha=0.3, bg_label=-1, bg_color=(0, 0, 0), image_alpha=1, kind='overlay')
Integer array of labels with the same shape as :None:None:`image`
.
Image used as underlay for labels. If the input is an RGB image, it's converted to grayscale before coloring.
List of colors. If the number of labels exceeds the number of colors, then the colors are cycled.
Opacity of colorized labels. Ignored if image is :None:None:`None`
.
Label that's treated as the background. If :None:None:`bg_label`
is specified, :None:None:`bg_color`
is :None:None:`None`
, and :None:None:`kind`
is :None:None:`overlay`
, background is not painted by any colors.
Background color. Must be a name in :None:None:`color_dict`
or RGB float values between [0, 1].
Opacity of the image.
The kind of color image desired. 'overlay' cycles over defined colors and overlays the colored labels over the original image. 'avg' replaces each labeled segment with its average color, for a stained-class or pastel painting appearance.
The result of blending a cycling colormap (:None:None:`colors`
) for each distinct value in label
with the image, at a certain alpha value.
Return an RGB image where color-coded labels are painted over the image.
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them