Picture & Text Recognition Recent
1. Take a Screenshot
| Parameter | Type | Description | Remark |
|---|---|---|---|
fun | String | /pic/screenshot | |
id | String | Device ID | Single device only |
binary | Boolean | Return binary data | Default: JSON |
jpg | Boolean | Return JPG format | Default: BMP |
rect | Integer Array | Region [left, top, right, bottom] | Empty = full screen |
save_path | String | Save to local path | Empty = memory/JSON |
json
{
"fun": "/pic/screenshot",
"data": {
"id": "5C:F7:E6:CE:65:22",
"binary": true
}
}Response: When binary=true, returns binary image data directly. Otherwise:
| Field | Description |
|---|---|
image | Image path (if save_path used) or base64 string |
2. General Image Search
| Parameter | Type | Description |
|---|---|---|
fun | String | /pic/find-image |
id | String | Device ID |
img_list | String Array | Base64 or local path list |
similarity | Float | 0 to 1 |
rect | Integer Array | Search region |
all | Boolean | Find all matches |
direction | String | Search direction |
Response: Returns list with index, centre [x,y], rect [lx,ty,rx,by]
3. OpenCV Image Search
Request: fun = /pic/find-image-cv
Same parameters as general image search, plus:
same(Boolean) - Find all identical images
4. OCR Text Recognition
| Parameter | Type | Description |
|---|---|---|
fun | String | /pic/ocr |
id | String | Device ID |
rect | Integer Array | Region |
TIP
Enhanced version: /pic/ocr - More accurate but uses more resources.
Response: Returns list with text, centre [x,y], rect, similarity
5. Find Text
| Parameter | Type | Description |
|---|---|---|
fun | String | /pic/find-text |
id | String | Device ID |
text | String Array | Text to search |
similarity | Float | Match threshold |
contain | Boolean | Contains match |
TIP
Enhanced version: /pic/find-text-ex
6. Find Multi Color
| Parameter | Type | Description |
|---|---|---|
fun | String | /pic/find-multi-color |
id | String | Device ID |
list | JSON Array | Color search configs |
same | Boolean | Find all same colors |
all | Boolean | Find all in list |
Each item in list:
first_color(String) - Color table patternrect(Integer Array) - Search regionsimilarity(Float) - Match threshold