2

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?

Community
  • 1
  • 1
sumon
  • 742
  • 1
  • 11
  • 33
  • 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 Mar 21 '13 at 06:15
  • yes, I do believe that also. And I am trying to implement this. After completing my task, I will share it. – sumon Mar 21 '13 at 09:46
  • You can install OpenCV on iOS so any background removal example in OpenCV can be done on iOS (see [Installation in iOS](http://docs.opencv.org/doc/tutorials/introduction/ios_install/ios_install.html), [OpenCV iOS tutorials](http://docs.opencv.org/doc/tutorials/ios/table_of_content_ios/table_of_content_ios.html) and [iPhone and OpenCV](http://stackoverflow.com/questions/348040/iphone-and-opencv)). – rold2007 Mar 21 '13 at 17:33
  • do you have any reference of background removal example in OpenCV? – sumon Mar 22 '13 at 09:08

1 Answers1

0

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,

user1203650
  • 300
  • 2
  • 3