Sending image for deskew

Using the recognition setting

The makeSkewCorrect recognition setting is available for all image recognition methods. To automatically correct the image tilt during the recognition, simply set this option to true.

While this greatly simplifies the code, you have no control over the intermediate results or the order in which the preprocessing filters are applied to the image.

Using the dedicated endpoint

Posting an image to the Aspose.OCR Cloud endpoint allows you to fetch a rotated image that can be handled by other processing filters or recognized. To authorize the request, pass the access token in Authorization header (Bearer authentication).

The image is provided in a value of image property as a Base64 encoded string.

Return value

If successful, the endpoint returns a string with a unique identifier (GUID) of the deskew request in the queue.

Otherwise, it returns a HTTP status code corresponding to the error.

What’s next

Deskew will take a few seconds, depending on the image size and the current Aspose.Cloud load. See the article Fetching rotated image for information on how to get back the rotated image.

cURL example