When to use OCR

There are some scenarios where normal activities such as Get Text and Click Text activities fail to extract the text or perform an action. This is when OCR comes in, giving us the flexibility to perform actions when existing activities fail to do their job.

OCR stands for Optical Character Recognition. It is a text recognition technique that transforms printed documents that are scanned into electronic formats.

OCR is used mainly for images, scanned documents, PDFs, and so on, to extract information or perform actions. Extracting information or data from images, scanned documents, or PDFs is a very tedious job. Normal activities are not recommended for extracting these types of inputs. OCR uses a different method and approach to extract the information.

There are two OCRs available in UiPath Studio:

  1. Microsoft OCR
  2. Google OCR

Microsoft's OCR is known as MODI, and Google's OCR is called Tesseract. OCR is not limited to only these two types of OCR. You are free to use another type of OCR.

Let's see an example of when we should use OCR.

Consider we are going to extract some text from a Word document by using the Get Text activity:

  1. Create a Blank project and give it a meaningful name.
  2. Drag and drop a Flowchart activity on the Designer panel. Also, drag and drop a Get Text activity inside the Designer panel. Now right-click on the Get Text activity and choose Set as Start Node.
  3. Double-click on the Get Text activity. Click on Indicate on screen. Now indicate the text from which you want to extract information. You have to supply the output value for receiving the text from the Get text activity. Create a GenericValue type of variable and specify the variable name str.
  4. Drag and drop a Message box activity. Connect it to the Get Text activity. Double-click on the Message box activity and specify the variable's name (str) that you created earlier:

Hit the Run button to see the result. You can clearly see in this example that using the Get Text activity does not extract, text properly.

This is where OCR enters the picture. In the next section, we will see the extraction of text using OCR.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.75.227