boundarymask() - Image Processing
mask = boundarymask(L) computes
a mask that represents the region boundaries for the input label matrix L.
The output, mask, is a logical image that is true at
boundary locations and false at non-boundary locations.mask = boundarymask(BW) computes
the region boundaries for the input binary image BW.mask = boundarymask(___,conn) computes
the region boundaries using a connectivity specified by conn. Code Generation support:
Yes.MATLAB Function Block support:
Yes.
Syntax
mask = boundarymask(L) examplemask = boundarymask(BW)mask = boundarymask(___,conn)
Example
Create Rasterized Grid of Region BoundariesOpen This Example
Read image into the workspace.A = imread('kobi.png');
Create a superpixel representation of the image, returned as a label matrix.L = superpixels(A,100);
Create the rasterized grid of the regions in the label matrix.mask = boundarymask(L);
Display the boundary mask binary image.figure
imshow(mask,'InitialMagnification',67)
Output / Return Value
Limitations
Alternatives / See Also
Reference