skshapes.images.utils.otsu_threshold

skshapes.images.utils.otsu_threshold(values)

Computes the Otsu threshold of the values distribution (https://en.wikipedia.org/wiki/Otsu%27s_method).

This is a copy of the code of sckikit-image, adapted for pytorch to improve performance: https://scikit-image.org/docs/stable/api/skimage.filters.html#skimage.filters.threshold_otsu

Parameters:

values (tensor) – The list of values to threshold.

Return type:

float