image = | darkHysteresisThreshold2dImg (inImg,highSeedThreshold,highPropagationThreshold) |
image = | lightHysteresisThreshold2dImg (inImg,lowSeedThreshold,lowPropagationThreshold) |
image = | hysteresisThreshold2dImg (inImg,lowSeedThreshold,highSeedThreshold,lowPropagationThreshold,highPropagationThreshold) |
Apply hysteresis thresholding to an image.
Hysteresis threshold algorithm applies two thresholds and
on the output image.
is the most restrictive threshold and yields a seed image
, used to propagate the marked features in
, obtained by thresholding the input image by
. This algorithm is commonly used in edge detection such as Canny edge detector.
The aim of this threshold is to preserve the features in containing a seed in
.
The algorithm needs 4 thresholds: the minimum and maximum thresholds and
to compute the seed image
and the minimum and maximum thresholds
and
to compute the image
, used for the propagation.
To simplify the algorithm parametrization, several wrappers are defined to apply this threshold:
Here is an example of dark and light hysteresis threshold applied to a gray scale input image. The intensities of each area are indicated we used and
for the dark threshold and
and
fot the light threshold:
The features and seeds intensities may be higher than the minimum image intensity and lower than the maximum image intensity. The hysteresisThreshold2dImg wrapper allows to handle this case, illustrated by the following figure. In this example, the background have an intensity of 50, the two little white circles have an intensity of 255, the intensity of the central main ellipse equals 96 and the two lighter ellipses inside have an intensity of 192 (left) and 128 (right). Finally, the intensity of the contour of the main ellipse varies from 12 to 44. The threshold used for the calculation are: ,
and
.