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 >

TopHatTransform

TopHatTransform[image, ker]
gives the morphological top-hat transform of image with respect to structuring element ker.
TopHatTransform[image, r]
gives the top-hat transform with respect to a range r square.
  • The structuring element ker is a matrix containing 0s and 1s.
  • TopHatTransform automatically pads structuring elements to have odd dimensions.
  • If multiple image channels are present, TopHatTransform operates on each of them separately.
  • TopHatTransform preserves regions smaller than the structuring element whose channel values are larger than their surroundings.
Extract thin lines from a multi-channel image:
Remove disks larger than the structuring element:
Correct uneven illumination and remove the large feature:
Extract small bright regions from a color image:
Extract thin lines from a multi-channel image:
In[1]:=
Click for copyable input
Out[1]=
 
Remove disks larger than the structuring element:
In[1]:=
Click for copyable input
Out[1]=
 
Correct uneven illumination and remove the large feature:
In[1]:=
Click for copyable input
Out[1]=
 
Extract small bright regions from a color image:
In[1]:=
Click for copyable input
Out[1]=
 
Subtract the top-hat transform of an image to remove small features:
Correct uneven background illumination in a grayscale image:
Use Manipulate to extract successively larger objects:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team