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.

What is Aspose.OMR for .NET?

Aspose.OMR for .NET is a powerful and flexible .NET OMR Library designed to streamline Optical Mark Recognition processes in C# and .NET environments. It enables developers to recognize and extract text from scanned documents, photos, and image files in formats like JPG, PNG, PDF, TIFF, BMP, and GIF. This makes it ideal for applications that require automated data collection from paper forms. The API retrieves marked answers, percentages, and other critical data, making it a valuable tool for analyzing exam sheets, surveys, and feedback forms efficiently.

Ideal for .NET software developers, this C# OMR API helps develop OMR apps without needing third-party software. Whether you’re building web apps, desktop tools, or cloud-based solutions, Aspose.OMR seamlessly integrates into any development environment. Its clean documentation and wide feature set make it perfect for creating custom .NET OMR software like exam grading systems or survey processors. For those seeking a free OMR library with scalable capabilities, this OMR SDK for .NET offers a reliable foundation for extracting and processing data from marked forms.

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 Bulk 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.