Working with the Skew Angle of the Image

Calculate Skew Angle of the Image

Aspose.OCR provides the CalcSkewImage method that calculates the skew angle of the image. The CalcSkewImage method takes the image path as a parameter and returns the skew angle. The following code snippet demonstrates the use of the CalcSkewImage method to calculate the skew angle of an image.

Set Custom Angle for Skew Correction

Aspose.OCR for Java provides to option to specify custom angle for skew correction. For this, the API provides the RecognitionSettings.setSkew method. You can pass the instance of the RecognitionSettings class to the RecognizePage method of the AsposeOCR class.

The following code snippet demonstrates the use of the RecognitionSettings.setSkew property to set custom skew correction angle.