Java OCR API

Add Optical Character Recognition functionality for English, French, Spanish and Portugese languages to any Java-based OCR application.

  Download Free Trial  Try Online
Aspose.OCR for Java

Aspose.OCR for Java

 
 

Aspose.OCR for Java is a stand-alone OCR API for Java applications while allowing the developers to perform optical character recognition on commonly used image types. It provides a simple set of classes to control character recognition for various languages including English, French, Spanish and Portuguese. Developers can easily read characters in multiple fonts, rotated images, whole images or parts of images with the ability to apply different noise removal filters before text recognition.

 

Image to Text Java API Features

 

 

Read characters or text from images

 

Support for common image formats

 

Support of different languages

 

Read the text in multiple fonts

 

Support for common font styles

 

Scan any part of an image or as a whole

 

Scan rotated images

 

Add noise removal filters

 

Define various white lists

Extract Text from Scanned Document Images

Using the library, developers can extract text, text location from image specific parts, fonts, and styles as well as perform the character recognition operation on document scans having a similar structure. Recognizing text from images is simple, with just a few lines of code.

Perform OCR on image - Java

// create an instance 
OcrEngine engine = new OcrEngine();
// set image file
engine.setImage(ImageStream.fromFile(dir + "template.jpg"));
// process the image
engine.process();
// Image to Text results 
System.out.println(engine.getText());

Recognize Text in Different Fonts and Languages

Aspose.OCR for Java API supports Times New Roman, Arial,  Verdana, Courier New,  Tahoma and Calibri fonts in regular, italic and bold text styles as well as different  languages like English, Spanish, French, and Portuguese

Easy to Use Image Correction Filters

Noise reduction is a typical pre-processing step to improve the results. Using the OCR library, you can apply Blur, Gaussian Blur & Median correction filters on the document image in order to improve the recognition accuracy.

Apply correction filters - Java

// initialize
OcrEngine engine = new OcrEngine();
// set image
engine.setImage(ImageStream.fromFile(dir + "template.jpg"));
// create filters collection
CorrectionFilters filters = new CorrectionFilters();
// create and add different filters to the collection
filters.add(new MedianFilter(6));
filters.add(new GaussBlurFilter());
// assign collection
engine.getConfig().setCorrectionFilters(filters);
// do processing
 

Support and Learning Resources

 

Aspose.OCR offers individual OCR APIs for other popular development environments as listed below: