Ordered OMR (Extractor Type)

From Grooper Wiki
(Redirected from Ordered OMR)

This article was migrated from an older version and has not been updated for the current version of Grooper.

This tag will be removed upon article review and update.

This article is about the current version of Grooper.

Note that some content may still need to be updated.

2025 2023

Ordered OMR is an Extractor Type used to return OMR check box information. Ordered OMR returns information for multiple check boxes within a defined zone based on their order and layout. The zone may be optionally fixed on the page or anchored to a static text value (such as a label).

You may download the ZIP(s) below and upload it into your own Grooper environment (version 2023). The first contains one or more Batches of sample documents. The second contains one or more Projects with resources used in examples throughout this article.

About

Check boxes on a form can be extremely useful. They give us quick information at a glance. However, there is not an expression we can put into a text extractor, such as a Pattern Match or List Match, to find checked and unchecked boxes. Instead we must use one of the OMR extractors.

OMR stands for "Optical Mark Recognition". OMR first detects the check boxes on a document and then determines whether not that box is checked or unchecked. The most common ways a box can be checked are with a checkmark, black box, or an "X".

There are three types of OMR recognition in Grooper: Labeled OMR, Ordered OMR, and Zonal OMR.

For Ordered OMR and Zonal OMR, documents in Grooper first need to be recognized and go through the Box Detection or Box Removal step from either and OCR Profile or an IP Profile. Please see the OCR and IP Profile wiki articles for more information.


Ordered OMR determines which boxes are checked and unchecked and then returns values based on the order of the boxes. Before extraction, the boxes have to be given an Output Value to assign a specific value to each box. So, what does this mean?

How Does It Work?

Understanding Ordered OMR

If you look at the image on the right, you will see a check box list. You can see that Baseball is checked as NO, Basketball is checked as YES, and so on down the list. Grooper uses the pixel count inside of a box to determine if it is checked or not. There are more pixels inside of a checked box than an unchecked box.

A Labeled OMR extractor uses labels to determine which check box values to return. However, with an Ordered OMR extractor, the labels next to the check boxes mean very little. Instead, the order of the boxes is important.

In this example, the check boxes are arranged in a grid. There are two columns labeled "YES" and "NO" and eleven rows numbered 1-11, for a total of 22 check boxes. Selecting either a Vertical or Horizontal Flow Direction instructs Grooper on how to read the boxes. Grooper will then return results for checked boxes within the flow.

Horizontal Flow

With a Horizontal Flow Direction selected, Grooper would first look at box for 1 and YES or 1Y and determine whether or not it is checked. Then it would look at 1N and determine whether or not that one was checked. Then it would return to the first column at 2Y and then move to 2N and so on. It jumps back and forth between the two columns, first looking horizontally for information before moving on to the next row. If there were a third column, Grooper would look at the first row and extract the values for the first, second, and third columns before moving to the next row.

So in this example if we were to symbolize "YES" with a Y and a "NO" with an N, Grooper would return the following values in this order: 1N 2Y 3N 4N 5N 6Y 7Y 8N 9N 10Y 11N

Vertical Flow

With a Vertical Flow Direction selected, Grooper would first look at box for 1 and YES or 1Y and determine whether or not it is checked. Then it would look at 2Y and determine whether or not that one was checked, and so on down the line. At the end of the first column, the Ordered OMR extractor would start again at the top of the second column at 1N and go down that column determining whether or not the boxes are checked.

So in this example if we were to symbolize "YES" with a Y and a "NO" with an N, Grooper would return the following values in this order: 2Y 6Y 7Y 10Y 1N 3N 4N 5N 8N 9N 11N


Click here to return to the top of the section

How To

So how do we set this up in Grooper? An Ordered OMR can be selected anywhere an extractor is used.

Selecting the Extractor

Configuring on a Value Reader

  1. In your Node Tree, create or select a Value Reader.
    • Visit the Value Reader Wiki Page for instructions on how to create a Value Reader.
  2. Select the "Value Reader" tab.
  3. Click the drop down list next to Extractor and select Ordered OMR.

Configuring on a Data Type

  1. In your Node Tree, create or select a Data Type.
    • Visit the Data Type Wiki Page for instructions on how to create a Data Type.
  2. Select the "Data Type" tab.
  3. Click the drop down list next to Local Extractor and select Ordered OMR.

Configuring on Other Object Types

The Ordered OMR extractor can be used on a multitude of object types. Any object that has an extractor property can be configured with an Ordered OMR.

The configuration process on other objects is identical to both the Value Reader and Data Type objects. Simply select Ordered OMR as your extractor type.


Examples where you can use an Ordered OMR include:

  • A Data Type's Value Extractor property
  • A Document Type's Positive Extractor property
  • The Labeled Value extractor's Label Extractor property
  • The Pattern-Based Separation Provider's Value Extractor property

Click here to return to the top of the section


Once you have Ordered OMR selected as the extractor type, there are several properties that need to be configured.

Mode: This property sets the check box format. There are three options for Mode: CheckOne, CheckMulti, and Boolean. The CheckMulti option is going to be most commonly used for an Ordered OMR extractor. For the example below, we will be using CheckMulti. For more information on the other two options, please visit the Labeled OMR - 2021 Wiki Page.

Location: This property tells Grooper what area of the document to look for OMR boxes. There are four options for the Location: Fixed Region, Relative Region, Shape Region, and Text Region. For the example below, we will be using Fixed Region.

Output Values: This property allows you to assign each check box a value to be extracted. The order of your Output Values depends on whether you decide to use a Horizontal or Vertical Flow Direction.

Flow Direction: This property tells Grooper in what order to extract the box values. There are two options for the Flow Direction: Horizontal or Vertical. If you do not select the proper Flow Direction that matches with your Output Values, Grooper will not extract the correct information. Please reference the "About" section of this article to determine which Flow Direction fits your needs.

Extractor Properties

Mode

  1. After you have created your object type and set Ordered OMR as your extractor, select the "Tester" tab.

  1. Look for the Mode property and click the three stacked lines on the right to open up the drop down list.
  2. Select the preferred Mode to be used. For this example, we will be selecting the CheckMulti Mode.
    • Generally an Ordered OMR is used when multiple items can be checked.

  1. When selecting CheckMulti you can enter a Separator String. By default, this will enter a space between each result returned to separate the results and make them easier to read. If desired you can insert a comma, pipe, forward slash, or any other separator you would like. In this case, we will use a comma as our separator.

Location

  1. Click on the drop down next to Location.
  2. Select the preferred Location method to be used. In this example we will use Fixed Region.

  1. Click the arrow to the left of the word Location to open sub-properties.
  2. Now you will need to configure the Location method you have chosen. Since we are using Fixed Region, we need to give the extractor Bounds to look within. Click the ellipsis button next to the Bounds property.

  1. A new window will open. Click the marquee selection tool located just above your Document Viewer.

  1. On your document, draw a box around all of the boxes you wish to be part of the extraction.
    • You will notice that on the top left side of the window there are properties that say Left, Top, Width, and Height. Once you select an area with the marquee selection tool, these properties will automatically be updated with the bounds you selected. You can edit each of these by typing in different values if you wish.
  2. Click "OK" in the top right hand corner to set the Bounds.

  1. If you have multiple pages, use the Page Filter property to let Grooper know which page of each document the Fixed Region applies to. Just enter in the page number into the text box.
  2. Auto Snap is an optional property you can set if you have lines detected on your document. When Enabled, the bounds you selected will automatically "snap" to the lines around the selected region. For this example, Auto Snap is not needed, but to Enable the property simply click the checkbox on the right of the property.

Output Values and Flow Direction

  1. Decide what Flow Direction you intend to use and take a look at your document. You will need to assign a value to each check box for Grooper to return.
    • In this example we will be using a Vertical Flow Direction. We are going to say "Y" symbolizes "YES" and "N" symbolizes "NO". So, for the top left check box, we will assign it a value of "1Y" for being a "YES" answer to question #1. We will go down that column and assign the rest of the values "2Y", "3Y", "4Y" and so on. The box at the top of the second column will be assigned a value of "1N" for being a "NO" answer to question #1. From there we will go down the second column in order and assign the values of "2N", "3N", "4N", and so on. So our list looks like this: "1Y,2Y,3Y,4Y,5Y,6Y,7Y,8Y,9Y,10Y,11Y,1N,2N,3N,4N,5N,6N,7N,8N,9N,10N,11N".
    • If we were going to use a Horizontal Flow Direction the list would look like this instead: "1Y,1N,2Y,2N,3Y,3N,4Y,4N,5Y,5N,6Y,6N,7Y,7N,8Y,8N,9Y,9N,10Y,10N,11Y,11N".
  2. Enter the values in order following your Flow Direction in the Output Values text box.


  1. Use the drop down next to the Flow Direction property and select either Vertical or Horizontal.
    • In this example, we put in our Output Values from top to bottom, so we will change the Flow Direction to Vertical.

  1. Save and Test your extraction.

Click here to return to the top of the section

See Also