Aspose.OMR for .NET 22.8 Release Notes

What was changed

OMRNET-614Improved handling of rotated images by adding an extra positioning marker to the form. See Changes in application logic for important details on backward compatibility.Enhancement
OMRNET-622Additional rectangles on a scanned or photographed OMR form no longer interfere with the positioning markers.Enhancement
OMRNET-614VerticalChoiceBox (text markup / JSON markup) element now supports more than one write-in field.Enhancement
OMRNET-622Improved the algorithm for detecting positioning markers.Enhancement
n/aRemoved a blank line at the end of recognition results saved as a comma-separated values (CSV) file.Enhancement

Known issues and limitations

OMRNET-462Recognition of multi-page PDF and TIFF files causes an error.Scan each page of the filled form into a separate file and recognize them one-by-one.
OMRNET-555Recalculate method results in incorrect processing of ScoreGroup elements (text markup / JSON markup) and CustomAnswerSheet elements (text markup / JSON markup).Use RecognizeImage method with different threshold setting instead of run-time adjustments of recognition accuracy.

Public API changes and backwards compatibility

This section lists all public API changes introduced in Aspose.OMR for .NET 22.8 that may affect the code of existing applications.

Added public APIs:

No changes.

Updated public APIs:

The following public APIs have been updated in this release:

Multiple write-in fields in VerticalChoiceBox

The OMR API can now process more than one write-in field per VerticalChoiceBox (text markup / JSON markup) element. The corresponding WriteIn (text markup / JSON markup) elements must have unique names.

When the bubble corresponding to the write-in field is marked, the name of the Answer element is added to the recognition results and the contents of the write-in field are stored in Images collection.

Multiple write-in fields

// Initialize Aspose.OMR engine
Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
// Recognize completed form
Aspose.OMR.Api.TemplateProcessor recognitionEngine = omrEngine.GetTemplateProcessor("demo/form.omr");
Aspose.OMR.Model.RecognitionResult recognitionResult = recognitionEngine.RecognizeImage("demo/result.png");
// Save write-in fields
int i = 0;
foreach(System.Drawing.Bitmap bitmap in recognitionResult.Images)
	string writeInPath = Path.Combine("demo", $"image{i++}.png");
string result = recognitionResult.GetCsv();
Recognition results: CSV
Element Name,Value,
"What does OMR stand for?","Own answer 1"
Recognition results: field contents

Own answer

Backwards compatibility considerations

Aspose.OMR for .NET 22.7 and below can render a VerticalChoiceBox element with multiple write-in fields. However, the Images collection will store only one such field per VerticalChoiceBox element. This field must have the following properties:

  • The name of the parent Answer element must be write-in.
  • The name of the corresponding WriteIn element must be equal to the name of the VerticalChoiceBox element.

Otherwise, the contents of the field will not be stored in the Images collection, even if the corresponding bubble is marked.

Removed public APIs:

No changes.

Changes in application logic

This section lists any changes to the program architecture and form processing algorithms introduced in Aspose.OMR for .NET 22.8 that may affect the behavior of existing applications.

Additional positioning marker

To improve and speed up the processing of rotated scans of photos, a new positioning marker has been added to the upper right corner of printable OMR forms.

Positioning markers

All forms generated with previous versions of Aspose.OMR for .NET (that lack that extra marker) will not be recognized by Aspose.OMR for .NET 22.8. The following error will be returned: “Found 4 reference points. Since version 22.8 we support only 5 reference points. Please generate template using latest version.”.

Previous versions of Aspose.OMR for .NET may be able to process forms generated with Aspose.OMR for .NET 22.8, but recognition results are not guaranteed to be correct.

Improved positioning marker detection

The algorithm for detecting OMR form positioning markers has been significantly improved. Now it can filter out additional elements on the form that might otherwise be mistaken for a position marker.

Filter out elements that look like a position marker

Usage examples

See the examples below to learn more about the changes introduced in this release:

Multiple write-in fields

This source code is backward compatible with Aspose.OMR for .NET 22.7 and below.

?content=What does OMR stand for?
?content=Optical mark recognition
?content=Optical character recognition
?content=Own answer 1
?answer=Custom answer
?content=Own answer 2
?write_in=Custom definition

Multiple write-in fields