FUNCTION REFERENCE
labeloverlay
Blend labeled regions onto an image.
Blend labeled regions onto an image.
Syntax
B = labeloverlay(A, L, 'Transparency', alpha, 'Colormap', cmap, 'IncludedLabels', labels)Returns uint8 RGB. A is grayscale or RGB; L has matching height and width. Transparency defaults to .5 (0 is opaque, 1 is transparent). Default jet colors are shuffled using the engine RNG; numeric colormaps retain their order. Background and excluded labels retain the input image.
Example
labeloverlay(uint8([100 100;100 100]), [0 1;1 0], 'Colormap', [1 0 0])Differences from MATLAB: Categorical labels, ColorAssignment options and the recently added second colormap output are not supported. Named palettes use the engine color ramps.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.