Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Data Manipulation > Image Processing & Analysis > Mathematical Morphology > Pruning >

Pruning

Pruning[image]
removes the outermost branches of thin objects in image by setting their values to black.
Pruning
removes branches that are at most n pixels long.
Pruning
removes n pixels from each branch.
Pruning
treats values above t as foreground.
  • 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.
Prune the outermost branches:
Prune branches that are no longer than 60 pixels:
Prune 60 pixels from branches:
Prune all branches:
Prune the outermost branches:
In[1]:=
Click for copyable input
Out[1]=
 
Prune branches that are no longer than 60 pixels:
In[1]:=
Click for copyable input
Out[1]=
 
Prune 60 pixels from branches:
In[1]:=
Click for copyable input
Out[1]=
 
Prune all branches:
In[1]:=
Click for copyable input
Out[1]=
Morphological pruning can be applied to raw data:
Count the legs of a centipede:
Find the loops of a graph:
Iteratively prune an image:
Solve a maze puzzle by thinning all paths and pruning dead ends:
New in 8
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF