xml, get coordinates of corrected image

  • 3.7K Views
  • Last Post 29 October 2014
kofoapp posted this 15 September 2014

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

Order By: Standard | Newest | Votes
Oksana Serdyuk posted this 17 September 2014

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

Oksana Serdyuk posted this 20 September 2014

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.

kofoapp posted this 22 September 2014

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

Oksana Serdyuk posted this 23 September 2014

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.

kofoapp posted this 23 September 2014

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?

Oksana Serdyuk posted this 24 September 2014

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?

kofoapp posted this 06 October 2014

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

kofoapp posted this 16 October 2014

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)

Oksana Serdyuk posted this 17 October 2014

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!

Oksana Serdyuk posted this 29 October 2014

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.

kofoapp posted this 29 October 2014

great, thanks a lot!

Oksana Serdyuk posted this 10 November 2014

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.

kofoapp posted this 16 November 2014

perfect, tested it and works great! thanks very much

Close