Skip to main content

Image OCR

AutomatR.Windows.Activities.ImageOCR

The "Image OCR" activity in AutomatR serves as a comprehensive OCR data extraction tool, supporting multiple OCR engines, including Tesseract OCR, Google OCR, AWS Textract, and others. This activity allows users to extract text from images or documents, providing flexibility and adaptability for various automation scenarios.

Properties

NameDescription
AWS (Amazon Textract) Properties
Access Key IdSpecifies the AWS Access Key ID associated with your AWS account when using the AWS Textract OCR engine.String variables containing the AWS Access Key ID.
Bucket NameSpecifies the name of the Amazon S3 bucket where the input document or image is stored. Relevant when using the AWS Textract OCR engine. String variables containing the bucket name.
RegionSpecifies the AWS region where the Amazon Textract service is hosted. String variables containing the AWS region.
Secret Access KeySpecifies the AWS Secret Access Key associated with your AWS account when using the AWS Textract OCR engine. String variables containing the AWS Secret Access Key.
Google OCR Properties
API KeySpecifies the API key associated with your Google Cloud Platform (GCP) project when using the Google OCR engine. String variables containing the API key.
Input Properties
File NameSpecifies the name of the document or image file for which OCR needs to be performed. This file can be stored locally or in a cloud storage service. 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.
OCR EngineSpecifies the OCR engine to be used for text extraction. This can be set to "Tesseract OCR", "Google OCR," "AWS Textract," or other supported engines. String variables containing the selected OCR engine
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 is particularly useful 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 Image 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 OCR operation, typically containing the extracted text data and additional information about the document. Variables of relevant types (e.g., string variables) to store the OCR result.

How to use:

  1. Drag and drop the "Image OCR" activity onto the workflow.
  2. Configure the properties based on the OCR engine you want to use (Tesseract OCR, Google OCR, AWS Textract, etc.).
  3. Input the required credentials and file information.
  4. Use the region selection feature to define the area of interest within the image.
  5. Optionally, configure the delay and customize the display name.
  6. Execute the workflow to perform OCR using the selected OCR engine.

Note: Ensure that the necessary credentials are configured for the chosen OCR engine (AWS Access Key, Secret Key, API Key, etc.) and that the file information is accurate.

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

Image OCR:
Display Name: "Extract Text from Image"
OCR Engine: "AWS Textract"
Access Key Id: "your_access_key"
Secret Access Key: "your_secret_key"
File Path: "C:\Images\sample.png"
Region Selection: [User Interaction]
Result: extractedText

In this example, the activity uses the AWS Textract 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.