This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

DeleteBorderComponents

DeleteBorderComponents[image]
replaces connected components adjacent to the border in a binary image image with background pixels.
DeleteBorderComponents[m]
replaces components adjacent to the border in a label matrix m with .
  • The option setting CornerNeighbors->False treats only the four pixels in the coordinate directions as adjacent.
Deleting components connected to the image border in a binary image:
Deleting components connected to the image border in a binary image:
In[1]:=
Click for copyable input
Out[1]=
Deleting the border component from a label matrix:
Assume 4-connectivity for computing the components:
New in 8