# US 2022/0036063 A1 · Document information extraction for computer manipulation

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

- Number: US 2022/0036063 A1
- Document ID: US20220036063A1
- Status: Published application
- Kind: A1
- Application number: 16/941,349
- Filed: 2020-07-28
- Published: 2022-02-03
- Earliest claimed: 2020-07-28
- Assignees: Intuit Inc.
- Applicants: Intuit Inc.
- Inventors: Ranadeep Bhuyan; Shubhajit Saha; Sudipto Ghosh
- Web page: https://patentgrep.com/patent/US20220036063A1

## CPC

- G06V 30/414: Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
- G06F 18/23213: with fixed number of clusters, e.g. K-means clustering
- G06T 7/11: Region-based segmentation
- G06T 11/60: Creating or editing images; Combining images with text
- G06V 10/82: using neural networks
- G06V 30/19013: {Comparing pixel values or logical combinations thereof, or feature values having positional relevance, e.g. template matching (specially adapted for image segmentation G06T7/10; specially adapted for the analysis of motion G06T7/20; specially adapted for image alignment G06T7/30; specially adapted for the calculation of depth from stereo images G06T7/50; specially adapted for position determination G06T7/70)}
- G06V 30/19107: {Clustering techniques}
- G06V 30/19173: {Classification techniques}
- G06V 30/416: Extracting the logical structure, e.g. chapters, sections or page numbers; Identifying elements of the document, e.g. authors
- G06T 2207/30176: Document
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Systems and apparatuses are disclosed for extracting information from document images. An example method includes segmenting a document image into multiple segments and determining formatting information for each segment. Determining formatting information for a segment includes determining one or more features of the segment and comparing the one or more features of the segment to one or more clusters of features associated with different document types. The formatting information for the segment is based on the comparison. The method also includes, for each segment, storing the formatting information in a data structure associated with the segment. The method further includes, for each segment including text to be identified during information extraction, applying OCR to the segment to generate machine-encoded text and storing the machine-encoded text in the associated data structure.

## Claims

### Claim 1

A method for extracting information from a document image, the method comprising:
segmenting a document image into multiple segments;
determining formatting information for each segment, including:
determining one or more features of the segment; and
comparing the one or more features of the segment to one or more clusters of features associated with different document types, wherein the formatting information for the segment is based on the comparison;
for each segment, storing the formatting information in a data structure associated with the segment;
for each segment including text to be identified during information extraction:
applying optical character recognition (OCR) to the segment to generate machine-encoded text; and
storing the machine-encoded text in the associated data structure;
generating a copy document image from the data structures;
comparing the document image and the copy document image; and
in response to the images not matching, adjusting a determination of formatting information to be stored.

### Claim 2 (depends on 1)

The method of claim 1, wherein determining the formatting information for each segment further includes:
comparing the one or more features of each segment of the document image to one or more clusters of features associated with different document types; and
determining the document type of the document image based on the comparisons, wherein the formatting information for the segment is based on the document type.

### Claim 3 (depends on 2)

The method of claim 2, wherein the one or more clusters of features for different document types is generated by segmenting previous document images, determining segment features of the previous document images, and clustering the features by applying one or more transformations to the segment features of the previous document images, wherein the one or more transformations includes one or more of:
applying a logistic regression;
performing k-means clustering; or
applying a convolutional neural network.

### Claim 4 (depends on 1)

The method of claim 1, wherein segmenting the document image includes:
determining a first group of pixels with non-zero contrasts and based on proximity between the first group of pixels;
determining a second group of pixels with non-zero contrasts and based on proximity between the second group of pixels, wherein the first group of pixels are separated from the second group of pixels by a pixel distance;
associating a first area of the document image including the first group of pixels and not including the second group of pixels with a first segment; and
associating a second area of the document image including the first group of pixels and not including the second group of pixels with a first segment.

### Claim 5 (depends on 1)

The method of claim 1, wherein:
storing the formatting information in the associated data structure includes storing the formatting information in one or more cascading style sheets of the associated data structure; and
storing the machine-encoded text in the associated data structure includes storing the machine-encoded text in JavaScript Object Notation (JSON) format in the associated data structure.

### Claim 6

(canceled)

### Claim 7 (depends on 1)

The method of claim 1, wherein comparing the document image and the copy document image includes determining contrasts of corresponding pixels on a pixel-by-pixel basis, wherein the images not matching includes the number of corresponding pixels with a non-zero contrast between images being greater than a threshold of the total number of corresponding pixels.

### Claim 8 (depends on 7)

The method of claim 7, further comprising iteratively adjusting the determination of formatting information for the document image, determining new formatting information for the document image based on the adjustment, generating a new copy document image based on the new formatting information, and comparing the new copy document image to the document image until the number of corresponding pixels with different contrasts between images is less than the threshold of the total number of corresponding pixels.

### Claim 9 (depends on 8)

The method of claim 8, wherein adjusting the determination of formatting information is on a segment-by-segment basis.

### Claim 10

An apparatus for extracting information from a document image, comprising:
one or more processors; and
a memory storing instructions that, when executed by the one or more processors, cause the apparatus to perform operations comprising:
segmenting a document image into multiple segments;
determining formatting information for each segment, including:
determining one or more features of the segment; and
comparing the one or more features of the segment to clusters of features associated with different document types, wherein the formatting information for the segment is based on the comparison;
for each segment, storing the formatting information in a data structure associated with the segment; and
for each segment including text to be identified during information extraction:
applying optical character recognition (OCR) to the segment to generate machine-encoded text; and
storing the machine-encoded text in the associated data structure;
generating a copy document image from the data structures;
comparing the document image and the copy document image; and
in response to the images not matching, adjusting a determination of formatting information to be stored.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein execution of the instructions to determine the formatting information for each segment further causes the apparatus to perform operations comprising:
comparing the one or more features of each segment of the document image to the one or more clusters of features associated with different document types; and
determining the document type of the document image based on the comparisons, wherein the formatting information for the segment is based on the document type.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the one or more clusters of features for different document types is generated by segmenting previous document images, determining segment features of the previous document images, and clustering the features by applying one or more transformations to the segment features of the previous document images, wherein the one or more transformations includes one or more of:
applying a logistic regression;
performing k-means clustering; or
applying a convolutional neural network.

### Claim 13 (depends on 10)

The apparatus of claim 10, wherein execution of the instructions to segment the document causes the apparatus to perform operations comprising:
determining a first group of pixels with non-zero contrasts and based on proximity between the first group of pixels;
determining a second group of pixels with non-zero contrasts and based on proximity between the second group of pixels, wherein the first group of pixels are separated from the second group of pixels by a pixel distance;
associating a first area of the document image including the first group of pixels and not including the second group of pixels with a first segment; and
associating a second area of the document image including the first group of pixels and not including the second group of pixels with a first segment.

### Claim 14 (depends on 10)

The apparatus of claim 10, wherein:
storing the formatting information in the associated data structure includes storing the formatting information in one or more cascading style sheets of the associated data structure; and
storing the machine-encoded text in the associated data structure includes storing the machine-encoded text in JavaScript Object Notation (JSON) format in the associated data structure.

### Claim 15

(canceled)

### Claim 16 (depends on 10)

The apparatus of claim 10, wherein execution of the instructions to compare the document image and the copy document image causes the apparatus to perform operations comprising determining contrasts of corresponding pixels on a pixel-by-pixel basis, wherein the images not matching includes the number of corresponding pixels with a non-zero contrast between images being greater than a threshold of the total number of corresponding pixels.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein execution of the instructions further causes the device to perform operations comprising iteratively adjusting the determination of formatting information for the document image, determining new formatting information for the document image based on the adjustment, generating a new copy document image based on the new formatting information, and comparing the new copy document image to the document image until the number of corresponding pixels with different contrasts between images is less than the threshold of the total number of corresponding pixels.

### Claim 18 (depends on 17)

The apparatus of claim 17, wherein adjusting the determination of formatting information is on a segment-by-segment basis.

### Claim 19

A non-transitory computer-readable storage medium storing instructions that, when executed by one or more processors of an apparatus, cause the apparatus to perform operations comprising:
segmenting a document image into multiple segments;
determining formatting information for each segment, including:
determining one or more features of the segment; and
comparing the one or more features of the segment to clusters of features associated with different document types, wherein the formatting information for the segment is based on the comparison;
for each segment, storing the formatting information in a data structure associated with the segment; and
for each segment including text to be identified during information extraction:
applying optical character recognition (OCR) to the segment to generate machine-encoded text; and
storing the machine-encoded text in the associated data structure;
generating a copy document image from the data structure;
comparing the document image and the copy document image; and
in response to the images not matching, adjusting a determination of formatting information to be stored.

### Claim 20

(canceled)
