You can recognize specific marks on images by performing optical mark recognition operations. For example, you can recognize bubbles filled for a questionnaire, survey, or an exam in the form of Multiple Choice Questions. Please refer to the following sections for further details:
- Optical Mark Recognition – C# API Installation
- Recognize Image from MemoryStream using OMR in C#
- Batch Processing the Images for Recognition with OMR using C#
Optical Mark Recognition – C# API Installation
You can configure Aspose.OMR for .NET API in your C# applications by downloading the DLL from the Downloads sections, or via NuGet gallery with the following installation command:
PM> Install-Package Aspose.OMR
Recognize Image from MemoryStream using OMR in C#
Sometimes the images are stored in database or some remote resource and you can load those files in a MemoryStream. Likewise, there can be many scenarios where saving an image on the disk and then loading it for processing can be an overhead. So you can conveniently load the image into a Stream and perform OMR operations on it. Below are the steps to recognize an image from MemoryStream:
- Get the template to recognize.
- Initialize OmrEngine class object.
- Recognize image in the MemoryStream with the RecognizeImage method.
- Save output file with RecognitionResult class instance.
The following code shows how to recognize the image from a MemoryStream with OMR in C#:
Batch Processing the Images for Recognition with OMR using C#
You can process a batch of images in a folder and recognize the marks with optical mark recognition. Please follow the following steps for recognizing a batch of images:
- Get the OMR template to recognize.
- Get RecognitionResult of all the images using RecognizeFolder method.
- Save output as a CSV file.
The code below explains how to process a batch of images for optical mark recognition programmatically using C#:
Get Free API License
You can evaluate the API without any limitations by requesting a Free Temporary License.
Conclusion
In this article, you have learned how to recognize an image from a MemoryStream using OMR in C#. It also discusses recognizing all the images in a folder and saving the output result as CSV, comma-separated values, files. Moreover, you can take a look at other features of the API by visiting the Documentation. You can always get in touch with us at Free Support Forum for any of your concerns.