Patent ID: 9275030
Filing Date: 2016-03-01
CPC Classification: G06F,G06K,G06T

Claim Text:
1. A method for removing horizontal lines from a binary document image, comprising: (a) obtaining a stroke width associated with each pixel of the binary image, wherein the stroke width associated with a given pixel is defined as a smaller one of horizontal and vertical runlengths of consecutive foreground pixels that include the pixel; (b) obtaining a bounding box representing a detected horizontal line; (c) computing a maximum stroke width at each horizontal position of the horizontal line, wherein the maximum stroke width at a given horizontal position is defined as a maximum value of the stroke widths associated with all foreground pixels belonging to the horizontal line located at that horizontal position; (d) for each column of foreground pixels located at a horizontal position along the bounding box, removing them if the maximum stroke width at that horizontal position is less than a median value of maximum stroke widths at all horizontal positions within a window of the bounding box centered at that horizontal position; (e) extracting all connected components in the bounding box that remain after step (d), and removing any connected components that extend neither above a top boundary nor below a bottom boundary of the bounding box by predetermined amounts; and (f) performing a closing operation on the binary image resulting from step (e) using a horizontal line as a structuring element.