image.img:cv_binarization
Declaration
lua
img:cv_binarization([threshold])
Description
Convert image to black and white (in-place). Grayscale then threshold.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
threshold | number | Optional | 127 | Threshold 0-255 |
Return Values
| Type | Description |
|---|---|
| image_buffer | Same image (modified in-place) |
Example
lua
img:cv_binarization(128)