Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Multilevel image thresholds using Otsu’s method

`thresh = multithresh(A)`

`thresh = multithresh(A,N)`

```
[thresh,metric]
= multithresh(___)
```

returns
the single threshold value `thresh`

= multithresh(`A`

)`thresh`

computed for
image `A`

using Otsu’s method. You can use `thresh`

as
an input argument to `imquantize`

to
convert an image into a two-level image.

returns `thresh`

= multithresh(`A`

,`N`

)`thresh`

a
1-by-N vector containing `N`

threshold values using
Otsu’s method. You can use `thresh`

as an
input argument to `imquantize`

to
convert image `A`

into an image with `N + 1`

discrete levels.

[1] Otsu, N., "A Threshold Selection Method from Gray-Level
Histograms," *IEEE Transactions on Systems, Man, and Cybernetics*,
Vol. 9, No. 1, 1979, pp. 62-66.

`graythresh`

| `im2bw`

| `imquantize`

| `rgb2ind`