Skip to main content

Tesseract OCR

AutomatR.Windows.Activities.TesseractOCR

The "Tesseract OCR" activity in AutomatR utilizes the Tesseract OCR engine, an open-source optical character recognition engine developed by Google. This activity enables users to extract text from images or documents, providing a powerful and flexible solution for OCR data extraction in automation workflows.

Properties

NameDescription
Input
File NameSpecifies the name of the document or image file for which OCR needs to be performed. This file can be stored locally. String variables containing the file name.
File PathSpecifies the local path to the document or image file if it is stored locally. This property is used if the file is not in a cloud storage service. String variables containing the local file path.
Region SelectionAllows the user to select the image region to capture by clicking on the ellipsis button (...) and dragging the mouse to define the region of interest. This feature is beneficial when focusing OCR on specific areas of an image. No direct variable support for region selection, as it involves user interaction.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. The display name enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the Tesseract OCR activity. This can be useful for handling synchronization issues. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1.
Output
ResultOutputs the result of the Tesseract OCR operation, typically containing the extracted text data. Variables of relevant types (e.g., string variables) to store the OCR result.

How to use:

  1. Drag and drop the "Tesseract OCR" activity onto the workflow.
  2. Configure the properties by specifying the file information and using the region selection feature to define the area of interest.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to perform OCR using the Tesseract OCR engine.

Note: The "Region Selection" property provides a visual and interactive way to specify the region of interest within the image. It allows users to focus OCR processing on specific portions of an image, enhancing accuracy and efficiency.

Example: Consider an example where the "Tesseract OCR" activity is used to extract text from a local image file with a defined region of interest:

Tesseract OCR:
Display Name: "Extract Text from Image"
File Path: "C:\Images\sample.png"
Region Selection: [User Interaction]
Result: extractedText

In this example, the activity uses the Tesseract OCR engine to extract text from the "sample.png" image file. The region of interest is interactively defined by the user through the region selection feature. The extracted text is stored in the variable "extractedText" for further use in the workflow.