OMR templates

Application integrates OMR - Optical Mark Recognition - that has been written by Aaditeshwar Seth from the Udai Waterloo chapter, at the University of Waterloo. Udai is a volunteer student organization at the University of Waterloo in Canada and the University of California at San Diego. For more information about it see OMRProj website.

OMR ( Optical Mark Recognition ) engines is especially suited for extracting data from forms that have been photo-copied and then scanned; hence, the resultant images are likely to suffer from rotations, smudge marks, and random lines here and there. Examples of a few forms that the tool is able to handle with 100% accuracy are shown here. 

Add a new OMR template

Get a full example Omr_example.zip 

Preliminars

  • First make a form in PowerPoint using the template Omr_patterns.zip. Make sure that you do not move the two concentric circles in the top-left and bottom-right corners of the template. These are used by the software to determine the angle of rotation of the form.
  • Take a printout and make as many photocopies of the form as you want.
  • On the original printout, color all the marks with a black pen, and scan this marked up printout. Please be as careful as you can to align the printout so that there is no rotation. Some amount of error is fine, but not too much! This scanned image will be the template.

Create a new template

  • On top right click on  Create new template icon.
  • Choose the template image produced in preliminar step.
  • Choose the metadata fields.

    More information about register Metadata.

  • Click on Send button.

The application will generate two training files ( .asc and .config ) based on template file name:

  • template_file_name.asc
  • template_file_name.config

Update asc training files

Download the tranining .asc file and openkm with a standard text editor. This is actually an ascii representation of the template with all the marks marked with a '0', as shown below.

----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
---0---------------------------------0----------------------------0---------------------------
----------------------------------------------------------------------------------------------
---0---------------------------------0----------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
---0---------------------------------0----------------------------0---------------------------
----------------------------------------------------------------------------------------------
---0---------------------------------0----------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
---0---------------------------------0----------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
---0---------------------------------0----------------------------0---------------------------
----------------------------------------------------------------------------------------------
---0--------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------0---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------

Some of the marks may not be exactly aligned, but don't worry. Now, very carefully, label the marks with single characters, by setting all the marks in the same group with the same character. This is shown below. In case you run out of alphabets, you can use numerals or any other character such as - + ? . etc. Make sure that you do not alter the position of any mark! This is agreably hard to do, but we chose this method to avoid the need for making a graphical frontend.

----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
---a---------------------------------b----------------------------c---------------------------
----------------------------------------------------------------------------------------------
---a---------------------------------b----------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
---a---------------------------------b----------------------------c---------------------------
----------------------------------------------------------------------------------------------
---a---------------------------------b----------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
---a---------------------------------b----------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
---a---------------------------------b----------------------------c---------------------------
----------------------------------------------------------------------------------------------
---a--------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
------------------------------------------------------------------c---------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
  • Click on Edit template icon.
  • Click on Edit ".asc" training file icon.
  • Chose the training .asc file.
  • Click on Send button.

Update .fields training files

You now need to make a [template-filename].fields file, which contains the details of the various form-fields, as follows.

The format of each line is: character type subtype name value1 value2....

FieldDescription
Character

This is the same as the character you used in the .asc file

Type and Subtype

The types of fields supported are single and multiple choice lists, aligned row-wise (horizontally) or column-wise (vertically). And grids aligned horizontally or vertically. Each field is denoted by (i) row single or row multiple for a single or multiple selection field aligned row-wise, (ii) column single or column multiple for a single or mutiple selection field aligned column-wise, or (iii) grid row or grid column for a grid field aligned row-wise or column-wise respectively.

Field name

This can be any name you want to associate with the field.

Values

These are the field values, in order.

The values has a direct corresponde with metadata field values, first indicate the field name and others the values into

 

Example:

a column single okp:data.project alarmasCalleLarga alarmasRinconada alcantarilladosRinconada minaCaracoles colegioMetodista obrasAdicionalesMc villaLasRosas
b column single okp:data.year 2012 2013 2014 2015 2016 2017
c column single okp:data.type actas boletaCompra boletaHonorario boletaVenta comprobanteCompra comprobanteVenta contratosTrabajo contratosVenta documentacionContabilidad documentacionPropuesta documentacionLegal facturaCompra facturaVenta manuales oficios otrosDocumentos 
  • Click on Edit template icon.
  • Click on Edit fields training file icon.
  • Chose the training .fields file.
  • Click on Send button.

Check the template

  • Click on Check icon.
  • Choose some file to upload ( will be used to capture data).

And you'll get the results: