create_colormap#
- omnipose.plot.create_colormap(image, labels)[source]#
Create a colormap based on the average color of each label in the image.
- Parameters
image (ndarray) -- An RGB image.
labels (ndarray) -- A 2D array of labels corresponding to the image.
- Returns
colormap -- A colormap where each row is the RGB color for the corresponding label.
- Return type
ndarray