Finance::MICR::GOCR - interface to using gocr for reading MICR line of a check image
Ad hock module to inbetween with gocr Most of the work offered in this module is about coaxing gocr to read an image and detect a MICR line.
The output of this module itself is not genuinely useful without using
Finance::MICR::GOCR::Check
my $gocr = new Finance::MICR::GOCR({ abs_path => '/tmp/xmicr/micr/micr_image.pbm', }); print $gocr->out;
my $gocr = new Finance::MICR::GOCR({ abs_path => '/tmp/xmicr/micr/micr_image.pbm', abs_gocr_bin => '/usr/local/bin/gocr', abs_path_gocrdb => '/usr/share/micrdb/', s => 80, d => 20, cleanup_string => 0, });
Parameters to constructor Test the default values before experimenting.
Required. This is the absolute path to the image that is the check. The image pbm file with micr code in it. The present filetypes for gocr are PNM, PGM, PBM, PPM, or PCX - depending on the version of gocr you have.
Optional. If provided, this is absolut path to the gocr binary if left out, we try to find with File::Which, if not found, dies.
Defaults to '/usr/share/micrdb/' absolute path to the directory holding your micr database via the command line, the path must be set ending in backslash, the backslash can be used here or not
Optional. spacing, gocr space between characters. default value is 80. suggested is no more then 120. If your resolution is high, you would want this higher.
Optional. gocr dust size, default is 20 things smaller then this are ignored
Optional. boolean, default is 1. more regexes to cleanup gocr garble.
Returns MICR line from gocr. This is not a verified MICR line. The out is cleaned up unless you set cleanup_string to 0 via constructor. returns undef if cannot get raw string.
returns absolute path to file being used if it is not on disk, croaks. If the file is not PNM, PGM, PBM, PPM, or PCX, croaks.
returns absolute path to the database we are using for gocrdb set via constructor defaults to : /usr/share/micrdb/
returns abs path to gocr binary being used
returns gocr -s space between characters. default value is 80 if you provide a value, will set to that
returns dust size if you provide a value, will set to that default is 20
returns true or false this is set via constructor argument if argument provided, will set
returns raw gocr output of the image file being used. this is with the parameters we've set, s, d, etc. Not entrirely raw.
The debug flag is
$Finance::MICR::GOCR::DEBUG = 1;
This is also an lvalue sub.
Finance::MICR::LineParser
gocr manual
Leo Charre leocharre at cpan dot org
2 POD Errors
The following errors were encountered while parsing the POD:
Unknown directive: =over4
'=item' outside of any '=over'
To install Finance::MICR::GOCR::Check, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Finance::MICR::GOCR::Check
CPAN shell
perl -MCPAN -e shell install Finance::MICR::GOCR::Check
For more information on module installation, please visit the detailed CPAN module installation guide.