Aspose.OCR for Java 21.6 - Release Notes

All Features

Key Summary Category
OCRJAVA-130 Add method CalcSkewImage(uri) Enhancement
OCRJAVA-131 Import new models (DSR, Chinese OCR) Enhancement


The next opportunities:

  • new ML model with improved regions recognition
  • added Chinese language support
  • added new Api method CalculateSkewFromUri(uri)

Public API and Backwards Incompatible Changes


  • added method: double CalcSkewImageFromUri(String uri)

Removed APIs

Will be deprecated

  • none

Usage Example

import static java.lang.System.out;

import java.awt.Rectangle;

import com.aspose.ocr.AsposeOCR;
import com.aspose.ocr.License;
import com.aspose.ocr.RecognitionResult;
import com.aspose.ocr.RecognitionSettings;
import com.aspose.ocr.SaveFormat.Format;

////  for gpu version

// import com.aspose.ocr.gpu.AsposeOCR;
// import com.aspose.ocr.gpu.License;
// import com.aspose.ocr.gpu.RecognitionResult;
// import com.aspose.ocr.gpu.RecognitionSettings;

public class App {
       public static void main(String[] args) {

        // set license    

        boolean resLicense = License.isValid();
        out.println("License is :" + resLicense);

        // Create api instance
        AsposeOCR api = new AsposeOCR();

        String img= "D:/img.png";		
		// recognize Chinese text
        RecognitionSettings settings = new RecognitionSettings();	
		RecognitionResult result = api.RecognizePage(file, settings);
		// get skew from image
		double angle = api.CalculateSkewFromUri("");