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 0.

Details and Options

Examples

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:

Wolfram Research (2010), DeleteBorderComponents, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteBorderComponents.html (updated 2012).

Text

Wolfram Research (2010), DeleteBorderComponents, Wolfram Language function, https://reference.wolfram.com/language/ref/DeleteBorderComponents.html (updated 2012).

CMS

Wolfram Language. 2010. "DeleteBorderComponents." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2012. https://reference.wolfram.com/language/ref/DeleteBorderComponents.html.

APA

Wolfram Language. (2010). DeleteBorderComponents. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DeleteBorderComponents.html

BibTeX

@misc{reference.wolfram_2023_deletebordercomponents, author="Wolfram Research", title="{DeleteBorderComponents}", year="2012", howpublished="\url{https://reference.wolfram.com/language/ref/DeleteBorderComponents.html}", note=[Accessed: 19-March-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_deletebordercomponents, organization={Wolfram Research}, title={DeleteBorderComponents}, year={2012}, url={https://reference.wolfram.com/language/ref/DeleteBorderComponents.html}, note=[Accessed: 19-March-2024 ]}