Getting Cloud SDK getting orientation

  • Last Post 24 March 2016
kmcclosk posted this 02 July 2015

I understand that this question has been asked prior, but the answer was dated.

I'd like to get the determined orientation when the call from processImage completes. My understanding is that this is not offered in Cloud SDK. Is there any plan to include this information in the future? It would be enormously helpful.


Order By: Standard | Newest | Votes
Oksana Serdyuk posted this 06 July 2015

Sorry for the delay in response.

ABBYY Cloud OCR SDK has no direct method for returning the determined image orientation. But it is possible to extract the necessary data by analyzing the text coordinates from the XML export on your side. There are two available XML export formats in Cloud OCR SDK:

  • xml – this format allows you to get text with its original image coordinates,
  • xmlForCorrectedImage - this format allows you to get text with coordinates related to the corrected image (deskewed, rotated, etc.), not the original.

You can simultaneously export the recognized data into two these formats. To do this, specify the necessary formats, separated by commas, in the exportFormat parameter of the processImage method, for example: "xml,xmlForCorrectedImage". Then compare the coordinates from these files in order to calculate the rotation angle.

Oksana Serdyuk posted this 30 October 2015

Not so long ago we updated the XML scheme and two new attributes were added to our xml export format: the rotation attribute for the page tag and the isTab attribute for the charParams tag.

The rotation attribute may be useful for your usage scenario. It stores the type of rotation applied to the original page image.

Oksana Serdyuk posted this 03 March 2016

No, the processBusinessCard output does not contain the rotation attribute.

Kindly describe your usage scenario in details? Why you need this information?

Oksana Serdyuk posted this 03 March 2016

As a possible workaround, you can firstly call the processImage method and get the information about rotation from the XML output, and then re-process the image using the processBusinessCard method. You can re-recognize the same image for free while your account is not empty.

jackZap posted this 06 March 2016

Sometimes user scans business card with orientation 90 degrees rotated. We want to rotate the card image correctly for customer.

Your workaround will increase the process time, won't it? I guess calling processImage then processBusinessCard take double time of only one API.

jackZap posted this 08 March 2016

My company already bought your package "Volume Pack L". We really hope you can support to return orientation result in processBusinessCard API, thus improve our user experience a lot.


Oksana Serdyuk posted this 11 March 2016

I have consulted with our development team, and we are going to implement this feature for the XML export for BCR in the nearest future. As soon as the feature will be implemented and tested, I will let you know.

jackZap posted this 11 March 2016

Thank you. Looking forward to the update.

Oksana Serdyuk posted this 24 March 2016

@jackZap, recently ABBYY Cloud OCR SDK team has improved the BCR technology regarding your request. The imageRotation attribute for the businessCard element was added to the XML export format. More details are here: