We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Reading checkbox results from a form

I have a form with some checkbox inside filled with an X.



I want use OCR_OMR_Aspose .net dll.



How i can read the results contained in these checkbox??

Hi Emil,
Thank you for your inquiry.

Please try to set the Threshold value for the elements where area is less filled. For details on setting threshold value visit the online documentation link Setting Mark Threshold. Furthermore sample OMR template and sample code is attached for your reference.

CODE:

//Load template file
OmrTemplate template = OmrTemplate.Load(@"test_OMR_threshold.amr");
//Load the image to be analyzed
OmrImage image = OmrImage.Load(@"form_checkbox.jpg");
// Instantiate the recognition engine for the template
OmrEngine engine = new OmrEngine(template);
engine.Configuration.FillThreshold = 0.1;
// Extract data. This template has only one page.
OmrProcessingResult result = engine.ExtractData(new OmrImage[] { image });
//Load actual result from
Hashtable OmrResult = result.PageData[0];
//Get Collection of Keys
ICollection key = OmrResult.Keys;
foreach (string k in key)
{
Console.WriteLine(k + ": " + OmrResult[k]);
}