replaces connected components adjacent to the border in a binary image image with background pixels.


replaces components adjacent to the border in a label matrix m with 0.

Details and Options


open allclose all

Basic Examples  (2)

Deleting components connected to the image border in a binary image:

Deleting components connected to the border of a 3D image:

Scope  (1)

Deleting the border component from a label matrix:

Options  (1)

CornerNeighbors  (1)

By default, 8-connectivity is assumed:

Assume 4-connectivity for computing the components:

Applications  (1)

Create a texture image by periodically padding a single pattern:

Remove patterns that are adjacent to the border and therefore are incomplete:

Properties & Relations  (2)

When deleting border components from a label matrix, components are not relabeled:

It is also possible to obtain the same effect by masking the border, then using GeodesicDilation:

Introduced in 2010
Updated in 2012