Pruning

Pruning[image]
removes the outermost branches of thin objects in image by setting their values to black.

Pruning[image,n]
removes branches that are at most n pixels long.

Pruning[image,{n}]
removes n pixels from each branch.

Pruning[image,n,t]
treats values above t as foreground.

Details and OptionsDetails and Options

  • Morphological pruning is typically applied after morphological thinning.
  • Pruning works with binary, grayscale, and multichannel images, as well as real matrices.
  • Pruning takes a Padding option that specifies the values to assume for pixels outside the image. The default setting is Padding->0.

ExamplesExamplesopen allclose all

Basic Examples  (4)Basic Examples  (4)

Prune the outermost branches:

In[3]:=
Click for copyable input
Out[3]=

Prune branches that are no longer than 35 pixels:

In[1]:=
Click for copyable input
Out[1]=

Prune 35 pixels from branches:

In[1]:=
Click for copyable input
Out[1]=

Prune all branches:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2010
(8.0)
Translate this page: