Method and system for preprocessing an image for optical character recognition
First Claim
1. A method of preprocessing an image for optical character recognition (OCR), wherein the image comprises Arabic text and non-text items, the method comprising:
- determining a plurality of components associated with at least one of the Arabic text and the non-text items, wherein a component comprises a set of connected pixels;
calculating a first set of characteristic parameters associated with the plurality of components; and
merging the plurality of components based on the first set of characteristic parameters to form at least one of at least one sub-word and at least one word;
calculating a second set of characteristic parameters associated with the at least one of each sub-word and each word, wherein the second set of characteristic parameters is one of a line height, a word spacing, and a line spacing;
grouping at least two sub-words based on the second set of characteristic parameters to form one of at least one sub-word and at least one word;
segmenting the at least one sub word and the at least one word into at least one horizontal line based on at least one of a line height and a line spacing;
identifying at least one component associated with the at least one horizontal line comprising a height greater than a factor of the line height;
determining a center of each horizontal line of the at least one horizontal line, wherein the center is a mid point between a top edge and a bottom edge of each horizontal line;
calculating a distance between at least one of the center and the top edge, and the center and the bottom edge; and
determining orientation of the image based on the distance.
1 Assignment
0 Petitions
Accused Products
Abstract
The present invention provides method and system for preprocessing an image including one or more of Arabic text and non-text items for Optical Character Recognition (OCR). The method includes determining a plurality of components associated with one or more of the Arabic text and the non-text items, wherein a component includes a set of connected pixels. A first set of characteristic parameters is then calculated for the plurality of components. The plurality of components are subsequently merged based on the first set of characteristic parameters to form one or more of one or more sub-words and one or more words.
14 Citations
20 Claims
-
1. A method of preprocessing an image for optical character recognition (OCR), wherein the image comprises Arabic text and non-text items, the method comprising:
-
determining a plurality of components associated with at least one of the Arabic text and the non-text items, wherein a component comprises a set of connected pixels; calculating a first set of characteristic parameters associated with the plurality of components; and merging the plurality of components based on the first set of characteristic parameters to form at least one of at least one sub-word and at least one word; calculating a second set of characteristic parameters associated with the at least one of each sub-word and each word, wherein the second set of characteristic parameters is one of a line height, a word spacing, and a line spacing; grouping at least two sub-words based on the second set of characteristic parameters to form one of at least one sub-word and at least one word; segmenting the at least one sub word and the at least one word into at least one horizontal line based on at least one of a line height and a line spacing; identifying at least one component associated with the at least one horizontal line comprising a height greater than a factor of the line height; determining a center of each horizontal line of the at least one horizontal line, wherein the center is a mid point between a top edge and a bottom edge of each horizontal line; calculating a distance between at least one of the center and the top edge, and the center and the bottom edge; and determining orientation of the image based on the distance. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. A system for preprocessing an image for optical character recognition (OCR), wherein the image comprises Arabic text and non-text items, the system comprising:
-
a memory; and a processor coupled to the memory, wherein the processor is configured to; determine a plurality of components associated with at least one of the Arabic text and the non-text items, wherein a component comprises a set of connected pixels; calculate a first set of characteristic parameters associated with the plurality of components; merge the plurality of components based on the first set of characteristic parameters to form at least one of at least one sub-word and at least one word; calculate a second set of characteristic parameters of the at least one of each subword and each word, wherein the second set of characteristic parameters is one of a line height, a word spacing, and a line spacing; group at least two sub-words based on the second set of characteristic parameters to form one of at least one sub-word and at least one word; segment the at least one sub word and the at least one word into at least one horizontal line based on at least one of a line height and a line spacing; identify at least one component associated with the at least one horizontal line comprising a height greater than a factor of the line height; determine a center of each horizontal line of the at least one horizontal line, wherein the center is a mid point between a top edge and a bottom edge of each horizontal line; calculate a distance between at least one of the center and the top edge, and the center and the bottom edge; and determine orientation of the image based on the distance. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20)
-
Specification