Using the Form Editor

The Form Editor is used to create Form Layout files that will be used to read documents with the PST OCR Mitek v1.0.

 

You will need to create a Form Layout for each document that you will be reading with the PST OCR Mitek Plug-In v1.0.

 

When you open the editor for the first time, the editor will be empty. To add a form right click in the left pane of the editor and choose 'Add Form' from the menu that appears.

 

A form will be added to the left pane called NewForm1 which will be highlighted so that you can rename it to a descriptive name for you form. A new field will also be added called NewField1.

 

You can rename the form or field as needed.

 

You will need to add a field to the editor for each field that you would like to read with the plug-in. Make sure that each field that you add has been added to the EZ-Scan database and is spelled exactly the same way. You can get more details on adding a field to the EZ-Scan database on the Add Field or Verify Tab pages.

 

NOTE: When adding the fields in EZ-Scan make sure that you designate then as Item Fields from the field type dropdown on the Add Field page.

 

Below is an example of the editor after 1 form and it's corresponding fields have been added.

 

Setting Field Properties

There are 3 sets of properties to set for each one of the fields that you have added to your form. They are separated on 3 tabs of the editor. Please read through the description of all of these properties and set them as needed for your fields. Required properties are marked with a  (*).

 

Text preceded by 'Developers:' will be special instructions for developers only. If you are using EZ-Scan please ignore these instructions.

 

General Tab

 

*Name

Choose an appropriate name for the field.

 

*Test Image

Choose a test file using the browse button. You should select an image in a directory filled with multiple test images. A large sampling is preferred so that variances in the forms can be accounted for when testing. You will be able to test all the images in the directory using the arrow buttons at the bottom of the editor. You should have a directory of images scanned for testing if you followed the instructions on the Getting Started page.

 

Enhanced JPEG

If you have images that vary in quality, contrast, or lightness you can choose to use EnhancedJPEG conversion when cutting the field snippet from the original image.

NOTE: You must scan in greyscale for this property to be used.

If you are scanning in greyscale you can adjust the threshold with which the image will be converted to bitonal.

 

Developers: This value will be used for the ConvertInputToBitonal method. It is not used for the EnhancedJPEG property.

 

Use Back Image

Check the Use Back  Image checkbox if you would like to read the back of an image with the OCR engine.

 

Characters and Confidences

Developers: For debugging purposes you can set a field for saving individual characters and the corresponding confidences read by the ReadSnippet method. This field is for reference only.

 

Save Snippets

For debugging you can choose to save all Snippets from the GetSnippet method in the "C:\TempImages" directory. Check the Save temp files checkbox to save the snippets.

 

Mitek Form and Image Files

You will need to specify where the Mitek form and image files are located. The OCR engine will need both of these values. These files will be supplied by PST. Contact PST for more information.

 

Developers:  The ReadSnippet method will need both the MitekFormfile and the MitekImageFile

 

Search Tab:

 

*Snippet Height and Snippet Width

You must set the size of the snippet for the GetSnippet function to cut out of the image. Make sure that the size of your snippet is larger than the size of the field that will be cropped from the image. An error will occur if the snippet values are not large enough. Once these values are set and Mitek form files have been received they cannot be changed without contacting PST for new Mitek form files.

NOTE: These values are in pixels. All other values on the search tab are in inches.

NOTE: These values must be a multiple of 16.

 

*Anchor

The anchor property sets the corner of the image that the Search,  and Crop coordinates will be measured from. Choose the corner of the image that is most stable. The corner that is most likely to have the most consistant coordinate measurements. Do not choose a side with a perforation. Typically the Top Right is used.

 

*Search Types

The PST OCR Mitek Plug-In creates a snippet of each field to read with the OCR engine. These fields are cropped out of the original image.

 

To locate a field 3 options are available

 

1. No Search

The  crop coordinates will be used when No Search is chosen. All 4 crop coordinates must be specified. As you type in the crop values a blue box will be drawn on the test image to show where the field will be cropped from the image.

 

Click the Show Snippet button to have the snippet cut out of the image for testing. Once the snippet has been displayed you can click the Read button to read it with the OCR engine or click the next or previous buttons at the bottom of the snippet dialog to cut the snippet out of the other images in the test directory. Close the Snippet dialog and adjust settings as needed and click Show Snippet again. Repeat until you are satisfied with your results.

 

Developers: See Crop properties for more information.

 

2. Find Line

When Find Line is used the search coordinates will be used to search an area of the image for a line the matches the minimum and maximum line width properties. As you type in the search coordinates a yellow box will be displayed on the image showing the area on the image that will be searched for the line.

 

Typically the line is used to locate a field that is consistently relative to the line. For instance, the field may always be .2 inches below the line. To shift the field coordinates to snip out the correct field use the pad properties.

 

You can use a combination of the coordinates returned from finding the line and hard coded crop properties to cut out the snippet. For instance if the field is always .2 inches below the line, is between 1 and 1.5 inches wide, and always less than .32 inches then, set the CropTop property to -1 to use the value returned from finding the line. Set the Crop Left property to -1 to use the value returned from finding the line. Set the Crop Width to 1.5 inches and set the Crop Height to .32 inches.

 

Click the Show Snippet button to have the snippet cut out of the image for testing. Once the snippet has been displayed you can click the Read button to read it with the OCR engine or click the next or previous buttons at the bottom of the snippet dialog to cut the snippet out of the other images in the test directory. Close the Snippet dialog and adjust settings as needed and click Show Snippet again. Repeat until you are satisfied with your results.

 

Developers: See also Search properties, Line width properties, Crop properties, Pad properties.

 

3. Find Text

When Find Text is used, the search coordinates will be used to search an area of the image for a Text Field the matches the falls within the range of values set for the character properties. As you type in the search coordinates a yellow box will be displayed on the image showing the area on the image that will be searched for the line.

 

You can use the pad properties to add a pad to any or all sides of the field as it is merged into the snippet.

 

Click the Show Snippet button to have the snippet cut out of the image for testing. Once the snippet has been displayed you can click the Read button to read it with the OCR engine or click the next or previous buttons at the bottom of the snippet dialog to cut the snippet out of the other images in the test directory. Close the Snippet dialog and adjust settings as needed and click Show Snippet again. Repeat until you are satisfied with your results.

 

Developers: See also Search properties, Line width properties, Crop properties, Pad properties, Character properties.

 

Validate Tab

The value returned from the OCR engine can be validated for each field. Check the check box next to the validation that you would like to perform on each field.

 

Minimum Confidence

This is a property to set the minimum acceptable confidence level returned from the OCR engine when it reads a field. As the engine reads each character in the field, it will return a character and the confidence with which it read that character. The confidence values range from 0 to 1000. 0 being the lowest. This value is set at 800 by default, and can be adjusted higher if values are being misread. In most cases it should stay at 800.

 

OverwriteExistingData

This is a property to determine whether to overwrite existing data in the database.

 

Numeric

If the result is not numeric it will fail validation and the value will not be saved.

 

RemoveNonNumericCharacters

This property will remove all non numeric characters from the result.

 

VerifyCharCount

CharCount

These 2 properties are used in conjunction. If the VerifyCharCount property is set to True then the result must be the same length as the value specified in the CharCount property or it will fail validation and the value will not be saved.

 

RemoveSpaces

If this property is set to True spaces will removed from the result.

 

DivideBy100

If a numeric value is printed without decimals the result will need to be divided by 100.

 

TextToStrip

You can strip text out of the result using this property. List string values to be removed from the result separated by pipe symbols (|) ex Account|Phone|Number  Account 1234 would be changed to 1234

 

Developers: The properties set on the Validation tab will be used to validate the Result property of the Field Object which is set by the ReadSnippet method. Calling the ValidateResult method will validate the Result using these validation properties.

 

Using the Left pane of the Form Editor

Add a new form

To add a new form, right click in the left pane of the editor and choose Add Form.

Delete a form

To delete a form, select the form to delete, right click and choose Delete Form.

Rename a form

To rename a form, select the form to rename, right click and choose Rename Form. Form names must be unique.

 

Add a field to a form

To add a field to a form, select the form, right click and choose Add new Field.

Delete a field

To delete a field from a form, select the field, right click and choose Delete Field.

Rename a field

To rename a field edit the name field on the General tab of the Editor.

 

Using the buttons along the bottom of the Form Editor

Show Snippet Button

This button will clip a snippet out of the Test Image and display in another window. This will use the coordinates from the Search tab to locate the snippet.

 

Using the Snippet Dialog

Read button

This button will read the snippet using the OCR engine and display the results in a message box.

NOTE: You must have a valid Mitek Form file and Mitek Image file before this will work.

The Result is the value that the engine read.

The Chars are the individual characters read, separated by commas.

The Confs are the corresponding confidence levels returned for each individual character read.

 

You will have the option of validating the result using the validation settings on the Validation tab. Click Yes and the validated result will be displayed in a message box.

 

Save Button

This will allow you to save the snippet to a file on your machine. You will need to do this, and email this image to PST so that a Mitek form file can be created. Contact PST for more information.

 

Close Button

This will close the snippet window.

 

Left and Right Arrow Buttons

These buttons will scroll through the files in the same directory as the Test Image. This will allow you to see your search and crop coordinates displayed on multiple images so that they can be adjusted for the optimal field retrieval. From the Snippet window the arrow buttons will scroll the same files and create a snippet from each one. This is a VERY IMPORTANT feature and will dramatically improve your field retrieval when used to compare a large sampling of images. Note: This only works if you chose a test image from a directory that contains multiple test images.

 

OK, Cancel and Apply Buttons

OK will save any changes made to the editor and close the editor.

Cancel will discard any changes made to the editor and close the editor.

Apply will save any changes made to the editor without closing it.