How To Extract Text From Image Using OCR – In UiPath

As we know, the input to the business processes being automated can be in any format.

What if we have an image as an input which contains data?

Let’s look at it!!!

Example

Implementation using UiPath :

Let us implement a workflow which consumes an image and extracts the text from it using various OCRs available.

Sample Image:
Sample.png

Step 1:
Drag “Load Image” activity available under the UI Automation section into the designer panel and supply the Image file path to it.
Create an output image variable “our_Image” as shown.

uiPath Extract Text from Image using OCR 1uiPath Extract Text from Image using OCR 2

Step 2:
Drag “Tesseract OCR” activity(use your desired OCR engine i.eMicrosoft, Abby…) into the designer panel and set the needed properties accordingly as shown below by passing the above-created image variable to it.

Save the extracted output into a string variable “extractedData” as shown.

uiPath Extract Text from Image using OCR 3uiPath Extract Text from Image using OCR 4

Step 3:
Drag “Message Box” activity to display the extracted OCR output.

uiPath Extract Text from Image using OCR 5.PNG

Step 4:
Finally, execute the workflow to display the extracted text 🙂

uiPath Extract Text from Image using OCR 6.PNG

Click here to download the Source Code…

Hope it has helped you…

Leave a Reply

%d bloggers like this: