Java OCR API for English, French, Spanish & Portuguese
Add image based Optical Character Recognition feature to any Java-based application.
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.
- At aGlance
- Supported FileFormats
API supports most popular raster image file formats.Input Only
Image to Text Java API Features
Read text or 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
Extract Text from Scanned Document Images
Using the library, developers can extract text, location of the text from specific parts of an image, fonts, and styles as well as perform the character recognition operation on document scans that follow 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 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 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 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 engine.getConfig().setCorrectionFilters(filters); // do processing