# US 10,482,344 B2 · System and method for performing optical character recognition

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

- Number: US 10,482,344 B2
- Document ID: US10482344B2
- Status: Granted
- Kind: B2
- Application number: 15/900,300
- Filed: 2018-02-20
- Published: 2019-07-04
- Granted: 2019-11-19
- Earliest claimed: 2018-01-04
- Assignees: Wipro Limited
- Applicants: Wipro Limited
- Inventors: Sibi Chakravarthy Shanmugavel; Sandhya Ramachandran; Abhinay Reddy Vongur
- Web page: https://patentgrep.com/patent/US10482344B2

## CPC

- G06V 30/414: Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
- G06T 5/70: Denoising; Smoothing
- G06V 30/153: {using recognition of characters or words}
- G06T 2207/20182: Noise reduction or smoothing in the temporal domain; Spatio-temporal filtering
- G06V 30/10: Character recognition
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

Disclosed herein is a system and method for performing OCR. The method includes receiving a textual image, and extracting one or more character images along with one or more corresponding position indices from the textual image. A position index of a character image may include a line number, a word number, and a character number of the character image within the textual image. The method further includes determining one or more characters corresponding to the one or more character images using an OCR algorithm, and generating a text by positioning the one or more characters based on the one or more position indices of the one or more corresponding character images.

## Claims

### Claim 1

A method for performing optical character recognition (OCR), the method comprising:
receiving, by one or more processors, a textual image;
extracting, by the one or more processors, one or more character images along with one or more corresponding position indices from the textual image, wherein a position index of a character image comprises a line number, a word number, and a character number of the character image within the textual image;
determining, by the one or more processors, one or more characters corresponding to the one or more character images using an OCR algorithm; and
generating, by the one or more processors, a text by positioning the one or more characters based on the one or more position indices of the one or more corresponding character images, wherein the positioning the one or more characters comprises:
sorting the one or more characters in ascending order based on the one or more line numbers, followed by the one or more word numbers, and followed by the one or more character numbers;
comparing a line number of a character with a line number of preceding character;
upon determining the line number of the character to be greater than the line number of preceding character, placing the character in next line;
upon determining the line number of the character to be same as the line number of preceding character, comparing a word number of a character with a word number of preceding character;
upon determining the word number of the character to be greater than the word number of preceding character, placing the character after a space; and
upon determining the word number of the character to be same as the word number of preceding character, placing the character next to the preceding character.

### Claim 2 (depends on 1)

The method of claim 1, further comprising pre-processing the textual image by at least one of:
converting the textual image into a greyscale image,
binarizing the greyscale image,
removing noise from the greyscale image, or
correcting distortions in the greyscale image.

### Claim 3 (depends on 1)

The method of claim 1, wherein extracting comprises:
extracting one or more textual line images along with one or more corresponding line numbers from the textual image;
extracting one or more word images along with one or more corresponding word numbers from each of the one or more textual line images; and
extracting the one or more character images along with one or more corresponding character numbers from each of the one or more word images.

### Claim 4 (depends on 3)

The method of claim 3, wherein extracting the one or more textual line images along with the one or more corresponding line numbers comprises:
analyzing the textual image to determine one or more contiguous stretches of horizontal non-textual spaces, wherein each of the one or more contiguous stretches of horizontal non-textual spaces comprises a number of horizontal non-textual bins, and wherein each of the horizontal non-textual bins consists of non-text pixels;
determining a mean vertical coordinate of the non-text pixels in each of the one or more contiguous stretches of horizontal non-textual spaces;
segmenting the textual image into one or more textual line images based on the mean vertical coordinate of each of the one or more contiguous stretches of horizontal non-textual spaces; and
storing each of the one or more textual line images along with a corresponding line number.

### Claim 5 (depends on 4)

The method of claim 4, wherein the number of horizontal non-textual bins is in excess of or equal to a predetermined horizontal threshold, and wherein the predetermined horizontal threshold is determined based on an analysis of the textual image.

### Claim 6 (depends on 3)

The method of claim 3, wherein extracting the one or more word images along with the one or more corresponding word numbers comprises:
analyzing each of the one or more textual line images to determine one or more contiguous stretches of vertical non-textual spaces, wherein each of the one or more contiguous stretches of vertical non-textual spaces comprises a number of vertical non-textual bins in excess of or equal to a first predetermined vertical threshold, and wherein each of the vertical non-textual bins consists of non-text pixels;
determining a mean horizontal coordinate of the non-text pixels in each of the one or more contiguous stretches of vertical non-textual spaces;
segmenting the textual line image into one or more word images based on the mean horizontal coordinate of each of the one or more contiguous stretches of vertical non-textual spaces; and
storing each of the one or more word images along with a corresponding line number and a corresponding word number.

### Claim 7 (depends on 6)

The method of claim 6, wherein the first predetermined vertical threshold is determined based on an analysis of the textual image or an analysis of the textual line image.

### Claim 8 (depends on 3)

The method of claim 3, wherein extracting the one or more character images along with one or more corresponding character numbers comprises:
analyzing each of the one or more word images to determine one or more contiguous stretches of vertical non-textual spaces, wherein each of the one or more contiguous stretches of vertical non-textual spaces comprises a number of vertical non-textual bins, and wherein each of the vertical non-textual bins consists of non-text pixels;
determining a mean horizontal coordinate of the non-text pixels in each of the one or more contiguous stretches of vertical non-textual spaces;
segmenting the word image into one or more character images based on the mean horizontal coordinate of each of the one or more contiguous stretches of vertical non-textual spaces; and
storing each of the one or more character images along with a corresponding line number, a corresponding word number, and a corresponding character number.

### Claim 9 (depends on 8)

The method of claim 8, wherein the number of vertical non-textual bins is less than a first pre-determined vertical threshold, or in excess of or equal to a second predetermined vertical threshold but less than the first pre-determined vertical threshold, wherein the first predetermined vertical threshold is determined based on an analysis of the textual image or an analysis of the textual line image, and wherein the second predetermined vertical threshold is determined based on an analysis of the textual image, an analysis of the textual line image, or an analysis of the word image.

### Claim 10 (depends on 1)

The method of claim 1, wherein the position index of the character image further comprises at least one of a page number, a row number, or a column number.

### Claim 11

A device for performing optical character recognition (OCR), the device comprising:
at least one processor; and
a computer-readable medium storing instructions that, when executed by the at least one processor, cause the at least one processor to perform operations comprising:
receiving a textual image;
extracting one or more character images along with one or more corresponding position indices from the textual image, wherein a position index of a character image comprises a line number, a word number, and a character number of the character image within the textual image;
determining one or more characters corresponding to the one or more character images using an OCR algorithm; and
generating a text by positioning the one or more characters based on the one or more position indices of the one or more corresponding character images, wherein the positioning the one or more characters comprises:
sorting the one or more characters in ascending order based on the one or more line numbers, followed by the one or more word numbers, and followed by the one or more character numbers;
comparing a line number of a character with a line number of preceding character;
upon determining the line number of the character to be greater than the line number of preceding character, placing the character in next line;
upon determining the line number of the character to be same as the line number of preceding character, comparing a word number of a character with a word number of preceding character;
upon determining the word number of the character to be greater than the word number of preceding character, placing the character after a space; and
upon determining the word number of the character to be same as the word number of preceding character, placing the character next to the preceding character.

### Claim 12 (depends on 11)

The device of claim 11, wherein extracting comprises extracting one or more textual line images along with one or more corresponding line numbers from the textual image by:
analyzing the textual image to determine one or more contiguous stretches of horizontal non-textual spaces, wherein each of the one or more contiguous stretches of horizontal non-textual spaces comprises a number of horizontal non-textual bins, and wherein each of the horizontal non-textual bins consists of non-text pixels;
determining a mean vertical coordinate of the non-text pixels in each of the one or more contiguous stretches of horizontal non-textual spaces;
segmenting the textual image into one or more textual line images based on the mean vertical coordinate of each of the one or more contiguous stretches of horizontal non-textual spaces; and
storing each of the one or more textual line images along with a corresponding line number.

### Claim 13 (depends on 12)

The device of claim 12, wherein extracting further comprises extracting one or more word images along with one or more corresponding word numbers from each of the one or more textual line images by:
analyzing each of the one or more textual line images to determine one or more contiguous stretches of vertical non-textual spaces, wherein each of the one or more contiguous stretches of vertical non-textual spaces comprises a number of vertical non-textual bins in excess of or equal to a first predetermined vertical threshold, and wherein each of the vertical non-textual bins consists of non-text pixels;
determining a mean horizontal coordinate of the non-text pixels in each of the one or more contiguous stretches of vertical non-textual spaces;
segmenting the textual line image into one or more word images based on the mean horizontal coordinate of each of the one or more contiguous stretches of vertical non-textual spaces; and
storing each of the one or more word images along with a corresponding line number and a corresponding word number.

### Claim 14 (depends on 13)

The device of claim 13, wherein extracting further comprises extracting the one or more character images along with one or more corresponding character numbers from each of the one or more word images by:
analyzing each of the one or more word images to determine one or more contiguous stretches of vertical non-textual spaces, wherein each of the one or more contiguous stretches of vertical non-textual spaces comprises a number of vertical non-textual bins, and wherein each of the vertical non-textual bins consists of non-text pixels;
determining a mean horizontal coordinate of the non-text pixels in each of the one or more contiguous stretches of vertical non-textual spaces;
segmenting the word image into one or more character images based on the mean horizontal coordinate of each of the one or more contiguous stretches of vertical non-textual spaces; and
storing each of the one or more character images along with a corresponding line number, a corresponding word number, and a corresponding character number.

### Claim 15 (depends on 11)

The device of claim 11, wherein the position index of the character image further comprises at least one of a page number, a row number, or a column number.
