Function File: imtophat (img, SE)

Perform morphological top hat filtering.

The matrix img must be numeric while SE can be a:

  • strel object;
  • array of strel objects as returned by ‘@strel/getsequence’;
  • matrix of 0’s and 1’s.

A top hat transform corresponds to the difference between img, and the opening of img, i.e., it is equivalent to:

img - imopen (img, se);

Use imbothat to perform a ’black’ or ’closing’, top-hat transform (is is also known as bottom-hat transform).

See also: imerode, imdilate, imopen, imclose, imbothat, mmgradm.

Package: image