Retrieve Multiple Values from OMR Form

Hi,


I have a OMR form, where I have to retrieve multiple values.


Ex. In template I have created a row with 4 columns. [ABCD], where C and D is marked, when processing with the scanned OMR form.

Is it possible to retrieve both C and D values, if yes please let me know how to get both the values.

Regards

Hi Naveen,


Thank you for using Aspose products.

We believe you are using ChoiceBoxes in your template. Please refer to the following piece of code to read all checked/selected ChoiceBoxes from a template image.

C#

//Load template file
OmrTemplate template = OmrTemplate.Load(MyDir + “ChoiceBoxes.amr”);

//Load the image to be analyzed
OmrImage image = OmrImage.Load(MyDir + “Choiceboxes-filled-scan.png”);

// Instantiate the recognition engine for the template
OmrEngine engine = new OmrEngine(template);

// Extract data. This template has only one page.
OmrProcessingResult result = engine.ExtractData(new OmrImage[] { image });

//Load actual result from
Hashtable OmrResult = result.PageData[0];

ICollection key = OmrResult.Keys;
foreach (string k in key)
{
Console.WriteLine(k + ": " + OmrResult[k]);
}
In case you face any difficulty, please post the template as well as the scanned image of the filled form for our review.

Hi,


I am using Grid for values.

PFA for template and a image. I need to retrieve all the marks.

Regards

Hi Naveen,

Thank you for providing the template in question.

In case the user may select multiple values, and you intend to include every selection in the results, we would suggest you to use the Choice Boxes. Please check the below linked article for your reference.
http://aspose.com/docs/display/ocrnet/Working+with+Elements

Hi,


Thank you for your suggestion, but Checkboxes will not work in my case because the minimum width and height of the checkbox is 5.

I want to retrieve each and every mark from the scanned image.

Is it possible to reduce the checkbox sizes?

Regards,
Naveen

Hi Naveen,


I am afraid, you cannot set the width & height of a Choice Box less than 5 using the Aspose.OCR’s Template Editor. However, if you open the template file (.amr) in any of the text editors such as Notepad, you may edit the corresponding values in the underlying XML. Please check the attached snapshot for your reference.

Hi,


Thank you very much it was very helpful, now I am able to get multiple results.

I am facing one more issue, where I am not able to get the values from below mentioned questions.

Please find the attached scanned image for below questions.

Questions No. 10,11,17 and 18.

I want to detect every single mark in the image. Please let me know if there is any settings to be set to detect those marks.

Regards

Hi Naveen,


Good to know that you are up and running again.

Regarding the recent inquiry, the mentioned questions are not getting recognized as valid selections because the marks are partially filled. In case you wish them to be detected, please lower the threshold to some lower value. Please read more about Setting the Threshold Value, and give the code a try on your end.