|Image Processing Toolbox User's Guide|
Perform top-hat filtering
IM2 = imtophat(IM,SE) performs morphological top-hat filtering on the grayscale or binary input image
IM using the structuring element
SE is returned by
SE must be a single structuring element object, not an array containing multiple structuring element objects.
IM2 = imtophat(IM,NHOOD), where
NHOOD is an array of 0's and 1's that specifies the size and shape of the structuring element, is the same as
IM can be numeric or logical and must be nonsparse. The output image
IM2 has the same class as the input image. If the input is binary (
logical), the structuring element must be flat.
You can use top-hat filtering to correct uneven illumination when the background is dark. This example uses top-hat filtering with a disk-shaped structuring element to remove the uneven background illumination from an image.
imadjustto improve the visibility of the result.
© 1994-2005 The MathWorks, Inc.