Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
To recognize a filled questionnaire, answer sheet, ballot, or other OMR form, digitize it in one of the supported formats. For best results, we recommend using a scanner (a basic office scanner or multifunction copier will suffice). If you do not have a scanner, you can simply take a picture of the form with any modern smartphone and upload the photo to your computer.
Aspose.OMR recognition engine is initialized with the recognition pattern (a file with .OMR extension), generated along with the printable form. The recognition pattern is loaded using GetTemplateProcessor
method of Aspose.OMR.Api.OmrEngine
class:
Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
Aspose.OMR.Api.TemplateProcessor templateProcessor = omrEngine.GetTemplateProcessor("pattern.omr");
You can also load the recognition pattern as a MemoryStream
object, which can be very useful when building web applications or APIs:
byte[] pattern = Encoding.UTF8.GetBytes(payload);
Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
Aspose.OMR.Api.TemplateProcessor templateProcessor = null;
using(MemoryStream ms = new MemoryStream(pattern))
{
templateProcessor = omrEngine.GetTemplateProcessor(ms, Encoding.UTF8);
}
If you have lost the recognition pattern file for the survey, simply generate it again from the form source code using exactly the same paper size, orientation, font, and other layout setting.
Aspose.OCR for .NET can recognize completed interactive machine-readable PDF forms along with scanned or photographed hand-filled forms. You can provide a mix of scanned and interactive forms and get the identical recognition results regardless of the source file type.
If Aspose.OCR for .NET detects at least one interactive element (such as a checkbox or input field) in the provided PDF, it classifies the PDF as interactive and reads the built-in form elements to retrieve results. If no interactive elements are found, the form is treated as a scanned document, and filled-in elements are identified using optical mark recognition algorithms. Barcodes and QR codes are always treated as images, regardless of the PDF type.
To recognize a completed form, process its scan or photo through Recognize
method of the initialized recognition engine. You can supply a form as:
Regardless of the completed form format, the recognition method supports accuracy adjustments for reliable results under various conditions.
The whole idea behind OMR is to automatically process hundreds of forms. Aspose.OMR for .NET greatly simplifies this task by allowing you to recognize a directory with form images using a single method rather than recognizing files one by one:
Aspose.OMR.Api.OmrEngine omrEngine = new Aspose.OMR.Api.OmrEngine();
Aspose.OMR.Api.TemplateProcessor templateProcessor = omrEngine.GetTemplateProcessor("pattern.omr");
Aspose.OMR.Model.RecognitionResult recognitionResults[] = templateProcessor.RecognizeFolder(@"C:\final_exam\");
Aspose.OMR API can automatically validate the completed forms and throw an exception when the form is filled incorrectly. For example, when more than one answer is provided for a question that can only accept a single answer. This can be very useful when handling strict forms, such as:
To validate the forms, set an additional parameter in the GetTemplateProcessor
method to FormValidationLogic.Exception
and catch Aspose.OMR.MultiselectException
upon form recognition.
OmrEngine engine = new OmrEngine();
TemplateProcessor templateProcessor = engine.GetTemplateProcessor(templatePath, FormValidationLogic.Exception);
try
{
RecognitionResult result = templateProcessor.Recognize("scan.png");
}
catch (MultiselectException ex)
{
Console.WriteLine("The student filled the form incorrectly!");
}
Recognition results are returned in the most popular data storage formats that can be imported into any popular database or analysis system: CSV, XML or JSON. See more information in the dedicated article.
You can use the graphical user interface control bundled with Aspose.OMR for .NET package to interactively fine tuning recognition accuracy before batch processing a large number of scanned forms or for investigating recognition problems.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.