Using OMR in LEADTOOLS C API OCR

LEADTOOLS OMR (Optical Mark Recognition) Module extends the functionality of LEADTOOLS SDKs by providing methods and callbacks for easily incorporating fast, automated, and accurate optical mark recognition into your application. Optical Mark Recognition is used in surveys, polls, academic exams and official applications, to recognize the bubbles that the applicant fills in to indicate their selections. Supported marks include tick marks, X's, lines, check marks, and scribbles. Supported shapes (or frames) include boxes, circles and ellipses.

The OMR features are included as an add-on module to extend the functionality of the LEADTOOLS OCR engines by providing methods, and callbacks for easily incorporating the OMR engine into your applications.

For background and full details, see:

OMR Technology

The printed frame should at least be 50 x 50 pixels to be recognized properly. Also the printed frame needs to be noticeable (This is easily accomplished by setting the scanner brightness.)

OMR is automated, very fast and accurate. It also has multiple options for different types of applications.

OMR options include "Frame detection options" and "Mark recognition sensitivity". For more information refer to the L_OcrZoneManager_SetOMROptions structure.

"Mark recognition sensitivity" specifies how sensitive OMR will be to filling marks. (Highest, High, Low and Lowest). For example: if the applicant filled the frames with a small ticks then highest mark recognition sensitivity should be set. But if the application or exam requires the applicant to fill the frame completely, then lowest mark recognition sensitivity should be set.

Also, if the printed frames are empty and they are to be filled using simple marks, then use the Highest mark recognition sensitivity. See the following figure:

omr1.gif

If the printed frames contain letters or numbers and they are to be filled completely, then use the Lowest mark recognition sensitivity. See the following figure:

omr2.gif

Hardware specific paper

Some types of OMR paper are designed to be used with specific types of hardware. Usually these types contain bubbles with letters or numbers. The characters and bubbles are printed in red or light gray. See the following figure:

omrfig1.gif

The characters and bubbles allow the hardware to recognize the color of these areas. As a result, when the paper is scanned, the bubbles and characters will drop out. This leaves only the filled marks visible.

It is not recommended to use hardware-specific paper. If hardware-specific paper is used, keep in mind the following tips to help ensure obtaining the most accurate results when using such types of paper.

To make bubbles and characters scanning clearer, the scanner brightness should be set to high. This will cause the lighter color of the bubbles and characters to drop out. See the following figure:

omrfig2.gif

Another possibility is to set the scanner brightness to low. See the following figure:

Note: Do NOT use the auto-brightness settings when scanning hardware specific paper. This will damage the frames (bubbles) and make them hard to see. See the following figure:

omrfig4.gif

Currently, there is no support for auto-recognizing OMR fields. To recognize OMR fields, perform the following steps:

  1. Add an L_OcrZone object to the page zones list using (L_OcrPage_AddZone or L_OcrPage_InsertZone). Set the following members of the L_OcrZone structure:
    • L_OcrZone.ZoneType to L_OcrZoneType_OMR
    • L_OcrZone.Bounds to the rectangle surrounding the zone in page coordinates.
  2. Repeat for every OMR on the page
  3. Perform OCR recognition on the page using L_OcrPage_Recognize.
  4. After the recognition process is complete, get the recognized characters using L_OcrPage_GetRecognizedCharacters. For each OMR zone added, the recognized characters will contain one item (L_OcrCharacter) with the following properties:
    • L_OcrCharacter.Code Will contain the current OMR character used for "filled" and "unfilled" values as set by L_OcrOMROptions.StateRecognitionCharacters. Default values are '1' for filled and '0' for unfilled.
    • L_OcrCharacter.Confidence A number between 0 and 100 (where 100 is the maximum confidence) that indicate the after-recognition confidence the OCR engine has in the accuracy of the recognition results.

You can also use the L_OcrOMROptions structure to control how the LEADTOOLS OCR engine performs OMR recognition. With this structure, you can:

  1. Change the frame detection method by calling L_OcrOMROptions.FrameDetectionMethod. Frames stand for the checkbox that may exist around OMR fields.
  2. Change the sensitivity of the OMR detection engine by calling L_OcrOMROptions.Sensitivity.
  3. Change the characters used to replace unfilled and filled OMR marks in the output document (for example, in a PDF file) by calling L_OcrOMROptions.StateRecognitionCharacters.
  4. After setting all OMR options via the L_OcrOMROptions structure, call the L_OcrZoneManager_SetOMROptions method to set these options into the engine.

To use OMR in LEADTOOLS, you need a special key to unlock the OMR capabilities, for more information, refer to Setting a Runtime License.

For an example on using OMR in LEADTOOLS, refer to L_OcrZoneManager_SetOMROptions.

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS OCR Module - LEAD Engine C API Help