@ocr-api-team used the free online ocr website to test the image. This website and its ocr api are also from us - so the website uses exactly the same ocr engine as Ui.Vision In other words, the online ocr website is a convenient way to test various OCR settings and then use them in the RPA software.
The below macro shows how to do this OCR in the RPA software. You can set the !ocrengine and !ocrlanguage variables.
Result:
OCR macro:
{
"Name": "ocr1",
"CreationDate": "2024-2-19",
"Commands": [
{
"Command": "open",
"Target": "https://forum.ui.vision/t/does-anyone-know-how-to-output-this-number-on-ocr/14469",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "xpath=//*[@id=\"post_1\"]/div/div[2]/div[2]/div/p[3]/img",
"Value": "",
"Description": "Scroll area with image into view"
},
{
"Command": "store",
"Target": "2",
"Value": "!ocrengine",
"Description": "Better for numbers"
},
{
"Command": "store",
"Target": "chs",
"Value": "!ocrlanguage",
"Description": "Chinese helps for single digit ocr"
},
{
"Command": "OCRExtractRelative",
"Target": "code1_dpi_144.png",
"Value": "a",
"Description": ""
},
{
"Command": "echo",
"Target": "code = ${a}",
"Value": "",
"Description": ""
}
]
}
code1_dpi_144.png is:
For post-processing the OCR result see Remove white spaces from string