FUNCTION REFERENCE

boundarymask

Find pixels adjacent to a different region label.

Find pixels adjacent to a different region label.

Syntax

BW = boundarymask(L, conn)

Returns a logical matrix with the same shape. conn is 4 or 8 (default). A boundary pixel has an in-image neighbor with a different label. Logical images are also accepted; a constant image has no boundaries.

Example

boundarymask([0 0 0;0 1 0;0 0 0], 4)

Differences from MATLAB: None for supported forms.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.