Skip to main content
Version: 10.2.4

Optimize OCR process

A standard Workfusion OCR use case provides a set of Bot Configurations that may be re-used or extended to address custom OCR challenges.

OCR architecture​

The UML diagram is as follows:

Usage example​

     <var-def name="submitImage">
<http url="${ocr_url}/submitImage" method="post" multipart="true">
<http-param name="file" isfile="true">
<http url="${original_document_url}" />
</http-param>
</http>
</var-def>

<var-def name="taskId">
<xpath expression="string(//response/task/@id)">
<var name="submitImage" />
</xpath>
</var-def>

<script><![CDATA[
//-------------------------------------------------------making processDocument url-------------------------------------------------------
.....
]]></script>

<var-def name="processDocument">
<http url="${processDocumentUrl.toString()}" method="get" />
</var-def>

Metrics and licensing​

Workfusion OCR capabilities are limited by the corresponding license. Every OCR license can be checked via Platform Monitor, or directly via URL (for RPA Express 2.0, license check url is http://localhost:15580/api/v1/cloud/activeLicense). Upon OCR license expiration Workfusion provides license upgrades.

Every OCR document processing request provides short metrics snippet to estimate the OCR load and predict the completion of the task.

<metrics averagePagesPerDoc="6.0" tasksInQueue="12" processedPages="260.0" timeInterval="300"/>

Client features comparison table​


OCR PluginOCR REST
ExecutionSynchronousAsynchronous
Input FormatPDF, TIFF, JPEG, PNGPDF, TIFF, JPEG, PNG
OCR Result FormatTXT, XML, HTML, PDFTXT, XML, HTML, PDF
Usage

low age volume, good document quality,

no sla, OCR test

Enterprise grade BP

Common parameters​

ParameterRecommended ValueNotes
Export FormatxmlForCorrectedImage
Document Language
Language parameter must be supported by the license
Character Recognition Variancefalse
Allowed Region Type
BT_Table,BT_Text,BT_Separator,BT_SeparatorGroup,BT_AutoAnalysis

Custom Region

Change DPI

Correct Orientationtrue
Correct Skewtrue
Invert Image

Discard Color Image

Remove Color Objects

Remove Color Object Types

caution

Bar Code recognition is not working with TOOD OCR, the page is empty with the Bar Code region specified. Use Standard OCR to get Barcodes working.

Optimization instructions​

  1. Validate source image DPI. Recommended DPI for all source documents is 300-350. When resolution is 25% lower than recommended by WorkFusion, it is suggested to add image pre-processing parameter Change DPI or use ImageMagick to bump up the DPI to suggested level.
    1. When DPI is significantly lower, for example is within 72-110 DPI, increasing the DPI increases OCR recognition errors.
  2. It is suggested to use color documents within OCR process. A color image, since it has different colors presence, adds ability to remove RGB color channels prior to the processing, decreasing the document noise and providing a way to stabilize the image prior to applying gray-scale conversion.
  3. When looking at poor quality documents the only three pre-processing techniques proven to work within WorkFusion OCR Rest:
    • Adjusting contrast
    • Adjusting brightness
    • Inverting an image
  4. The OCR recognition result varies upon applying Allowed Region Type parameter values in a certain order. When setting array of two elements BT_Table, BT_Text as the value, the OCR result XML will have more OCR blocks as tables, than when the array has elements in reverse order BT_Text, BT_Table.
  5. See also Improve OCR Results for more improvements.