Page 1 of 1

Capturing old NCR forms

Posted: 2018-04-10T11:07:36-07:00
by OldGuyJeff
I have a job to scan some NCR (No Carbon Required) forms from the mid-70's for OCR. The dot-matrix blue type has faded, so I've scanned samples as color and set the options to render the type as a redish purple. This causes my paper background to be yellow.

I want to convert it to binary TIFF with the dark parts of my red text going to black, yellow converting to white and the black form stays at black.

I've been dabbling with "-type greyscale" and "-type bilevel", but I think I need to finesse the thresholds of the individual colors. I'm starting to work with "-gamma", but it's hit and miss for me at this time.

I'm testing this on CentOS Linux, using ImageMagick 6.7.8-9 and executing the conversion using a bash script

Re: Capturing old NCR forms

Posted: 2018-04-10T11:15:34-07:00
by fmw42
Please post an example image to some free hosting service such as dropbox.com and put the URL here so we can see what is actually happening and offer suggestions.

Re: Capturing old NCR forms

Posted: 2018-04-10T11:20:42-07:00
by snibgo
Some samples might help us understand the problem. "-level-colors" might be helpful. See http://www.imagemagick.org/script/comma ... vel-colors

In general, finding the process that gives maximum separation (to black and white) is a good idea. Eliminating any resulting grays may not be such as good idea, as it can reduce legibility. But it depends on the goals, of course.

Re: Capturing old NCR forms

Posted: 2018-04-11T08:20:15-07:00
by OldGuyJeff
Unfortunately, they are W2s/tax forms. By the time I take out the confidential company information and recipient information, I'm left with nothing.

I'll try to make a dummy version that I CAN post.
  • I'm going to try rescanning the sample files to see if I can create darker type at the scanner.
  • I've been dabbling with the files in GIMP, trying to see what options help. Dropping the saturation (removing color, but leaving contrasting objects) has promise, but I don't immediately see options like that in IM.
  • I'm also going to experiment with pulling out the red channel only, which is where my variable data is located. That is what I want to extract.

Re: Capturing old NCR forms

Posted: 2018-04-11T08:35:17-07:00
by fmw42
You can change saturation using -modulate B,S,H. See https://www.imagemagick.org/Usage/color ... color_mods. You can change brightness and contrast with -brightness-contrast. You can change contrast with -sigmoidal-contrast.

You can clean the background if not pure white using my script, textcleaner at my link below. Or you can use Imagemagick's -lat (possible with -negate on either side depending upon whether black text on white background).