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 language characters. Developers can easily read characters in multiple fonts, rotated images, whole images or parts of images. Furthermore, API has the capability to perform OCR through GPU instead of the core processor.
An overview of the capabilities of API.
Aspose.OCR for Java supports the JDK 1.6 and above.
API supports most popular raster image file formats.
Read different characters from images
Support for common image formats
Scan any part of an image or as a whole
Scan rotated images
Read the text in multiple fonts
Support for common font styles
Get skew angle of images
Using the library, developers can extract text from image specific parts by specifying rectangles, fonts, and styles. Recognizing text in pixels from images specific areas is simple, with just a few lines of code.
//Create API instance AsposeOCR api = new AsposeOCR(); //Prepare rectangles with texts. ArrayList rectArray = new ArrayList(); rectArray.add(new Rectangle(138, 352, 2033, 537)); rectArray.add(new Rectangle(147, 890, 2033, 1157)); String result = api.RecognizePage("srcImage.png", rectArray); System.out.println("Result with rect: " + result);
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 language characters.
Using the Java OCR library, calculating the image skew angle is fast and simple. Developers can use CalcSkewImage function by providing image path that returns the skew angle.
//Create api instance AsposeOCR api = new AsposeOCR(); // Get skew double angle = api.CalcSkewImage("sourceImage.png"); System.out.println("Skew text is:" + angle + " degrees.");