A gray scale image cleaning algorithm for improved check code line OCR. An
image processing system for processing a gray scale image is provided
that includes: a system for generating a first thresholded black white
image from the gray scale image; a system for generating a second
thresholded black white image from the gray scale image, wherein the
second thresholded black white image is generated with a higher threshold
value than the first thresholded black white image; and a system for
logically combining the first and second thresholded black white images
to generate a composite image.