threshold_multiotsu(image, classes=3, nbins=256)
The threshold values are chosen to maximize the total sum of pairwise variances between the thresholded graylevel classes. See Notes and for more details.
This implementation relies on a Cython function whose complexity is $O\left(\frac{Ch^{C-1}}{(C-1)!}\right)$ , where $h$ is the number of histogram bins and $C$ is the number of classes desired.
The input image must be grayscale.
Grayscale input image.
Number of classes to be thresholded, i.e. the number of resulting regions.
Number of bins used to calculate the histogram. This value is ignored for integer arrays.
If image
contains less grayscale value then the desired number of classes.
Array containing the threshold values for the desired classes.
Generate :None:None:`classes`
-1 threshold values to divide gray levels in :None:None:`image`
.
>>> from skimage.color import label2rgbSee :
... from skimage import data
... image = data.camera()
... thresholds = threshold_multiotsu(image)
... regions = np.digitize(image, bins=thresholds)
... regions_colorized = label2rgb(regions)
The following pages refer to to this document either explicitly or contain code examples using this.
skimage.filters.thresholding.threshold_multiotsu
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them