This project has moved. For the latest updates, please go here.

 

 

Using the Console Interface

One of the new features of the OMR Mark Engine suite is the ability to call the image processing engine from the command line. This allows developers to script the tool and do work on the output of the OMR engine. To use the command line interface, open a command window and navigate to the install directory.

You’ll be able to get help by executing OmrConsole:

image

Note that all input images should be the raw, unprocessed images as they were scanned from the scanning device. This tool can be used if a scanner is not WIA compliant and a third party API is required to retrieve images from the scanner.

Parameters

The console tool accepts a variety of parameters which control the behavior of the scanning engine. The parameters are as follows:

Parameter Cardinality Action
--source=filename 1..* Sets the image files to be processed as input to the engine. Can be a direct filename or a pattern.
--output=filename 1..1 Identifies the output file, where the results of the scan should be stored.
--validate=true|false 0..1 When true, indicates that only valid scans (those meeting the validation rules in the template) should be stored.
--format=csv|xls 0..1 Identifies the output format of the analysis. Can be either CSV, or raw XML. Default is XML.
--run=true|false 0..1 Indicates that the console tool should run any script attached to the template after scanning a successful page.
--template=filename 1..1 Identifies the template which should be used to analyze the scans.

Scenario #1: Process all JPGs as a CSV file

To process all the JPG files in a directory and save the result as a CSV file, the following options:

OmrConsole --source=C:\folder\*.jpg --template=c:\templates\mytemplate.mxml --validate --output=myoutput.csv --format=csv

Scenario #2: Process two PNGs as an XML file, running the template script

To process two PNG files in the current directory and save the result as XML, running the script in the scan template, the following options should be used:

OmrConsole --source=page1.png --source=page2.png --template=c:\templates\mytemplate.mxml --validate --run --output=myoutput.xml --format=xml

Last edited Jun 12, 2015 at 5:31 PM by fyfesoftware_oss, version 2