Developer Docs
Welcome to the ConPDS OCR Engine documentation! The documentation is laid out so that it is easy to navigate.
1. Introduction
1.1 The OCR Engine
As we have taken care of all the factors that result in excellent and accurate recognition, you will save many, many development hours compared to using other OCR SDK’s where you need to tweak and tune many parameters to get the desired result.
1.2 Current releases
The current release for all versions is 2020.12.
2. How it works
2.1 Capture
2.2 Preprocessing
2.3 Detection
2.4 Recognition
2.5 Result processing
3. Prerequisites
3.1 Supported Operating Systems
- Microsoft Windows 7, 8, 10, 2008R2, 2012R2, 2016 – 64bit, 2019 – 64bit
- Linux Ubuntu version 16.04 or newer and Debian version 8 or newer – 64bit
- Android version 4.0 (API version 14) or newer
- Apple iOS version 9.x or newer
3.2 License activation
3.3 Supported image format
3.3 Image resolutions
Aspect ratio | Resolutions (HxW or WxH) * |
4:3 | 1024×768, 1280×960, 1400×1050, 1440×1080 |
16:10 | 1280×800, 1440×900, 1680×1050 |
*) Lower resolutions are supported but results might not be as accurate as possible. Higher resolutions are also supported, but it will result in larger files which results in slower recognition.
4. OCR engine output
4.1 JSON response
Below is an example description of the JSON response from the OCR engine.
A complete and up to date description can be found the documentation for each version of the OCR engine (found later on this page).
Field
|
Type and description
|
license
|
String. Missing
|
result
|
String. Missing
|
|
|
processing_time_ms
|
integer. Total time in milliseconds OCR engine used on recognition.
|
recognition_type
|
String. BIC of ILU. Detected container code standard. BIC (ISO 6346) or ILU (EN 13044-1)
|
result
|
String. Container code (11 alphanumerics) with the highest confidence factor.
|
checksum
|
Boolean. Indicates if recognized container code check digit matches the calculated check digit.
|
iso_size_type
|
String. If recognition_type is BIC, then the value will be the recognized ISO Size Type (4 alphanumerics) https://en.wikipedia.org/wiki/ISO_6346#Size_and_Type_Codes
|
confidence
|
Integer. Indicates recognitions calculated confidence fator.
|
|
|
recognition_area
|
This section gives information about the area of detection. Can be useful if you
|
ul_x
|
Integer. Upper left X coordinate
|
ul_y
|
Integer. Upper left Y coordinate
|
lr_x
|
Integer. Lower right X coordinate
|
lr_y
|
Integer. Lower right Y coordinate
|
|
|
candidates
|
OCR engine can return results of additional candidates. For each candidate, there will be a section with below fields. The calculated confidence factor orders sections.
|
recognition_type
|
String. BIC of ILU.
|
Result
|
String.
|
checksum
|
Boolean
|
iso_size_type
|
String.
|
confidence
|
Integer. Calculated confidence factor. As this is a candidate, this will always be lower than the main result.
|
|
|
image_metadata
|
This section will output some image metadata.
|
image_resolution
|
Contains information about the resolution of the processed image.
|
width
|
Integer. The width of the image
|
height
|
Integer. The height of the image.
|
5. Android
6. IOS
7. Microsoft Windows (library)
8. Microsoft Windows (console app)
8.1 Prerequisites
8.2 Preparation for usage
From the download link, you received, download and save the conPDS.jar file in any folder or your choice. Create new or modify config.properties file in same folder as the conPDS.jar file and insert the api_key and license_key provided to you via email.
Example config.properties file:
api_key=cc62f4b0-ccf1-44ac-b965-24b9cfcf7bfb
license_key=240bac2-58fb-4178-b21d-a4df3edab338
8.3 Running the application
The conPDS.jar is a java console application and accessed from the command line. On the first launch, application checks if the API and license keys are valid and activated. If not it contacts the ConPDS Licensing Server to get an activation key. Activation keys are then stored locally in a subfolder called \conpds. On the first launch, the application creates two subfolders: \incoming and \completed You have four options to process photos:
- Store photos inside the folder \incoming and call command line: java –jar conPDS.jar
- Call command line: java –jar conPDS.jar {path_to_photo}\{file_name}
- Call command line: java –jar conPDS.jar -listen 9999
- Call command line: java –jar conPDS.jar -monitor
Option 1 …
processes all photos in \incoming and moves them to \completed folder.
Option 2 …
processes a single specified photo only.
Option 3 …
launches app in listen mode ready for socket connection. This mode is used if you don’t want to save images onto disk and then process but instead just load the binary stream of the image directly into OCR engine and it will be processed just like it was a file. Port number (9999) can be any port of your choice. Please download code snippet for how to use socket connection.
Option 4 …
launches app in monitoring mode. This mode will automatically process all image saved inside \incoming folder and move them to \completed folder.
NOTE: Option 3 and 4 can be combined. In all situations, a new folder called \logs is created and will contain a log file with processing results. Log files are named with the current date. You need to write your code and logic to read output whether it is to log file or console. In both situations, a new folder called \logs is created and contains a log file with processing results. Log files are named with the current date. You need to write your code and logic to read output whether it is to log file or console. Results are returned as JSON response and will be saved into logfile or printed in the console.
8.4 Help
Calling java –jar ConPDS.jar –help prints below output:
Usage: java -jar conPDS.jar [-options] [path_to_image]
-version prints application compatible OS and version and exit
-id prints application ID and exit
-listen launch app in listen mode on specified port number
-monitor launch app in monitor mode
-nomove leaves photo/-s in original place instead of moving into /completed folder
-nolog don’tgenerate logfile
8.5 Sample code
Download sample code for using socket connection (download here)
9. Linux
10. REST API
10.1 Prerequisites
10.2 Sample code
11. Support services
11.1 Support
11.2 Software solution assurance
11.3 Product upgrades and service releases
Product Upgrades and Service Releases – To upgrade your version of ConPDS OCR engine to the latest available version, you can download from the download link provided when purchasing the product. If you no longer have the link, please contact ConPDS Support by sending email to support@conpds.com.
Container Photo Documentation System
ConPDS eliminates the need for digital cameras, memory cards and transportation from container yard to administration. With the ConPDS mobile app, container photo documentation simply becomes click-and-go.