OCR Activity Output

Hi All,

I have doubt on the Tesseract OCR Activity. In the properties panel we have two output one is Result and other one is Text.

Could you please explain how and when we have to use these.

@K_Anbarasu

I hope this clears..

if you need full text use text, if you need individual word details use result

cheers

1 Like

Hi @K_Anbarasu

Text - is the main OCR output.It contains the extracted text.

Text = Final usable OCR text , you can use this when your automation needs to Assign to variables, Validate content, Write to Excel,Pass to Regex etc…

Result- is the complete OCR metadata object. You use Result when you need extra data, like when you need confidence, positions, or want to pass data to DU

If helpful, mark as solution. Happy automation with UiPath

Thanks for the reply. When I process the output from the Result, I got some error. then googled it. i got the below suggestions

  • Access the property:
    • The OCR activity returns an object (e.g., ocrResult).
    • ocrResult.WordsInfo is a collection of word details.
  • Iterate through WordsInfo in a For Each activity:
    • TypeArgument: UiPath.OCR.Models.WordInfo

For Each word In ocrResult.WordsInfo
Log Message: "Word: " + word.Text +
", Position: " + word.BoundingBox.ToString() +
", Confidence: " + word.Confidence.ToString()
Next

But i couldn’t find arugumnet as UiPath.OCR.Models.WordsInfo

Do you have any idea?

@K_Anbarasu

if you see above result is what you need yo use if you want the words separately..the type is keyvalue pair

so you need to access it using keys to get corresponding values

cheers

You can see the result from Teseract OCR, you will get it in key value pair. Teseract does not give word object and confidence. You can get only text.