Skip to main content

OCR Operations in Eras

OCR (Optical Character Recognition) is a technology used to recognize and extract text from images, scanned documents, and other forms of digitized text. In the context of RPA (Robotic Process Automation), OCR is often used to automate manual data entry tasks by extracting text from images and using that information to fill out forms, update databases, and perform other types of processing.

Here are some common OCR operations in RPA:

Image to Text Conversion: This involves converting an image or scanned document into editable text, which can then be processed and analyzed by the RPA system.

Form Processing: This involves automatically extracting information from forms and using that information to update databases, send notifications, or perform other actions.

Data Extraction: This involves extracting specific pieces of information from images, scanned documents, and other forms of digitized text, such as names, addresses, phone numbers, and so on.

Document Classification: This involves automatically classifying documents based on their content, such as invoices, contracts, and so on.

Text Recognition: This involves recognizing text within images and scanned documents, even if the text is distorted, skewed, or has a different font than the text in the RPA system's database.

RecognizeFromPath​

This method allows users to recognize and extract text from image path.

Parameters

  • path - string = file path where the file will be readed.
  • language - string = text language such as tur, eng, aze...
How to use
var result = Ocr.RecognizeFromPath("d:\\test.png", "tur");

var jsonResult = Json.J(result);

var jsonStr = Json.JObjectToJson(jsonResult);

InfoLog(jsonStr)

Recognize​

This method allows users to recognize and extract text from image.

Parameters

  • image - byte[] = file which will be readed.
  • language - string = text language such as tur, eng, aze...
How to use
var image = File.ReadAsByte ("d:\\test.png");
var result = Ocr.Recognize(image, "tur");

var jsonResult = Json.J(result);

var jsonStr = Json.JObjectToJson(jsonResult);

InfoLog(jsonStr)

RecognizeWithPosition​

This method allows users to recognize and extract text from image path.

Parameters

  • image - byte[] = file which will be readed.
  • language - string = text language such as tur, eng, aze...
  • x - int = If it is desired to limit the text to be read on the screen within a certain area; this field must be filled in, along with the X-coordinate, Height, and Width fields.
  • y - int = If it is desired to limit the text to be read on the screen within a certain area; this field must be filled in, along with the Y-coordinate, Height, and Width fields.
  • width - int = If it is desired to limit the text to be read on the screen within a certain area; this field must be filled in, along with the Y-coordinate, X-coordinate, and Width fields.
  • height - int = If it is desired to limit the text to be read on the screen within a certain area; this field must be filled in, along with the X-coordinate, Y-coordinate, and Height fields.
How to use
var image = File.ReadAsByte ("d:\\test.png");
var result = Ocr.RecognizeWithPosition(image, "tur", 70, 340, 100, 120);

var jsonResult = Json.J(result);

var jsonStr = Json.JObjectToJson(jsonResult);

InfoLog(jsonStr)