Does anyone know how to output this number on ocr?

Here is my code:

{
  "Name": "ocrverifycode",
  "CreationDate": "2024-2-19",
  "Commands": [
    {
      "Command": "OCRExtractRelative",
      "Target": "verifycode.png",
      "Value": "code",
      "Description": ""
    },
    {
      "Command": "echo",
      "Target": "Code: ${code}",
      "Value": "green",
      "Description": ""
    }
  ]
}

and the picture:
ask

if you want to try, you can use the other one picture:
otherone

This is my result for testing:

  • [status]

Playing macro ocrverifycode

  • [info]

Executing: | OCRExtractRelative | verifycode.png | code |

  • [info]

OCR (eng) started (2.6 KB)

  • [info]

OCR result received (1.7s from endpoint 1)

  • [info]

Executing: | echo | Code: ${code} | green |

  • [echo]

Code:

  • [info]

Macro completed (Runtime 5.68s)

For number OCR usually OCREngine2 is better. Also, often it helps to select Chinese(!) as the OCR language. Then the OCR logic detects single digit numbers better:

If you want the result in one line, then add the receipt ocr parameter:

how can i find these pages- -??
i cannot find these on UI.VisionRPA extension setting.

i only find this-.-

@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 :wink: 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:

screen scraping with ocr

For post-processing the OCR result see Remove white spaces from string