OCR Recognition of business cards returns bunch of weird text with any image

  • Last Post 28 November 2016
  • Topic Is Solved
tadija posted this 17 November 2016


I'm trying to make ABBYY OCR SDK for iOS to work but with no luck and I don't know what I'm doing wrong.

I downloaded your latest SDK, runned sample project on iPad device and recognition of business card was working ok there.

When I added library to my own project (with all the same settings), it was behaving very strange (managed to build & run with no errors, but result of recognition is just a bunch of garbage with any image I tried).

Then I thought that something was wrong with my project, so I created a new clean project from scratch, added all ABBYY files and settings there and I got the same results (for which I'm sending screenshot).

Please give me some clue what seems to be wrong when getting results like this.

P.S. I'm using OSX El Capitan (10.11.6) with the latest Xcode 8.1 and default "Single View Application" project template.

alt text

alt text

Order By: Standard | Newest | Votes
Oksana Serdyuk posted this 18 November 2016

For correct work of the application you need to add the resources of ABBYY Mobile OCR Engine into the resources of your application. So in case of our standard sample you need to copy files for corresponding language from the Patterns, Dictionaries and BcrData folders (the data subfolder of the distributive) to the Patterns, Dictionaries and Keywords folders of the sample, accordingly. The contents of the BcrData folder corresponds to the contents of the Keywords folder.

Especially for business card recognition (BCR) the keywords dictionaries are necessary. These dictionaries contain words that appear most often on business cards, for example, "Phone", "Address", and they are stored in the .akw files located in the data\BcrData folder.

Also please make sure that you set correct recognition languages in the recognitionLanguages property of the CMocrRecognitionConfiguration object.

For more information also please refer to the Help→Guided Tour→How to Use the iOS Wrapper and How to Build the Sample for iPhone in XCode.

  • Liked by
  • tadija
tadija posted this 28 November 2016

Hi Oksana, thanks for your answer, but I have already did these steps you're telling me - all ABBYY resources (keywords, dictionaries, patterns) are copied to bundle resources. I'm using only English as language and europian.rom (same as in sample project). Even though, I get behaviour which I reported and I don't have idea why is that. I've created sample project which is reproducing this problem (builds only on device), could you please look at it and tell me do you see anything wrong, or missing? Here's the link to public repo: https://bitbucket.org/appculture/abbyytest

Oksana Serdyuk posted this 08 December 2016

I am extremely sorry for the long silence. Currently the developer, who could look at your code, is on vacation, but we have noticed the following strange thing. It seems that you recognize the images which are rotated upside down (please see the screenshots):

alt text

alt text

So, could you please carefully check you code if the images are not edited/rotated before processing in Mobile OCR Engine?

Attached Files

  • Liked by
  • tadija
tadija posted this 08 December 2016

Hi Oksana, thanks for your answer, we already solved it but I forgot to write solution here.

You're right, it was all about wrong image orientation. So in the end we realised that and it works good now, but you should maybe add that hint somewhere in the docs.

P.S. I also made a Swift wrapper around your SDK with proper structs for Business Card model, so one note from dev side: I feel something like that should be included "out of the box" with payed SDK.