# US 9,355,313 B2 · Detecting and extracting image document components to create flow document

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

- Number: US 9,355,313 B2
- Document ID: US9355313B2
- Status: Granted
- Kind: B2
- Application number: 14/205,171
- Filed: 2014-03-11
- Published: 2015-09-17
- Granted: 2016-05-31
- Earliest claimed: 2014-03-11
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Corporation
- Inventors: Milan Sesum; Ivan Vujic
- Web page: https://patentgrep.com/patent/US9355313B2

## CPC

- G06V 30/413: Classification of content, e.g. text, photographs or tables
- G06F 18/2163: {Partitioning the feature space}
- G06V 30/414: Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
- G06V 30/416: Extracting the logical structure, e.g. chapters, sections or page numbers; Identifying elements of the document, e.g. authors
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

One or more components of an image document may be detected and extracted in order to create a flow document from the image document. Components of an image document may include text, one or more paths, and one or more images. The text may be detected using optical character recognition (OCR) and the image document may be binarized. The detected text may be extracted from the binarized image document to enable detection of the paths, which may then be extracted from the binarized image document to enable detection of the images. In some examples, the images, similar to the text and paths, may be extracted from the binarized image document. The extracted text, paths, and/or images may be stored in a data store, and may be retrieved in order to create a flow document that may provide better adaption to a variety of reading experiences and provide editable documents.

## Claims

### Claim 1

A method executed at least in part on a computing device to detect and extract one or more components of a document in image format, the method comprising:
receiving the document in image format, wherein a content of the document includes text, one or more paths and one or more images,
detecting the text within the content of the document in image format;
binarizing the document in image format;
extracting the detected text from the content of the binarized document in image format;
detecting the one or more paths within the content of the document in image format, wherein the one or more paths represent basic elements of the content of the document in image format;
extracting the one or more detected paths from the binarized document in image format by coloring a bounding box for each detected path into a background color and determining the background color by counting a number of black and white pixels surrounding the bounding box;
detecting the one or more images from the content of the binarized document in image format; and
extracting the one or more detected images from the binarized document in image format.

### Claim 2 (depends on 1)

The method of claim 1, wherein detecting the text of the image document comprises:
employing optical character recognition (OCR) on the content of the binarized document in image format.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
determining recognized text, a bounding box, an array of glyphs, and one or more baseline points for each word in the detected text.

### Claim 4 (depends on 1)

The method of claim 1, wherein binarizing the document in image format comprises:
creating an image, wherein the text, the one or more paths, and the one or more images of the document in image format are displayed as black pixels in the created image.

### Claim 5 (depends on 4)

The method of claim 4, wherein a Sauvola binarization method is used to binarize the document in image format.

### Claim 6 (depends on 1)

The method of claim 1, wherein detection of the one or more images using the one or more algorithms comprises:
determining one or more connected components on the binarized document in image format, wherein a connected component is one or more touching pixels;
aggregating the connected components to detect the one or more images; and
developing one or more tables from the aggregated components to represent the one or more detected components, wherein one or more cells in the one or more tables represent one or more components of the one or more detected images.

### Claim 7 (depends on 6)

The method of claim 6, wherein extracting the one or more detected images from the binarized document in image format comprises:
coloring a bounding box for each cell in the one or more tables into a background color.

### Claim 8 (depends on 1)

The method of claim 1, wherein extracting the text from the content of the binarized document in image format comprises:
coloring a bounding box above a baseline for each word in the detected text into a background color.

### Claim 9 (depends on 1)

The method of claim 1, wherein the background color is black if a higher number of black pixels than white pixels are counted surrounding the bounding box, and the background color is white if a higher number of white pixels than black pixels are counted surrounding the bounding box.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
removing noise from the binarized document in image format prior to detection of the one or more paths, wherein the noise is one or more black pixels present in the binarized document in image format that are not the text, the one or more paths, and the one or more images of the document in image format.

### Claim 11 (depends on 1)

The method of claim 1 further comprising:
determining a rotation angle of the binarized document in image format using one of: the one or more detected paths and one or more lines detected from OCR; and
rotating the binarized document in image format based on the determined rotation angle.

### Claim 12

A computing device to detect and extract one or more components of a document in image format, the computing device comprising:
a memory storing instructions; and
a processor coupled to the memory, the processor executing a component detection application in conjunction with the instructions stored in the memory, wherein the component; detection application is configured to:
receive the document in image format, wherein a content of the document includes text, one or more paths, and one or more images;
employ optical character recognition (OCR) to detect the text within the content of the document in image format;
binarize the document in image format;
extract the detected text from the content of the binarized document in image for at;
detect the one or more paths within the content of the document in image, format, wherein the one or more paths represent basic elements of the content of the document in image format;
extract the one or more detected paths on the binarized document in image format by coloring a bounding box for each detected path into a background color and determining the background color by counting a number of black and white pixels surrounding the bounding box;
detect the one or more images from the content of the binarized document in image format; and
extract the one or more detected images from the binarized document in image format.

### Claim 13 (depends on 12)

The computing device of claim 12, wherein the one or more detected paths are vertical, paths and horizontal paths.

### Claim 14 (depends on 13)

The computing device of claim 13, wherein the vertical paths are detected as arrays of successive black pixels in one or more column of pixels in the binarized document in image format and the horizontal paths are detected as arrays of successive black pixels in one or more rows of pixels in the binarized document in image format.

### Claim 15 (depends on 12)

The computing device of claim 12, wherein the extracted text, one or more extracted paths, and one or more extracted images are stored at a data store, and are retrieved from the data store in order to create a flow document from the document in image format using the extracted text, one or more extracted paths, and one or more extracted images.

### Claim 16

A computer-readable memory device with instructions stored thereon to detect and extract one or more components of a document in image format, the instructions comprising:
receiving the document in image format wherein a content of the document includes text, one or more paths, and one or more images;
employing optical character recognition (OCR) to detect the text within the content of the document in image format:
binarizing the document in image format;
extracting the detected text from the content of the binarized document in image format;
detecting the one or more paths within the content of the document in image format, wherein the one or more paths represent basic elements of the content of the document in image format;
determining a rotation angle of the binarized document in image format using the one or more detected paths;
rotating the binarized document in image format based on the determined rotation angle;
extracting the one or more detected paths on the binarized document in image format by coloring a bounding box for each detected path into a background color and determining the background color by counting a number of black and white pixels surrounding the bounding box;
detecting the one or more images from the content of the binarized document in image format; and
extracting the one or more detected images from the binarized document in image format.

### Claim 17 (depends on 16)

The computer-readable memory device of claim 16, wherein the instructions further comprise:
combining the one or more detected paths into connected components in order to determine the rotation angle, wherein the one or more detected paths are vertical paths and horizontal paths that are combined separately.

### Claim 18 (depends on 17)

The computer-readable memory device of claim 17, wherein the instructions further comprise:
discarding the connected components from the vertical paths that are small in height compared to the document in image format and the connected components from the horizontal paths that are small in width compared to the document in image format; and
discarding the connected components from the vertical paths and the horizontal paths that are not linear.
