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

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:

  1. Get the template to recognize.
  2. Initialize OmrEngine class object.
  3. Recognize image in the MemoryStream with the RecognizeImage method.
  4. 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:

  1. Get the OMR template to recognize.
  2. Get RecognitionResult of all the images using RecognizeFolder method.
  3. 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.

See Also