# US 2021/0334573 A1 · Text line normalization systems and methods

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0334573 A1
- Document ID: US20210334573A1
- Status: Published application
- Kind: A1
- Application number: 17/372,655
- Filed: 2021-07-12
- Published: 2021-10-28
- Earliest claimed: 2018-07-19
- Assignees: Leverton Holding LLC
- Applicants: Leverton Holding LLC
- Inventors: Florian Kuhlmann; Michael Kieweg; Saurabh Shekhar Verma
- Web page: https://patentgrep.com/patent/US20210334573A1

## CPC

- G06F 40/109: Font handling; Temporal or kinetic typography
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/09: Supervised learning
- G06V 10/242: {by image rotation, e.g. by 90 degrees}
- G06V 10/243: {by compensating for image skew or non-uniform image deformations}
- G06V 10/507: {Summing image-intensity values; Histogram projection analysis}
- G06V 10/82: using neural networks
- G06V 30/158: {using character size, text spacings or pitch estimation}
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/045: Combinations of networks
- G06N 7/01: Probabilistic graphical models, e.g. probabilistic networks
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

A method for estimating text heights of text line images includes estimating a text height with a sequence recognizer. The method further includes normalizing a vertical dimension and/or position of text within a text line image based on the text height. The method may also further include calculating a feature of the text line image. In some examples, the sequence recognizer estimates the text height with a machine learning model.

## Claims

### Claim 1

A computer-implemented method comprising:
(a) receiving a first text line image associated with a first line of text contained within a document image;
(b) estimating a first text height of the first text line image with a sequence recognizer; and
(c) normalizing the first text line image based on the first text height.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
calculating a first feature of the first text line image,
wherein the sequence recognizer estimates the first text height using the first feature.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
calculating a second feature of a second text line image associated with a second line of text contained within the document image,
wherein the sequence recognizer estimates the first text height using the first feature and the second feature.

### Claim 4 (depends on 2)

The method of claim 2, wherein the first feature includes a feature chosen from the group consisting of a sum of pixels at a plurality of vertical positions within the first text line image, a gradient of the sum of pixels at a plurality of vertical positions within the first text line image, a statistical moment of a gray value distribution at a plurality of vertical positions of the first text line image, and combinations thereof.

### Claim 5 (depends on 3)

The method of claim 3, wherein the second feature includes a second text height of the second text line image.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
calculating a third feature of a plurality of text line images associated with a plurality of lines of text contained within the document image,
wherein the sequence recognizer estimates the first text height using the third feature.

### Claim 7 (depends on 6)

The method of claim 6, wherein the third feature is a text height of a majority of the plurality of text line images.

### Claim 8 (depends on 1)

The method of claim 1, wherein the sequence recognizer estimates the first text height with a machine learning model selected from the group consisting of a recurrent neural network, a convolutional neural network, a conditional random field model, a Markov model, and combinations thereof.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
receiving (i) a training text line image associated with a training line of text and (ii) a labeled text height indicating a desired text height corresponding to the training text line image;
estimating a training text height of the training text line image;
comparing the training text height with the labeled text height to create a training output comparison that identifies one or more errors in the training text height; and
updating one or more parameters of the machine learning model based on the training output comparison.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
estimating one or both of an upper bound and a lower bound of the first text height,
wherein estimating one or both of the upper bound and the lower bound further comprises predicting a probability that each of a plurality of vertical positions of the first text line image is the upper bound and/or the lower bound.

### Claim 11 (depends on 1)

The method of claim 1, wherein the first text height includes one or more height measures chosen from the group consisting of a lowercase text height measure and a capital text height measure, and combinations thereof,
wherein the lowercase text height measure is a measure of a height of one or more lowercase letters in the text, and
wherein the capital text height measure is a measure of a height of one or more capital letters in the text.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
estimating a first height measure of the first text line image;
determining that the first height measure incorrectly measures the first text height of the first text line image;
estimating a second height measure of the first text line image; and
calculating a third height measure based on the second height measure and a height measure conversion ratio.

### Claim 13 (depends on 12)

The method of claim 12, wherein determining that the first height measure incorrectly measures the first text height of the first text line image further comprises:
performing optical character recognition on the first text line image after the first text line image is normalized based on the first height measure; and
measuring that a confidence measure of the optical character recognition is below a confidence threshold, and
wherein the first height measure is a lowercase text height measure, the second height measure is a capital text height measure, and the third text height measure is a lowercase text height measure.

### Claim 14 (depends on 1)

The method of claim 1, further comprising repeating (a)-(c) on a plurality of text line images associated with the document image.

### Claim 15

A system comprising:
a processor; and
a memory storing instructions which, when executed by the processor, cause the processor to:
(a) receive a first text line image associated with a first line of text contained within a document image;
(b) estimate a first text height of the first text line image with a sequence recognizer; and
(c) normalize the first text line image based on the first text height.

### Claim 16 (depends on 15)

The system of claim 15, wherein the memory contains further instruction which, when executed by the processor, cause the processor to:
calculate a first feature of the first text line image; and
calculate a second feature of a second text line image associated with a second line of text contained within the document image,
wherein the sequence recognizer estimates the first text height using the first feature and the second feature.

### Claim 17 (depends on 15)

The system of claim 15, wherein the memory contains further instruction which, when executed by the processor, cause the processor to:
calculate a third feature of a plurality of text line images associated with a plurality of lines of text contained within the document image,
wherein the sequence recognizer estimates the first text height using the third feature.

### Claim 18 (depends on 15)

The system of claim 15, wherein the memory contains further instruction which, when executed by the processor, cause the processor to:
receive (i) a training text line image associated with a training line of text and (ii) a labeled text height indicating a desired text height corresponding to the training text line image;
estimate a training text height of the training text line image with the sequence recognizer;
compare the training text height with the labeled text height to create a training output comparison that identifies one or more errors in the training text height; and
update one or more parameters of the machine learning model based on the training output comparison.

### Claim 19 (depends on 15)

The system of claim 15, wherein the memory contains further instruction which, when executed by the processor, cause the processor to:
estimate a first height measure of the first text line image;
determine that the first height measure incorrectly measures the first text height of the first text line image;
estimate a second height measure of the first text line image; and
calculate a third height measure based on the second height measure and a height measure conversion ratio.

### Claim 20

A computer readable medium storing instructions which, when executed by one or more processors, cause the one or more processors to:
(a) receive a first text line image associated with a first line of text contained within a document image;
(b) estimate a first text height of the first text line image with a sequence recognizer; and
(c) normalize the first text line image based on the line height measure.
