Method for background removal in binary document image by estimating linearity of image components
AssigneeKonica Minolta Laboratory U.S.A., Inc.
InventorShugo Ishizaka
Life of this patent
Estimating the term…
Abstract
A method of processing a binary document image to remove non-text elements including long straight lines. The method uses a least squares method to fit the pixels of an image component to a line, and then use the coefficient of determination as a measure of linearity of the image component. For each image component, the line fitting and the coefficient of determination are performed twice, once on the original pixel coordinates and once after the image component is rotated 45 degrees. The higher one of the two calculated coefficients of determination is used to determine whether the image component is a straight line. If it is, and if the line is longer than a certain length, it is removed from the document image as a non-text element.
Claims6
A method of processing a binary document image, comprising:
- (a) obtaining a plurality of image components from the document image, each image components comprising a set of black pixels, each black pixel having x and y coordinates;
- for each image component,
- (b) calculating a first straight line fit and a first coefficient of determination using the x and y coordinates of the set of black pixels;
- (c) rotating the image component by a predetermined angle to generate rotated x and y coordinates for each of the set of black pixels;
- (d) calculating a second straight line fit and a second coefficient of determination using the rotated x and y coordinates of the set of black pixels;
- (e) if a higher one of the first and second coefficients of determination calculated in steps (b) and (d) is higher than a first threshold value, estimating a length of the image component;
- and
- (f) if the length estimated in step (e) is longer than a second threshold value, removing the image component from the document image.
A computer program product comprising a computer usable non-transitory medium having a computer readable program code embedded therein for controlling a data processing apparatus, the computer readable program code configured to cause the data processing apparatus to execute a process for processing a binary document image, the process comprising:
- (a) obtaining a plurality of image components from the document image, each image components comprising a set of black pixels, each black pixel having x and y coordinates;
- for each image component,
- (b) calculating a first straight line fit and a first coefficient of determination using the x and y coordinates of the set of black pixels;
- (c) rotating the image component by a predetermined angle to generate rotated x and y coordinates for each of the set of black pixels;
- (d) calculating a second straight line fit and a second coefficient of determination using the rotated x and y coordinates of the set of black pixels;
- (e) if a higher one of the first and second coefficients of determination calculated in steps (b) and (d) is higher than a first threshold value, estimating a length of the image component;
- and
- (f) if the length estimated in step (e) is longer than a second threshold value, removing the image component from the document image.
Dependencies are inferred from the claim text.