Optical mark recognition system


  • Hi,

    I want to develop a OMR system using If anyone have done this system, can you share the links with me? I don't found any related links with this system. I'd attached my OMR Sheet for your reference.



    Monday, March 5, 2018 3:16 AM

All replies

  • Hi Bella67,

    What problem have you encountered when you created OMR system? Please provide detailed info here.

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, March 5, 2018 5:33 AM
  • Google search results for Optical Mark Recognition You can use an online converter like Telerik to convert C# to VB.Net (search in Google for "online C# to VB converters").

    La vida loca

    Tuesday, March 6, 2018 3:40 AM
  • The LEADTOOLS toolkit ( provides the ability to recognize both text and OMR recognition using OCR for detection and extraction. In addition, if the image or document you are extracting from has an organized and defined structure, such as the answer sheet you are showing, you can use the LEADTOOLS Forms Recognition and Processing features ( to create a single template with multiple text and OMR fields defined in it to extract from multiple filled sheets. (Disclaimer: I am an employee of the vendor of this toolkit)

    The code to extract OMR from a master form template with defined fields would look like this:

    using (RasterCodecs codecs = new RasterCodecs())
        codecs.Options.Load.AllPages = true;
        codecs.Options.RasterizeDocument.Load.XResolution = 300;
        codecs.Options.RasterizeDocument.Load.YResolution = 300;
        //Set the directory of the Master Form Repository
        string masterFormRepository = @"OMR Master Form Path";
        //set the directory of the filled forms
        string filledFormDirectory = @"Filled OMR Path";
        //Startup the OCR Engine
        using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, false))
            ocrEngine.Startup(codecs, null, null, null);
            //Create the repository initialize the AutoFormsEngine and load each form
            IMasterFormsRepository repository = new DiskMasterFormsRepository(codecs, masterFormRepository);
            using (AutoFormsEngine engine = new AutoFormsEngine(repository, ocrEngine, null, AutoFormsRecognitionManager.Default | AutoFormsRecognitionManager.Ocr, 30, 80, false))
                //loop through all of the files in the directory of filled forms
                foreach (var file in Directory.EnumerateFiles(filledFormDirectory))
                    Console.WriteLine("Processing file " + Path.GetFileName(file));
                    using (RasterImage image = codecs.Load(file))
                        //Run the recognition
                        AutoFormsRunResult runResult = engine.Run(image, null, null, null);
                        Console.WriteLine("Form Processed using " + runResult.RecognitionResult.MasterForm.Name);
                        //Process the results - this will just display all OMR fields found and output True or False to the console
                        if (runResult != null)
                            foreach (FormPage formPage in runResult.FormFields)
                                foreach (FormField field in formPage)
                                    if ((field as OmrFormField) != null)
                                        Console.WriteLine(field.Name + ": " + ((field as OmrFormField).Result as OmrFormFieldResult).Text);
        Console.WriteLine("Done processing");
    For more details, check out the project on the LEADTOOLS forum here:

    Thursday, March 8, 2018 4:12 PM