image.img:ocr_text
Declaration
lua
img:ocr_text([x1, y1, x2, y2])
Description
OCR on image buffer.
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
x1,y1,x2,y2 | number | Optional | Full image | Region |
Return Values
| Type | Description |
|---|---|
| table | Array of text strings |
| nil | Details placeholder |
Example
lua
local texts = img:ocr_text()