xml, get coordinates of corrected image

hi, i've been testing around with rotated images. the ocr and everything works fine, but there will be some image correction that's applied before, right (i.e. "undoing" the rotation). the coordinates in the xml output though are not the corrected ones but the original ones of the rotated image. is it possible to get the corrected coordinates instead? i need to calculate if words are aligned vertically, so this would be quite important for that. thanks

Was this article helpful?

0 out of 0 found this helpful

Comments

13 comments

  • Avatar
    Oksana Serdyuk

    Hi, we are consulting with our developers concerning your question.

    0
  • Avatar
    Oksana Serdyuk

    Now there is no way to get coordinates of a deskewed image directly in ABBYY Cloud OCR SDK. You can do it only for two processing iterations: one needs to get the deskewed image and then you should send this deskewed image for re-recognition.

    0
  • Avatar
    kofoapp

    ok thank you! how exactly can i get the deskewed image?

    0
  • Avatar
    Oksana Serdyuk

    There is no API to save image after deskewing and rotation in Cloud OCR SDK. But you can export result to the pdfSearchable format and then use this PDF for re-recognition or at first convert this pdfSearchable file to an image by your application and then process it again.

    0
  • Avatar
    kofoapp

    cool, thanks very much! i'd have to pay for two processes then though, right? or is there a way to do it with just one document credit?

    0
  • Avatar
    Oksana Serdyuk

    Unfortunately, now there is no way to do it with one document credit.

    However we are consulting with our developers and analyst about this issue. Could you please specify if you need to get the coordinates of the image after all preprocessing steps or it is enough to get the coordinates of the deskewed image?

    0
  • Avatar
    kofoapp

    best would be to get them after all preprocessing steps, thank you!

    0
  • Avatar
    kofoapp

    hi oksana, are there any news about this issue? there's one other thing i have noticed with the workaround solution (reprocessing the searchable pdf): in many cases i get worse results when sending the pdf than with the original image, even if the correct text recognition from the first round is stored with the pdf (e.g. additional spaces)

    0
  • Avatar
    Oksana Serdyuk

    Thank you for this information. We are still working on this issue and I will give you our concrete answer next week. Sorry for inconvenience!

    0
  • Avatar
    Oksana Serdyuk

    We are extremely sorry for a long silence. After a long consultation it was decided to add the separate xml export format with the coordinates for the corrected image - xmlForCorrectedImage. This feature is going to be implemented in the nearest future. I will inform you about it.

    0
  • Avatar
    kofoapp

    great, thanks a lot!

    0
  • Avatar
    Oksana Serdyuk

    I’m glad to inform you that we have implemented a new export format for the processImage method, namely xmlForCorrectedImage. Now to get the coordinates of the corrected image it is enough to set exportFormat= xmlForCorrectedImage. The corresponding documentation will be updated soon.

    0
  • Avatar
    kofoapp

    perfect, tested it and works great! thanks very much

    0

Please sign in to leave a comment.