Patent ID: 9286541
Filing Date: 2016-03-15
CPC Classification: G06K

Claim Text:
1. A computer-implemented method for removing an underline from a text item before performing optical character recognition on the text item, comprising: acquiring an image that comprises the text item including an underline; identifying the text item in the acquired image; scanning a plurality of vertical columns across a bottom of the text item to determine one or more bottom edges; determining a fit line for the one or more bottom edges; identifying contiguous pixels extending from the fit line; vertically scanning the contiguous pixels in a first stripe to determine a first bottom pixel, a first top pixel, and a first number of transitions along the first stripe, the first number of transitions being a first number of light-to-dark transitions, or a first number of dark-to-light transitions; vertically scanning the contiguous pixels in a second stripe to determine a second bottom pixel, a second top pixel, and a second number of transitions along the second stripe, the second number of transitions being a second number of light-to-dark transitions, or a second number of dark-to-light transitions; determining that the first number of transitions in the first stripe is equal to one; determining that the second number of transitions in the second stripe is greater than one and less than or equal to a first threshold; deleting pixels in the image corresponding to the first stripe from the first top pixel to the first bottom pixel; deleting pixels in the image corresponding to the second stripe that are proximate to the fit line; and performing optical character recognition on the image after the pixels are deleted to recognize the text item.