1
votes

I want to integrate OCR in an iOS application. I have found some helpful tutorials, specially This Article: How To: Compile and Use Tesseract (3.01) on iOS (SDK 5), helped me a lot. Now I can read plain text from any image which has a clear background. But I want to read information from an ID card which doesn't have clear background at all!

I have also found some answers regarding removing background in stackoverflow, for example: Prepare complex image for OCR, Remove Background Color or Texture Before OCR Processing and How to use OpenCV to remove non text areas from a business card?

But those solutions are not for iOS. I understand the steps, but I need an iOS example and if it is using Core Image, than it would be better for me.

I have no problem in OCR end, but my problem is to remove the background.

Initial Image:

Need to remove the background

After removing, the image should look like this:

after removing the background

Can you refer me an iOS example? or Is it possible to refer me an iOS example to remove all the color without Black color?

1
To clarify, so you have the algorithm down that you want to use, but are looking for an implementation on iOS? If this is the case, I suggest spending time learning objective C. It's possible that no one has done before exactly what you want to do on iOS. - Noremac
yes, I do believe that also. And I am trying to implement this. After completing my task, I will share it. - sumon
You can install OpenCV on iOS so any background removal example in OpenCV can be done on iOS (see Installation in iOS, OpenCV iOS tutorials and iPhone and OpenCV). - rold2007
do you have any reference of background removal example in OpenCV? - sumon

1 Answers

0
votes

the best way to detect a card in sence is traing a cascade classifier. Training is not a very small project. the count of the sample images should be more thank 10K. Once you get the trained cascade classifier, you can detect the the card quickly. The detection is very quick on iOS, but the tesseract recognition is not very fast,