Top-hat filtering
performs morphological top-hat filtering on the grayscale or binary image
J
= imtophat(I
,SE
)I
, returning the filtered image, J
.
Top-hat filtering computes the morphological opening of the image (using imopen
) and then subtracts the
result from the original image. SE
is a single structuring
element object returned by the strel
or offsetstrel
functions.
You optionally can perform the top-hat filtering