-
-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
Considering the scikit image label2rgb
signature:
@change_default_value("bg_label", new_value=0, changed_version="0.19")
def label2rgb(label, image=None, colors=None, alpha=0.3,
bg_label=-1, bg_color=(0, 0, 0), image_alpha=1, kind='overlay'):
"""Return an RGB image where color-coded labels are painted over the image.
Parameters
----------
label : array, shape (M, N)
Integer array of labels with the same shape as `image`.
image : array, shape (M, N, 3), optional
...
The image
shape cannot be (M, N, X) but only (M, N, 3).
Here the tests failure report:
for label in labels:
mask = (label_field == label).nonzero()
color = image[mask].mean(axis=0)
> out[mask] = color
E ValueError: shape mismatch: value array of shape (4,) could not be broadcast to indexing result of shape (324,3)