leocharre has asked for the wisdom of the Perl Monks concerning the following question:

We handle MICR checks in our office. Right now it's done by hand. The paper is stored forever in some dungeon somewhere.

I'm thinking scanning in and burning the hard copy.

Being a hard stompin open source minion- I looked for micr on cpan first. Looks like nothing.

I looked at sourceforge. There are some java tools there for doing things with already scanned checks- some drivers for scanners.

My two options are using proprietary software/hardware (any suggestions?) - or writing a system- it would work with any scanner, it would automatically chop the scan of maybe multiple checks per page to individual pdfs etc etc. And I'd have to piece together a very specific set of character matching tools.. just for this doc type. Any suggestions for where to look - Anyone working for finance that would perhaps also be intererested in doing this?

update

I am using gocr and I put together some scripts and a Finance::MICR::LineParser module, and a scratchy Finance::MICR::GOCR module.

I am using a canon machine, that's already available in most offices. These have adapters on top that let you feed papers in stacks and put it all to one file.

I route the check to my desktop with another tool we have, and then a script using imagemagick formats the scans to nice little files right way up.

Then another script isolates the MICR lines, and feeds them to gocr with a trained MICR library, and passes that to my Finance::MICR::LineParser module, which tells me if it can extract the MICR code, and gives me a minor rating of cleanliness etc. Then the master file image is renamed by check number , bank account, etc.. or xxx_xxx_xx etc to let the user know it cannot read the MICR line properly.

I was hitting 92.5% accuracy last night with about two hundred. Most of the ones not read properly were either turned by scanner mistake- or would not be read by a commercial MICR reading machine (i've read up on it).

This morning I ran a more real world test, was a little messy feeding them in on purpose, and ran about 989 checks. I am hitting 85%. None of the hits reported are wrong- that is.. no mistakes have been made (i read every single one) (ie, system reports that check is number 123 when it is in fact 124, that does not happen although it did at first ).

Not so bad for 27 or so hrs work. But MICR standards report the accepted fail ratio as 1/1000 - so I'm far from it.

Replies are listed 'Best First'.
Re: (OT) MICR check scanning
by friedo (Prior) on Oct 31, 2006 at 18:05 UTC

    If you're not opposed to a hardware solution, there are lots of MICR check scanners available. They typically have a USB or serial interface.

    It's been a long time, but I recall that they require proprietary software, though you might be able to automate it with Perl.

      To do what I am doing would cost (hardware + service) $2300+. I may still have to go that route. I just would really like to see something like this so people can use it without paying big bucks. *sigh*

Re: (OT) MICR check scanning
by Old_Gray_Bear (Bishop) on Oct 31, 2006 at 21:56 UTC
    If you are truly going the MICR route, then you are talking some fairly niche (and thus expensive) hardware. Go talk to the SysProgs at your local bank and ask them what a MICR-reader goes for these days; also ask them if it's a main-frame only device (I'll bet it is). You probably will have better luck with a good flat-bed scanner and some decent OCR software.

    One thing to consider, if you are looking to automate a check reconcilliation system, is that not all the checks you write will come back to you. More and more of my accounts are going over to electronic funds transfer. What appears on my bank statement is a reference to the check number I wrote, with no returned piece of paper (for example "DES:CHECK PYMT ID:3347") to close the audit trail. I suspect that I can get the paper check, it will just cost the Earth and half the Ocean to do it.

    Sigh. This Modern Age....

    ----
    I Go Back to Sleep, Now.

    OGB

      MICR readers have grown up and much like Mag Stripe readers are available as 'Keyboard Wedge'. Basically they read the check and send the data as a keyboard device. These are also available for under $250.


      grep
      One dead unjugged rabbit fish later

        Thing is those are one at a time. My co workers have about 1k per cubicle- plus i suspect 25k+ in archive that would be nice to get rid of.

        i don't know if the office can afford that kind of expense. For the heavy duty hardware.

      I think bank of america will let you view a photo of your check. (I wonder about doing something so someone can wget/rip those off their account online.)

      I'm doing this for an accounting offices. This one has thousands upon thousands that are being gone through by. .. hand- sometimes they *have* to- a lot of these have funny glitches that some normal MICR check readers would not do

Re: (OT) MICR check scanning
by zentara (Cardinal) on Oct 31, 2006 at 20:55 UTC
    I don't know anything about MICR, but recently gscan2pdf was released and it works, producing pdf scans. It's Perl/Gtk2, so you could probably manipulate the pdf's after scanning, with some pdf module.

    I'm not really a human, but I play one on earth. Cogito ergo sum a bum

      I've got something a million times better and faster. A lot of these scanners will turn a scan to a pdf first. I use that to scan as much as i want to one document to send somewhere. That way I dont have to name and save each scan.

      Then I am using pdftohtml to extract images. And imagemagick to do any transforms etc. The set of cli tools for imagemagick like convert are awesome.

      Check out what I do.. (this is bash)

      #!/bin/sh rm -rf ./tmp; # clean previous run # this assumes that the checks are scanned upright, bottom towards lef +t margin on pdf, one per page # this assumes you have scans in ./scans # in pdf format each may have multiple checks, one per page. mkdir ./tmp mkdir ./tmp/scans; # incoming pdf with multiple checks mkdir ./tmp/pngs; # documents for storage prepped # copy incoming to staging area cp ./scans/*pdf ./tmp/scans/; # rip images and resize , crop etc find ./tmp/scans/ -iname "*pdf" -exec pdftohtml -q -c -zoom 10 '{}' \; mv ./tmp/scans/*png ./tmp/pngs/; rm -rf ./tmp/scans # format the pngs for storing mogrify -rotate -90 -chop 0x450 ./tmp/pngs/*png; # Basically all this does is take the pdfs # and put images in tmp/pngs that are sized properly and right side up +. # STEP 2 # get images from pngs and turn into micr strip files # ready for gocr # copy to micr rm -rf ./tmp/micr; mkdir ./tmp/micr; cp ./tmp/pngs/*png ./tmp/micr/; mogrify -chop 0x660 ./tmp/micr/*png; # convert the isolated micr for gocr find ./tmp/micr/*png -exec convert '{}' '{}'.pbm \; rename png.pbm pbm ./tmp/micr/*pbm rm ./tmp/micr/*png

      Then I use perl and gocr to rename the files, sort, archive, whatever.. etc etc...