Clever combine of multi-stepped process.
Posted: 2007-01-04T08:57:25-07:00
Greetings Magick gurus!
I've been experimenting with some image enhancement to allow my OCR software to read barcodes better.
I first receive a "poor" scan of a dotmatrix report. This report has a barcode in the corner. My first step was to crop out this barcode from the main image.
Now I enhanced the image by "multiplying" it over itself, making it bolder by shifting a pixel or two vertically.
Lastly, I 'defuzz' the edges/remove specks with a median.
I'd like to combine this 3 phase system into a single script with one in file, and one out file, and skip the 2 intermdiate steps, and hen feed that image to my decoding software. My experiments in combining them aren't working yet. Can anyone shed a light on quick way to merge these? Perhaps a way to store the image internally while processing using file: ?
Thanks in advance for your tips & advice!
Wand-config --version = 6.2.9, RHEL4 2.6.9-42.0.2.ELsmp
I've been experimenting with some image enhancement to allow my OCR software to read barcodes better.
I first receive a "poor" scan of a dotmatrix report. This report has a barcode in the corner. My first step was to crop out this barcode from the main image.
Code: Select all
convert document.tif -crop 975x275+0+0 bcode.pnm
Code: Select all
/composite -compose multiply -geomtry -0-1 bcode.pnm bcode.pnm boldcode.pnm
Code: Select all
convert -median 1 boldcode.pnm
Thanks in advance for your tips & advice!
Wand-config --version = 6.2.9, RHEL4 2.6.9-42.0.2.ELsmp