Skip to main content

Top Hat

Enhances the fine details or small objects within an image by subtracting an opened version of the image from the original.

🖞ïļ Image options and parameters of topHat method
🎭 Mask options and parameters of topHat method

In morphology and image processing, Top Hat is an operation used to enhance or extract small bright regions or details from an image while suppressing the larger surrounding structures. It is the result of subtraction between the result of input image opening and the input image itself. The purpose of bottom hat(or as it is also called black-hat) is to enhance and extract brighter regions of the image.

placeholderplaceholder
Ran in 0.00Ξs (Infinity ops/s)

Kinds of images compatible with algorithm​

Image propertyWhat it meansPossible values
bitDepthnumber of bits per channel[1,8,16]
componentsnumber of components[1]
alphais alpha channel allowedfalse

Parameters and default values​

  • options

Options​

PropertyRequiredDefault value
iterationsno1
kernelno[[1, 1, 1],[1, 1, 1],[1, 1, 1]]
info

The method is also available for Masks.