Card number is not recognized using tesseract-ocr

2,178 views
Skip to first unread message

Anil Kumar

unread,
Aug 5, 2013, 6:38:48 AM8/5/13
to tesser...@googlegroups.com

Hi,

 I am new to OCR and making an app for credit card number detecting using sample code of android-ocr(tesseract-ocr). I have trained the data as per the credit card font. It is detecting few card if the card having unique background(Attached Amexp.jpg for your reference, it is 60% approximately detecting) but if the card having multi background (bark.jpg) then the number is not recognizing. Even if the card number little(citi.jpg, attached 1st “5” number not recognized) overlapping the background then also not recognition.

In the data preparation time I am trying to give repeated number for training due to different shape of the number(citi.jpg, 5 number having different)  but the repeated number is not taking.

I am trying to remove the background of the card but I am not getting any suitable code.

Even I have used some threshold (sobelEdgeThreshold, fisherAdaptiveThreshold, otsuAdaptiveThreshold) but all having same problem.

 

So please suggest me how can I overcome all the above issue using the same sample code or is there any alternative sample. I am not figuring out what is issue from my side.  I have attached few sample & Train data for your reference.

 

Thanks & regards

Anil

Amexp.jpg
bark.jpg
citi.jpg
citibank.jpg
eng.traineddata
Source.jpg
Train_Data.png

Choi

unread,
Aug 6, 2013, 4:09:33 AM8/6/13
to tesser...@googlegroups.com
It seems normal. 
I think you have to add some image process. 
It seems very difficult problem because card numbers don't looks distinguished.
good luck!

Anil Kumar

unread,
Aug 12, 2013, 6:59:06 AM8/12/13
to tesser...@googlegroups.com
Hi Choi,

Thanks for your reply.
I tried different image processing concept, few cards are recognizing but not 100%. Due to complex background color, it is very difficult to recognizing the card number. I am thinking how we can remove the complex card back ground. if you have any  idea or sample please share me.

Thanks & regards

Anil

Chetan Kamath

unread,
Oct 4, 2017, 7:04:21 AM10/4/17
to tesseract-ocr
Hi Anil,

  Could you please share your work on the credit card scanning if you dont mind.

Thanks a Lot.
Chetan

David Sixela

unread,
Oct 4, 2017, 11:40:47 AM10/4/17
to tesseract-ocr
Hi Anil, 
Here is a good tutorial on how to proceed. Hope this can help, even if it's not an android code, you can still use the same steps to get the informations you need.
https://www.pyimagesearch.com/2017/07/17/credit-card-ocr-with-opencv-and-python/
Reply all
Reply to author
Forward
0 new messages