1. Products
  2.   OMR
  3.   C++
  4.   Aspose.OMR for C++

Aspose.OMR for C++

 
 

C++ Library to Create OMR Forms & Recognize Data

A Cutting-edge Optical Mark Recognition (OMR) Solution for C++ Developers that Allows to Create OMR Templates/Forms and Recognize Scanned Images & Photos inside C++ Applications.

In the ever-evolving landscape of software development, creating robust solutions for Optical Mark Recognition (OMR) is essential. Aspose, a renowned name in the field of document manipulation APIs, introduces its cutting-edge solution for C++ developers with Aspose.OMR for C++. The API emerges as a game-changer, offering a robust API that simplifies the integration of OMR capabilities into C++ applications. To facilitate a smooth integration process, Aspose provides comprehensive documentation for the API. Software Developers can access detailed guides, code examples, and API reference documentation, ensuring a hassle-free development experience.

Aspose.OMR for C++ is equipped with advanced OMR functionality, allowing software developers to design and process complex forms with ease. The API supports various question types, including multiple choice, grid, and text-based questions, making it versatile for diverse applications. It supports advanced features like Recognition of scanned images and photos, recognizing data from tests, exams, questionnaires, surveys and high accuracy rate & ability to export the results in CSV format. It is designed with cross-platform compatibility in mind. Developers can deploy their applications on various platforms without worrying about compatibility issues.

AAspose.OMR for C++ is engineered to deliver high-precision OMR processing. The API supports a wide array of OMR elements, including checkboxes, grids, and text areas. Aspose offers a suite of powerful APIs, and Aspose.OMR for C++ seamlessly integrates with other Aspose products. This synergy allows developers to enhance their applications with additional features, creating a comprehensive solution tailored to specific requirements. It stands out as a robust and feature-rich solution for developers seeking powerful OMR capabilities. With seamless integration, high accuracy processing, template flexibility, and extensive support, this API empowers developers to tackle complex OMR tasks with ease.

Previous Next

Getting Started with Aspose.OMR for C++

The recommend way to install Aspose.OMR for C++ is via NuGet. Please use the following command for a smooth installation.

Install Aspose.OMR for C++ via NuGet

 
Install-Package Aspose.OMR.Cpp

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

Generate OMR Template/Form via C++ API

Aspose.OMR for C++ API facilitates template creation, a crucial aspect of OMR systems. With C++ OMR API, software developers can design templates for different types of forms, ensuring accurate data extraction during the scanning process. The API can be used to customize the paper size, orientation, font, colors and other layout settings that apply to all template pages and more. This feature streamlines the integration of OMR capabilities into various domains, such as surveys, exams, and assessments. The following example shows how to generate a form image that can be printed out and handled to respondents inside C++ applications.

How to Generate a Form Image inside C++ Applications?

//Generate the form for ANSI Letter paper size

System::SharedPtr engine = System::MakeObject();
// Generate the form for ANSI Letter paper size (8.5 by 11 inches)
System::SharedPtr settings = System::MakeObject();
settings->setPaperSize(Api::PaperSize::Letter);
System::SharedPtr result = engine->GenerateTemplate(markupPath, nullptr, settings);

Recognize OMR Forms via C++ API

Aspose.OMR for C++ is equipped with advanced OMR functionality, allowing software developers to design and process complex forms with ease. Recognizing Optical Mark Recognition (OMR) forms using the API is a straightforward process that involves several key steps. After the installation users’ needs to load the OMR template that corresponds to the form you want to recognize. After that load the scanned image of the OMR form and process it using the loaded template, retrieve the recognized data and save it if needed. The following example shows how to recognize and extract data from OMR form inside C++ applications.

How to Recognize and Extract Data from OMR Form using C++?

#include 

omr::AsposeOmrApi api;
api.LoadTemplate("path/to/your/template.omr");

// Load and Process the Image

api.LoadImage("path/to/your/scanned/image.jpg");
api.Process();

// Access Recognized Data

omr::OmrPageReader reader = api.GetOmrPageReader();
std::vector pages = reader.ExtractPages();
omr::OmrPage page = pages[0]; // Assuming there's only one page in the form

// Access and handle recognized data

// Example: Extracting data from the grid
omr::Grid grid = page.GetGrids()[0]; // Assuming there's only one grid on the page
std::vector> data = grid.ExtractData();

// Finalize and Cleanup

api.Finalize();

High-Speed & Efficient OMR Scanning

Efficiency is key, especially when dealing with large volumes of scanned documents. Aspose.OMR for C++ excels in high-speed scanning, enabling swift and accurate data extraction from OMR sheets. This feature is particularly valuable for applications where time is of the essence, such as time-bound exams or surveys. The API supports a wide array of OMR elements, including checkboxes, grids, and text areas. This comprehensive support enables developers to handle a variety of document types, making it a versatile choice for applications requiring OMR functionality.

Multi-Page Document Processing

Aspose.OMR for C++ excels in multi-page document processing, allowing developers to handle extensive datasets seamlessly. This capability is particularly valuable for applications involving surveys or exams with numerous participants. Processing multi-page documents using OMR C++ API involves a series of steps to load, process, and extract data from each page. Such as loading the OMR template, process each page of the multi-page document and save data.

How Load and Process Each Page of Multi-page Document via C++ API?

#include 
// Load the OMR template
omr::AsposeOmrApi api;
api.LoadTemplate("path/to/your/template.omr");
//process each page of the multi-page document.
const int pageCount = 5; // Change this to the total number of pages in your document
for (int currentPage = 1; currentPage <= pageCount; ++currentPage) {
    std::string imagePath = "path/to/your/scanned/image" + std::to_string(currentPage) + ".jpg";
    api.LoadImage(imagePath);
    api.Process();
    // Access and handle recognized data for each page
    omr::OmrPageReader reader = api.GetOmrPageReader();
    std::vector pages = reader.ExtractPages();
    omr::OmrPage page = pages[0]; // Assuming there's only one page in each image
    // Access and handle recognized data
    // Example: Extracting data from the grid
    omr::Grid grid = page.GetGrids()[0]; // Assuming there's only one grid on the page
    std::vector> data = grid.ExtractData();
    // Further processing or storage of the data can be done here
    // Cleanup for the next iteration
    api.Finalize();
}
// release resources.
api.Finalize();