Simple OMR not returning results

I have the code exactly the way the specs say to, mainly copy and pasted the OMR engine. For some reason I cannot get a valid result back, even with the given examples. I really thought that it was the template causing the problem but I have tried to get it to run in 3 or 4 different ways too. I’m attaching some simple java classes (it will run with no result) and a template plus the OMR template creator I used to build the template.



The example through github has an image that does not have OMR objects on it when I switch it to the sample on the Aspose Website it does not work.



I’m using the JAVA evaluation version to create a POC for my organization which will most likely purchase the software if I can get it going.

Hi,

Thank you for your inquiry and sharing details.

We have investigated the issue mentioned by you. While investigation, it was found that the code you wrote to generate the template is incorrect. We have modified your code and used it with the sample image. We are able to get the correct answer. Updated code snippet is given below for your reference.

Furthermore you may use our OMR template editor application to create the OMR templates in speedy manner. It is a .Net application and can be found on the path \Bin\net3.5 under Aspose.OCR for .NET. We have attached a sample OMR template created using OMR template editor for your reference.

Hope the above information helps. Feel free to contact us in case of any query or comments.

CODE:
com.aspose.omr.OmrTemplate template = new com.aspose.omr.OmrTemplate();
com.aspose.omr.OmrPage page = template.getPages().getItem(0);
page.setWidth(280);
page.setHeight(250);
java.awt.geom.Point2D.Float choiceBoxPosition = new java.awt.geom.Point2D.Float(79, 37);//(20, 5); // 20 mm to the right, 5 mm from
// the top
java.awt.Dimension choiceBoxSize = new java.awt.Dimension(167, 9);
com.aspose.omr.elements.ChoiceBoxElement choiceBox
= new com.aspose.omr.elements.ChoiceBoxElement("Q1", choiceBoxPosition, choiceBoxSize);
com.aspose.omr.elements.OmrCell one = new com.aspose.omr.elements.OmrCell("A");
one.setSpaceAfter(24);
choiceBox.getCells().add(one);
com.aspose.omr.elements.OmrCell two = new com.aspose.omr.elements.OmrCell("B");
two.setSpaceBefore(5);
two.setSpaceAfter(18);
choiceBox.getCells().add(two);
com.aspose.omr.elements.OmrCell three = new com.aspose.omr.elements.OmrCell("C");
three.setSpaceBefore(12);
three.setSpaceAfter(12);
choiceBox.getCells().add(three);
com.aspose.omr.elements.OmrCell four = new com.aspose.omr.elements.OmrCell("D");
four.setSpaceBefore(19);
four.setSpaceAfter(5);
choiceBox.getCells().add(four);
com.aspose.omr.elements.OmrCell five = new com.aspose.omr.elements.OmrCell("E");
five.setSpaceBefore(24);
choiceBox.getCells().add(five);
page.getElements().add(choiceBox);
choiceBox.setHorizontal(true);
page.getElements().add(choiceBox);
template.save("tempMadeVerson.amr");