Patent Document ID: 4668995
Application ID: 06722955
Patent Status: 1

Claim One:
1. A method for converting a scanned multi-bit image of pixels into a binary image of pels suitable for compression and printout on a printer having the capability to print a set of n.sup.2 +1 output pel patterns producing a respective set of discrete gray values, comprising the steps of: dividing the pixels of said scanned image into rows of non-overlapping blocks of n x n pixels; choosing a threshold value W, above which a pixel intensity value is considered to be white and a threshold value B, below which a pixel intensity value is considered to be black; determining the intensity values of the four corner pixels of each block; classifying a block as TEXT, if any of said four corner pixels has an intensity value equal to or greater than W or if the two lower corner pixels both have an intensity value less than or equal to B, otherwise classifying a block as IMAGE; then, eliminating short runs of adjacent TEXT blocks in a row by reclassifying them to IMAGE blocks if the number of such adjacent TEXT blocks is below a selected minimum number MI, and there is at least one IMAGE block in the preceding row immediately above at least one of the TEXT blocks in the run; then, eliminating short runs of adjacent IMAGE blocks in a row by reclassifying them to TEXT blocks if the number of such adjacent IMAGE blocks is below the selected minimum number MIN; selecting a threshold value T and comparing the values of the pixels of the blocks classified as TEXT thereto; setting the corresponding output pel for each pixel of a TEXT block having a value less than said threshold value T to 1, otherwise setting said output pel to 0; determining the average gray value of each block classified as IMAGE by summing the intensity values of the n.sup.2 pixels therein and dividing the sum by n.sup.2 ; comparing the average gray value of a first IMAGE block with the set of n.sup.2 +1 discrete gray values of said printer and selecting the discrete gray value closest to its average gray value for said first IMAGE block, the error being the difference between its average gray value and the selected discrete gray value; distributing said error to the adjacent IMAGE blocks to the right and below said first IMAGE block; continuing the error distribution by: determining a modified average gray value for subsequent blocks classified as IMAGE by adding to their average gray value one half the sum of the errors distributed to them from IMAGE blocks adjacent to the left and above; comparing the modified average gray values of the subsequent IMAGE blocks with the set of n.sup.2 +1 discrete gray values of said output pel patterns and selecting the respective discrete gray values closest to their modified average gray values, the errors being the difference between their modified average gray values and the selected discrete gray values; choosing output pel patterns for said subsequent IMAGE blocks corresponding to their selected discrete gray values; and merging the output pels of said TEXT blocks with the output pel patterns of said IMAGE blocks.