This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# TopHatTransform

 TopHatTransform gives the morphological top-hat transform of image with respect to structuring element ker. TopHatTransformgives the top-hat transform with respect to a range r square.
• The structuring element ker is a matrix containing s and s.
• 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 multichannel 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 multichannel image:
 Out[1]=

Remove disks larger than the structuring element:
 Out[1]=

Correct uneven illumination and remove the large feature:
 Out[1]=

Extract small bright regions from a color image:
 Out[1]=
 Applications   (3)
Subtract the top-hat transform of an image to remove small features:
Correct uneven background illumination in a grayscale image:
Isolate the lightning from an image:
Use Manipulate to extract successively larger objects:
New in 7