Find region boundaries of segmentation
mask = boundarymask(L)
mask = boundarymask(BW)
mask = boundarymask(___,conn)
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.
L— Input label matrix
Input label matrix, specified as a finite, nonnegative, nonsparse, 2-D numeric or logical array.
BW— Input binary image
Input binary image, specified as a numeric or logical array
the same size as
Connectivity, specified as the numeric scalar
For a given pixel P in the input image, the corresponding
true if any
of the pixels in the 4-connected or 8-connected neighborhood of P have
a value different than P.
mask— Rasterized grid of region boundaries
Rasterized grid of region boundaries, specified as a 2-D logical matrix the same size as the input image.
Usage notes and limitations:
This function supports the generation of C code using MATLAB®
Note that if you choose the generic
MATLAB Host Computer target
platform, the function generates code that uses a precompiled, platform-specific
shared library. Use of a shared library preserves performance optimizations
but limits the target platforms for which code can be generated. For
more information, see Understand Code Generation with Image Processing Toolbox.
When generating code, the input argument
be a compile-time constant.