Optical Mark Recognition – Implementation

  • Post published:September 3, 2015

The application under development by vteam #67, is an image scanning and indexing desktop application. It is mainly developed using C#, .NET Framework, SQL Server 2008, Atalasoft OMR Engine, Image Processing SDK, DotTWAIN SDK. It is multilingual and has different modules which allows specific user group to focus on a specific area, like scanning, Quality assurance, Index/auto indexing, exporting.

Optical mark recognition (also called optical mark reading and OMR) is the process of capturing human-marked data from document forms such as surveys and tests. Client shared his requirement to add “Optical Mark Recognition (OMR)” feature into the existing barcode recognition template which already addresses standard barcodes and custom text base zone recognition.


The true OMR reader applications always consists of two modules;

  • Creating template forms and printing for end users
  • Scanning filled forms and performing OMR which means the location of each mark is loaded from template and OMR engine check same coordinates on the scanned images

Provided that “To recognize Optical mark, the OMR engine expects its location (coordinates) to be provided” but in our case, the template form is not available which means user needs to create a template based on the image to specify location of each Optical Mark. Often OMR sheets/forms contain hundreds of mark and to map every mark’s location is very difficult and time taking.

There are object detection algorithms (like Hough Transform/Hough Circles Detection) which can find the objects on an image and provide coordinates but documents with lots of text and noise, it never provided reasonable accuracy since some marks matches the letter O and digit 0, sometimes marks are scattered in between text/paragraphs.

Real World OMR Workflow:

Create OMR template -> Print templates -> Fill/Gray out the Marks -> Scan the filled forms -> Do recognition

Our Application OMR Workflow:

Scan the filled OMR forms -> Create Template to specify each mark location -> Do Recognition


A custom algorithm was written to find the Optical marks from zones instead of whole image. Images are pre-processed (Noise cleanup, Edge detection, Thresholding) before detecting marks. User draws a zone around group of marks and it detects expected number of marks coordinates. For a single group or marks, only one zone is required. But for marks scattered across text blocks, sub zones were created and results were merged to output single result.

  1. Single zone per Optical marks group:
  2. A Zone along with sub zones for a questionnaire with marks located in different text blocksomr-2


It decreased template creating time considerably. There were customers who wanted OMR surveys with around 1000 marks per form but mapping that many marks coordinates one by one was a tiresome and time taking task. Like in the above examples to read a SSN zone, user would have to map 90 marks’ coordinates but zonal recognition with customized object detection reduced it to draw only a simple zone and set few properties for it.