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 https://api.aspose.cloud/v5.0/ocr/deskewimage
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.
getconf ARG_MAX
command to check the maximum length of the command arguments (in bytes).
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.