Skip to content

Picture & Text Recognition Recent

1. Take a Screenshot

ParameterTypeDescriptionRemark
funString/pic/screenshot
idStringDevice IDSingle device only
binaryBooleanReturn binary dataDefault: JSON
jpgBooleanReturn JPG formatDefault: BMP
rectInteger ArrayRegion [left, top, right, bottom]Empty = full screen
save_pathStringSave to local pathEmpty = 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:

FieldDescription
imageImage path (if save_path used) or base64 string
ParameterTypeDescription
funString/pic/find-image
idStringDevice ID
img_listString ArrayBase64 or local path list
similarityFloat0 to 1
rectInteger ArraySearch region
allBooleanFind all matches
directionStringSearch direction

Response: Returns list with index, centre [x,y], rect [lx,ty,rx,by]

Request: fun = /pic/find-image-cv

Same parameters as general image search, plus:

  • same (Boolean) - Find all identical images

4. OCR Text Recognition

ParameterTypeDescription
funString/pic/ocr
idStringDevice ID
rectInteger ArrayRegion

TIP

Enhanced version: /pic/ocr - More accurate but uses more resources.

Response: Returns list with text, centre [x,y], rect, similarity

5. Find Text

ParameterTypeDescription
funString/pic/find-text
idStringDevice ID
textString ArrayText to search
similarityFloatMatch threshold
containBooleanContains match

TIP

Enhanced version: /pic/find-text-ex

6. Find Multi Color

ParameterTypeDescription
funString/pic/find-multi-color
idStringDevice ID
listJSON ArrayColor search configs
sameBooleanFind all same colors
allBooleanFind all in list

Each item in list:

  • first_color (String) - Color table pattern
  • rect (Integer Array) - Search region
  • similarity (Float) - Match threshold

Some3C Phone Farm Documentation