How do I setup Ranger's OCR parameters?

Started by Bryan Clark, April 11, 2008, 10:38:22 AM

Previous topic - Next topic

Bryan Clark


Bryan Clark

#1
If your check scanner supports OCR reading, then you define OCR parameters in Ranger's GenericOptions.ini file.

Values in the GenericOptions.ini file and can be modified either manually or by calling Ranger's SetGenericOption() function prior to calling EnableOptions().
> SetGenericOption(<section name>, <value name>, <value>)

There are two steps to setting up OCR parameters.
1. Enable OCR reading
2. Define an OCR read zone

Step 1: Enable OCR reading
This step turn on OCR reading, if it supported by your check scanner and defines how many OCR zones that will be read.  You can call Ranger's GetTransportInfo() call to determine if OCR reading is supported and how many OCR zones can be read.

To enable OCR reading and enable a single OCR zone set the following values in Ranger's GenericOptions.ini file:

[OptionalDevices]

NeedOcr = true

NeedOcrReader1 = true



Step 2. Define an OCR read zone
These parameters tell Ranger which portion (zone) of the front image to read with OCR.

Setting the following values in the GenericOptions.ini file will read the MICR line on most checks.  You will find a similar example in your GenericOptions.ini file.

[OcrReader1]
Font=E13B
VerticalCenter=7
Right=0
Width=150
Height=10


Where:

Font=                - Font of the OCR line.
                            Legal values for your check scanner: See Ranger's TransportInfo.ini file [OcrReader*] sections.

VerticalCenter=   - Vertical center of the OCR line in millimeters measured from the bottom of document.
Right=               - Right edge of of OCR zone in millimeters from the right edge of the document.
Width=              - Width of OCR zone in millimeters from the "Right" value.
Height=             - Height of OCR zone from top to bottom in millimeters.


More: 
An OCR read zone is a rectangular region on the document wih a Height and Width.  The OCR read zone/retangle also has a position.  The rectangle position is defined my its Right edge and its VerticalCenter.

The easiest way to define the OCR zone postion values for a document is to:
  1. Draw a rectangle around the OCR line that you want to read.  The OCR zone should be slightly larger (in each direction) than the OCR line.  This will allow you to support slight variations in printing and document size.  However the OCR zone should not be too large or it will pick up stray characters from other areas of your documents.  Adjust the zone size to work best for the documents that you have.
  2. Measure the width of the rectangle.  This will become your Width option value.
  3. Measure the height of the rectangle.  This will become your Height option value.
  4. Measure from the right (leading) edge of the document to the right edge of the rectangle.  This will become your Right option value.
  5. Measure from the bottom edge of the document to the vertical center of the rectangle.  The vertical center is in the middle between the rectangle top and bottom.  This will become your VerticalCenter option value.



Ranger® - The universal check scanner interface
Copyright © 2009 Silver Bullet Technology
www.sbullet.com


Erik Wesemann

See attached file for visualization of OCR area.