11

I am trying to find the way to OCR the MICR codes from document. For that I used Tesseract library, Using this I got success in recognizing texts but when it comes to MICR it fails to recognize that.

Here is the sample MICR image which I want to read:

enter image description here

This is a MICR E-13B fonts (more info).

So is there any open source library to recognize MICR codes for Android? I found Leadtools SDK which provides this functionality but that is paid.

halfer
  • 19,824
  • 17
  • 99
  • 186
Juned
  • 6,290
  • 7
  • 45
  • 93

2 Answers2

8

You can use Tesseract with mcr.traineddata language data file.

nguyenq
  • 8,212
  • 1
  • 16
  • 16
  • Thanks for the link, I have `copied micr,traineddata` in appropriate directory but still its not reading MICR text.is there anything else to do get this working. – Juned Aug 14 '14 at 06:40
  • Did you specify the language parameter `-l mcr`? – nguyenq Aug 15 '14 at 01:10
  • in Linux system using command line it works for me too. do you have any idea about how to get this working with Android application ? – Juned Aug 18 '14 at 06:17
  • 1
    On Android, you need to install the language data file on the device and specify the path to its parent directory in init(), for example, `baseApi.init("/mnt/sdcard/tesseract", "mcr");` – rmtheis Aug 18 '14 at 14:03
  • @rmtheis I'll try this and let you know in case of any query. Thanks for the help BTW. – Juned Aug 18 '14 at 14:34
  • @rmtheis is that possible to initialize two languages in tesseract ? I tried with `baseApi.init("/mnt/sdcard/tesseract", "eng"); baseApi.init("/mnt/sdcard/tesseract", "mcr");` but its initializes only mcr not eng. – Juned Sep 10 '14 at 13:57
  • Yes--use `baseApi.init("/mnt/sdcard/tesseract", "eng+mcr");` – rmtheis Sep 10 '14 at 14:33
  • i used mcr.traineddata language data file but its not working. – Dayanand Waghmare Sep 29 '15 at 12:33
  • In my case, the language mcr works but recognition is not very good :( – BigPino Oct 25 '15 at 04:32
0

If you try to recognize stubs and cheques, you can give a look to MICR and OCR languages file from https://github.com/BigPino67/Tesseract-MICR-OCR

BigPino
  • 113
  • 1
  • 10