Patent ID: 6950210

Claim:
A method for binarizing an image having N columns and M rows of pixels and a first column forming a first edge of the image, a last column forming a second edge of the image opposite the first edge, a first row of the image forming a third edge of the image and a last row of the image forming a fourth edge of the image opposite the third edge, said method producing an array of binarized pixels, said method comprising: (a) initializing, for each column of the image, a first variable representing a local column low pixel value and a second variable representing a local column high pixel value, and, for each row of the image, a third variable representing a local row low pixel value and a fourth variable representing a local row high pixel value; (b) iteratively repeating steps (c) through (f) for each column of the image, from the first column to the last column; (c) iteratively repeating steps (d) through (f) for each row of the image, from the first row to the last row; (d) determining a threshold value dependent upon said first variable and said second variable at the column of the location index, and upon said third variable and said fourth variable at the row of the location index, the location index being dependent upon the iterated column and the iterated row; (e) comparing a value representative of an image pixel at the location index with the determined threshold value; and (f) setting a binarization pixel for the location index to either a first value or a second value, dependent upon results of the comparison, and adjusting values of either the first variable and the third variable, or the second variable and the fourth variable dependent upon the results of the comparison.