Tune OCR Business 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></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 Plugin | OCR REST | |
|---|---|---|
| Execution | Synchronous | Asynchronous |
| Input Format | PDF, TIFF, JPEG, PNG | PDF, TIFF, JPEG, PNG |
| OCR Result Format | TXT, XML, HTML, PDF | TXT, XML, HTML, PDF |
| Usage | low age volume, good document quality, no sla, OCR test |
Enterprise grade BP |
Common parameters
| Parameter | Recommended Value | Notes |
|---|---|---|
| Export Format | xmlForCorrectedImage | |
| Document Language | Language parameter must be supported by the license | |
| Character Recognition Variance | false | |
| Allowed Region Type | |
|
| Custom Region | ||
| Change DPI | ||
| Correct Orientation | true | |
| Correct Skew | true | |
| 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
- 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.
- When DPI is significantly lower, for example is within 72-110 DPI, increasing the DPI increases OCR recognition errors.
- 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.
- 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
- 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.
- See also Improve OCR Results for more improvements.