1. Products
  2.   OMR
  3.   .NET
  4.   Aspose.OMR for .NET

Aspose.OMR for .NET


C# .NET API to Extract Data via Optical Mark Recognition

Advanced C# .NET OMR API for Accurate & Reliable Optical Mark Recognition. Develop Applications for Designing, Rendering & Recognizing Hand Filled Answer Sheets, Images, Documents and More.

Aspose.OMR for .NET is a very useful and robust library designed to streamline Optical Mark Recognition (OMR) processes within the .NET framework, providing software developers with a powerful toolset for handling diverse OMR scenarios. It can recognize and extract data from scanned images, smartphone photos, documents with ease. The library has included support for almost all popular images formats such as JPG, PDF, TIFF, PNG, BMP or GIF. This flexibility allows developers to handle scanned documents in different formats. The API can be used to retrieve valuable data such as marked choices, percentages, and more, facilitating efficient data analysis.

Aspose.OMR for .NET is a comprehensive library that empowers software developers to integrate OMR capabilities into their applications without any external dependencies. Whether you're working on survey applications, exam grading systems, or any other scenario where automated form processing is required, it simplifies the extraction of valuable data from paper forms. Whether you're developing a web application, a desktop software, or a cloud-based solution, the API adapts to your development environment.

Aspose.OMR for .NET offers a rich set of features to facilitate accurate and efficient Optical Mark Recognition in .NET applications. With its advanced capabilities, seamless integration, and comprehensive documentation, software developers can harness the power of OMR to automate form processing in diverse scenarios. Whether you're building exam grading systems, survey applications, or any solution requiring automated data extraction from marked forms, it is a valuable tool for enhancing your application's capabilities.

Previous Next

Getting Started with Aspose.OMR for .NET

The recommend way to install Aspose.OMR for .NET is using NuGet. Please use the following command for a smooth installation.

Install Aspose.OMR for .NET via NuGet Command

Install-Package Aspose.OMR

You can download the library directly from Aspose.OMR for .NET product page

Accurate OMR Recognition via C# API

Aspose.OMR for .NET is very easy to handle and employs advanced algorithms to ensure accurate and reliable OMR recognition inside .NET applications. The API includes the ability to recognize marked bubbles, checkboxes, and grids on scanned images or documents with just a couple of lines of code. The API supports various image formats, including JPEG, PNG, and TIFF, providing flexibility in handling scanned documents. One the recognition is complete the results can be returned and saved in the most popular data storage formats including CSV, XML or JSON. The following example shows, how software developers can recognize form data from a memory stream inside .NET applications.

How to Recognize Data from a Memory Stream via C# .NET?

// Load recognition pattern and form image
byte[] pattern = Encoding.UTF8.GetBytes(payload[0]);
byte[] form = Encoding.UTF8.GetBytes(payload[1]);
// Initialize recognition engine
Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
Aspose.OMR.Api.TemplateProcessor templateProcessor = null;
using(MemoryStream patternStream = new MemoryStream(pattern))
	templateProcessor = omrEngine.GetTemplateProcessor(patternStream, Encoding.UTF8);
// Recognize
Aspose.OMR.Model.RecognitionResult recognitionResult = null;
using(MemoryStream formStream = new MemoryStream(form))
	recognitionResult = templateProcessor.Recognize(formStream);

Perform Bulk OMR Recognition via .NET API

Bulk OMR recognition is a common requirement in scenarios where there's a need to process a large number of forms efficiently. Aspose.OMR for .NET provides features and functionalities to handle bulk OMR recognition seamlessly. The API Iterate through the collection of images and perform OMR recognition on each image. It extract relevant data from the recognition results, such as marked choices, percentages, etc. The following example demonstrates how software developers can perform Buk OMR recognition using C# .NET commands.

How to Perform Buk OMR Recognition via .NET API?

using Aspose.Omr;

class Program
    static void Main()
        // Load OMR template
        OmrEngine engine = new OmrEngine();
        OmrTemplate template = engine.TemplateProcessor.LoadTemplate("path/to/template.amr");

        // Configure recognition settings
        OmrRecognitionSettings settings = new OmrRecognitionSettings();
        settings.AdaptiveThreshold = true;

        // Process each image in bulk
        string[] imagePaths = { "path/to/image1.jpg", "path/to/image2.jpg", "path/to/image3.jpg" };

        foreach (string imagePath in imagePaths)
            OmrResult result = engine.RecognizeImage(template, imagePath, settings);

            // Extract data from results
            foreach (OmrRecognitionBlock block in result.RecognitionBlocks)
                foreach (OmrPage page in block.Pages)
                    foreach (OmrQuestion question in page.Questions)
                        // Access question details, marked choices, etc.

            // Process the result as needed for each image

Versatile Template Design & Integration with .NET Apps

With Aspose.OMR for .NET, Designing OMR templates is flexible and user-friendly. Developers can create templates with various question types, such as multiple-choice, grid, and text. Templates are customizable to suit specific form layouts. The API also supports seamless integration of OMR capabilities into .NET applications. Whether you're developing a web application, a desktop software, or a cloud-based solution, Aspose.OMR for .NET adapts to your development environment. Moreover, it also provides tools for advanced marking analysis, including identifying partially marked choices, handling errors, and enabling adaptive recognition settings.