Working with the Skew Angle of the Image

Calculate Skew Angle of the Image

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

Set Custom Angle for Skew Correction

Aspose.OCR for C++ provides to option to specify custom angle for skew correction. For this, the API provides the RecognitionSettings.skew property. You can pass the instance of the RecognitionSettings class to the page_settings method of the OCR class.

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