Browse our Products
<dependency>
<groupId>com.aspose</groupId>
<artifactId>aspose-omr</artifactId>
<version>19.12</version>
</dependency>
compile(group: 'com.aspose', name: 'aspose-omr', version: '19.12')
<dependency org="com.aspose" name="aspose-omr" rev="19.12">
<artifact name="aspose-omr" ext="jar"/>
</dependency>
libraryDependencies += "com.aspose" % "aspose-omr" % "19.12"
Java API to Perform OMR
Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
Aspose.OMR for Java is a Java class library that provides API to recognize optical marks from OMR digitized sheet images. It can be used to recognize optical marks in a variety of image formats like BMP, JPG, TIF, TIFF, GIF. The API allows capturing human-marked data from document forms such as surveys, questionnaires, multiple-choice examination papers, and other tests. With this solution, it is possible to recognize scanned images and even photos with high accuracy. Recognition is based on a template markup which contains a graphical mapping of the elements to be recognized from the scanned images.
OMR API Features
- Recognition of scanned images and photos.
- Ability to process rotated and perspective (side viewed) images.
- Recognize data from tests, exams, questionnaires, surveys etc.
- High accuracy rate & ability to export the results in
CSV
andJSON
file format. - Create OMR templates from text markup.
Save OMR Results As
CSV, JSON
Read Images for OMR
JPEG, PNG, GIF, TIFF, BMP
Supported Environments
- Microsoft Windows: Windows Desktop & Server (x86, x64)
- macOS: Mac OS X
- Linux: Ubuntu, OpenSUSE, CentOS, and others
- Java Versions:
J2SE 7.0 (1.7)
,J2SE 8.0 (1.8)
or above
Get Started
Aspose.OMR Java APIs are hosted at the Aspose Repository. You can easily use Aspose.OMR for Java API directly in your Maven projects with simple configurations. For the detailed instructions please visit Installing Aspose.OMR for Java from Maven Repository documentation page.
Perform OMR operation on Images using Java
// For complete examples and data files, please go to https://github.com/aspose-omr/Aspose.OMR-for-Java
String TemplateName = "Sheet.omr";
String[] UserImages = new String[] { "Sheet1.jpg", "Sheet2.jpg" };
String[] UserImagesNoExt = new String[] { "Sheet1", "Sheet2" };
String sourceDirectory = Utils.getSourceDirectory();
String outputDirectory = Utils.combine(Utils.getOutputDirectory(), "Result");
String templatePath = Utils.combine(Utils.getSourceDirectory(), TemplateName);
// initialize engine and get template processor providing path to the .omr file
OmrEngine engine = new OmrEngine();
TemplateProcessor templateProcessor = engine.getTemplateProcessor(templatePath);
System.out.println("Template loaded.");
// images loop
for (int i = 0; i < UserImages.length; i++) {
// path to the image to be recognized
String imagePath = Utils.combine(sourceDirectory, UserImages[i]);
System.out.println("Processing image: " + imagePath);
// recognize image and receive result
RecognitionResult result = templateProcessor.recognizeImage(imagePath);
// export results as csv string
String csvResult = result.getCsv();
String json = result.getJson();
// save csv to the output folder
PrintWriter wr = new PrintWriter(new FileOutputStream(Utils.combine(outputDirectory, UserImagesNoExt[i] + ".csv")), true);
wr.println(csvResult);
}
Home | Product Page | Docs | Demos | API Reference | Examples | Blog | Search | Free Support | Temporary License
File | Classifier | Size |
---|---|---|
aspose-omr-19.12-javadoc.jar | javadoc | 127.16 KB |
aspose-omr-19.12.jar | 12.40 MB | |
aspose-omr-19.12.pom | 1.92 KB |