How To Extract Text From Image Using OCR inUiPath

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.

I used the snipping tool , select the text from the image and save the image in the .png format. This is the easiest way for you to save the text.

Step 1:-

Drag “Get OCR Text” activity available under the UI Automation section into the designer panel and indicate the element to the image that we want to capture to extract the text and store the output to the Output variable “OCROutput”.

image

We have to ensure that we have already opened the .png file and highlighting the text on the image using Get OCR text activity.

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.

image

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

image

Step 4:
Once you click on run button , you have to ensure that the image is open the background otherwise you can use open browser /open application/open image activity in case you want to do everything automatically.

Here the goal is to learn how it works, so I have not did the entire workflow.

image

Hope it has helped you…

1 Like