Community

Getting Cloud SDK getting orientation

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.

Thanks

Was this article helpful?

0 out of 0 found this helpful

Comments

9 comments

  • Avatar
    Oksana Serdyuk

    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.

    0
  • Avatar
    Oksana Serdyuk

    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.

    0
  • Avatar
    Oksana Serdyuk

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

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

    0
  • Avatar
    Oksana Serdyuk

    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.

    0
  • Avatar
    jackZap

    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.

    0
  • Avatar
    jackZap

    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.

    Thanks.

    0
  • Avatar
    Oksana Serdyuk

    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.

    0
  • Avatar
    jackZap

    Thank you. Looking forward to the update.

    0
  • Avatar
    Oksana Serdyuk

    @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: http://forum.ocrsdk.com/questions/5526/getting-image-orientaiton-in-bcr

    0

Please sign in to leave a comment.