Java OCR API
Add image based Optical Character Recognition feature within any Java-based application.Download Free Trial
Aspose.OCR for Java
Aspose.OCR for Java is a stand-alone and extensible OCR API for Java applications. API performs optical character recognition for all commonly used image formats. It provides a simple set of classes for controlling character recognition. After API integration, developers can easily achieve reading characters in multiple fonts and languages from images, scanning rotated images, whole images or part of images, applying different noise removal filters before image recognition and much more.
At A Glance
An overview of the capabilities of Aspose.OCR for Java.
- Times New Roman
- Courier New
Aspose.OCR for Java supports the JDK 1.6 and above.
- JSP/JSF Application
- Desktop Application
Supported File Formats
Aspose.OCR for Java supports most popular raster image file formats.
Java OCR API Features
Read characters from images
Support for common image file formats
Support for global languages
Read the text in popular fonts
Support for common font styles
Scan the whole image or any part of it
Scan rotated images
Apply noise removal filters
Specify multiple white lists
Perform OCR on Images
Using Aspose.OCR for Java, developers can extract text, location of the text from specific parts of an image, fonts and styles as well as perform the OCR operation on document scans that follow the similar structure. Adding OCR functionality within Java applications is simple, with just few lines of code.
Perform OCR on image - Java
// create an instance of OcrEngine OcrEngine engine = new OcrEngine(); // set image file engine.setImage(ImageStream.fromFile(dir + "template.jpg")); // process the image engine.process(); // get results System.out.println(engine.getText());
Recognize Text in Popular Fonts & Languages
Aspose.OCR for Java API supports Arial, Times New Roman, Courier New, Verdana, Tahoma and Calibri fonts in regular, bold and italic text styles as well as multiple languages such as English, French, Spanish, and Portuguese
Easy to Use Image Correction Filters
Noise reduction is a typical pre-processing step to improve the OCR results. Using Aspose.OCR, you can apply Blur, Gaussian Blur & Median correction filters on the document image in order improve the recognition accuracy.
Apply correction filters - Java
// initialize OcrEngine OcrEngine engine = new OcrEngine(); // set image engine.setImage(ImageStream.fromFile(dir + "template.jpg")); // create collection of filters CorrectionFilters filters = new CorrectionFilters(); // create & add a few filters to the collection filters.add(new MedianFilter(6)); filters.add(new GaussBlurFilter()); // assign collection to OcrEngine engine.getConfig().setCorrectionFilters(filters); // do processing