{ } Raw JSON

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

function

skimage.filters.thresholding:threshold_mean

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

Signature

def   threshold_mean ( image )

Summary

Return threshold value based on the mean of grayscale values.

Parameters

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

Grayscale input image.

Returns

threshold : float

Upper threshold value. All pixels with an intensity higher than this value are assumed to be foreground.

Examples

from skimage.data import camera
image = camera()
thresh = threshold_mean(image)
binary = image > thresh

Aliases

  • skimage.filters.threshold_mean