Artifact 4a4fd59d6dc42746552acb1c71a444e36fc9b5f98a8e26a7674ecd1b8f796d1a:
- File doc/ref/accessor_threshold_generate.md — part of check-in [109cb6080f] at 2024-12-12 21:48:46 on branch trunk — chore: regenerated embedded docs. (user: aku size: 10769)

| Project ↗ | Documentation ↗ | — | Tutorials ↗ | How To's ↗ | Explanations ↗ | References |
| Entry ↗ | — | Sections ↘ | Permuted Sections ↘ | Names ↘ | Permuted Names ↘ | Strict ↘ | Implementations ↘ |
Documentation -- Reference Pages -- accessor threshold generate
<anchor='top'> Table Of Contents
Operators
- aktive image threshold global bernsen
- aktive image threshold global mean
- aktive image threshold global niblack
- aktive image threshold global otsu
- aktive image threshold global phansalkar
- aktive image threshold global sauvola
Operators
↑ aktive image threshold global bernsen
Syntax: aktive image threshold global bernsen src [→ definition]
Returns a global threshold for the input, according to Bernsen's method.
The operator aktive image mask per global bernsen uses this to generate a mask of the input.
This operator is strict in its single input. The computed pixels are not materialized. They are immediately reduced to the threshold.
| Input | Description |
|---|---|
| src | Source image |
Examples
| @1
|
aktive image threshold global bernsen @1
|
|---|---|
geometry(0 0 300 200 1) |
0.33137254901960783 |
| @1
|
aktive image threshold global bernsen @1
|
|---|---|
geometry(0 0 380 250 3) |
0.5078431372549019 |
↑ aktive image threshold global mean
Syntax: aktive image threshold global mean src [→ definition]
Returns a global threshold for the input, as the image mean.
The operator aktive image mask per global mean uses this to generate a mask of the input.
There are better methods. Extensions to the simple mean, in order of creation (and complexity), are Sauvola, Niblack, and Phansalkar. Each of these modifies the plain mean with a bias based on a mix of mean, standard deviation, and parameters.
This operator is strict in its single input. The computed pixels are not materialized. They are immediately reduced to the threshold.
| Input | Description |
|---|---|
| src | Source image |
Examples
| @1
|
aktive image threshold global mean @1
|
|---|---|
geometry(0 0 300 200 1) |
0.46493130718954245 |
| @1
|
aktive image threshold global mean @1
|
|---|---|
geometry(0 0 380 250 3) |
0.37447068455452354 |
↑ aktive image threshold global niblack
Syntax: aktive image threshold global niblack src ?(param value)...? [→ definition]
Returns a global threshold for the input, according to Niblack's method.
The operator aktive image mask per global niblack uses this to generate a mask of the input.
This operator is strict in its single input. The computed pixels are not materialized. They are immediately reduced to the threshold.
| Input | Description |
|---|---|
| src | Source image |
| Parameter | Type | Default | Description |
|---|---|---|---|
| k | double | -0.2 | niblack parameter |
Examples
| @1
|
aktive image threshold global niblack @1
|
|---|---|
geometry(0 0 300 200 1) |
0.4461036579290674 |
| @1
|
aktive image threshold global niblack @1
|
|---|---|
geometry(0 0 380 250 3) |
0.3194965780697608 |
↑ aktive image threshold global otsu
Syntax: aktive image threshold global otsu src ?(param value)...? [→ definition]
Returns a global threshold for the input, according to Otsu's method.
The operator aktive image mask per global otsu uses this to generate a mask of the input.
This operator is strict in its single input. The computed pixels are not materialized. They are immediately reduced to the threshold.
| Input | Description |
|---|---|
| src | Source image |
| Parameter | Type | Default | Description |
|---|---|---|---|
| bins | int | 256 | The number of bins used by the internal histogram. The pixel values are quantized to fit. Only values in the range of [0..1] are considered valid. Values outside of that range are placed into the smallest/largest bins, respectively. The default quantizes the image values to 8-bit. |
Examples
| @1
|
aktive image threshold global otsu @1
|
|---|---|
geometry(0 0 300 200 1) |
0.3515625 |
↑ aktive image threshold global phansalkar
Syntax: aktive image threshold global phansalkar src ?(param value)...? [→ definition]
Returns a global threshold for the input, according to Phansalkar's method.
The operator aktive image mask per global phansalkar uses this to generate a mask of the input.
This operator is strict in its single input. The computed pixels are not materialized. They are immediately reduced to the threshold.
| Input | Description |
|---|---|
| src | Source image |
| Parameter | Type | Default | Description |
|---|---|---|---|
| k | double | 0.25 | phansalkar parameter |
| R | double | 0.5 | phansalkar parameter |
| p | double | 3 | phansalkar parameter |
| q | double | 10 | phansalkar parameter |
Examples
| @1
|
aktive image threshold global phansalkar @1
|
|---|---|
geometry(0 0 300 200 1) |
0.3839280179396569 |
| @1
|
aktive image threshold global phansalkar @1
|
|---|---|
geometry(0 0 380 250 3) |
0.35887882734383425 |
↑ aktive image threshold global sauvola
Syntax: aktive image threshold global sauvola src ?(param value)...? [→ definition]
Returns a global threshold for the input, according to Sauvola's method.
The operator aktive image mask per global sauvola uses this to generate a mask of the input.
This operator is strict in its single input. The computed pixels are not materialized. They are immediately reduced to the threshold.
| Input | Description |
|---|---|
| src | Source image |
| Parameter | Type | Default | Description |
|---|---|---|---|
| k | double | 0.5 | sauvola parameter |
| R | double | 128 | sauvola parameter |
Examples
| @1
|
aktive image threshold global sauvola @1
|
|---|---|
geometry(0 0 300 200 1) |
0.23263662163348175 |
| @1
|
aktive image threshold global sauvola @1
|
|---|---|
geometry(0 0 380 250 3) |
0.18763741632585793 |