{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / filters / thresholding / apply_hysteresis_threshold

function

skimage.filters.thresholding:apply_hysteresis_threshold

source: /dev/scikit-image/src/skimage/filters/thresholding.py :1183

Signature

def   apply_hysteresis_threshold ( image low high )

Summary

Apply hysteresis thresholding to image.

Extended Summary

This algorithm finds regions where image is greater than high OR image is greater than low and that region is connected to a region greater than high.

Parameters

image : (M[, ...]) ndarray

Grayscale input image.

low : float, or array of same shape as ``image``

Lower threshold.

high : float, or array of same shape as ``image``

Higher threshold.

Returns

thresholded : ndarray of dtype bool and shape (M[, ...])

Array in which True indicates the locations where image was above the hysteresis threshold.

Examples

image = np.array([1, 2, 3, 2, 1, 2, 1, 3, 2])
apply_hysteresis_threshold(image, 1.5, 2.5).astype(int)

Aliases

  • skimage.filters.apply_hysteresis_threshold