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 >

HitMissTransform

HitMissTransform[image, ker]
gives the hit-and-miss transform of image with respect to the composite structuring element ker.
HitMissTransform[image, {ker1, ker2, ...}]
gives the union of the hit-and-miss transforms for all the structuring elements keri.
HitMissTransform[image, {ker1, ker2, ...}, t]
treats values above t as foreground.
  • The composite structuring element ker is a matrix containing 0, +1 and -1 elements, with +1 elements representing foreground and -1 elements representing background.
  • HitMissTransform automatically adds zeros to structuring elements so that they have odd dimensions.
Find all foreground pixels that are below a background pixel:
Find bottom-right corners:
Find all corners by specifying four structuring elements:
Find the larger disk:
Find all foreground pixels that are below a background pixel:
In[1]:=
Click for copyable input
Out[1]=
 
Find bottom-right corners:
In[1]:=
Click for copyable input
Out[1]=
Find all corners by specifying four structuring elements:
In[2]:=
Click for copyable input
Out[2]=
 
Find the larger disk:
In[1]:=
Click for copyable input
Out[1]=
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team