Method and apparatus for determination of text orientation
First Claim
1. A method for determining a dominant character orientation for a given script, comprising steps of:
- using a processor to perform steps comprising;
providing a set of training images of said script;
orientating said set of training images right side up;
calculating a first value representing a degree to which characters in said set of training images open toward a first direction;
calculating a second value representing a degree to which characters in said set of training images open toward a second direction orientated oppositely from said first direction;
determining, in accordance with said first value and said second value, a direction in which said training images exhibit a dominant directional property, wherein said determining comprises;
specifying a first direction of interest, wherein an axis of said first direction of interest forms a first angle with respect to a horizontal axis; and
rotating said set of training images by a second angle, said second angle being a negative of said first angle, to orientate said first direction of interest horizontally;
initializing a set of character directionality values to an empty set;
calculating, using the processor, for each individual text character in said set of training images, an absolute difference between the first value and the second value; and
appending said set of character directionality values by a value of log (ratio of the first value over the second value), if said absolute difference is greater than a predefined fraction of a respective character region of said individual text character; and
storing information associating said script and said dominant directional property in a device that performs an orientation correction on documents including text.
2 Assignments
0 Petitions
Accused Products
Abstract
The present invention relates to a method for determining the orientation of text, so that the text can be correctly read. In one embodiment, the method analyzes the “open” portions of text characters to determine in which direction the open portions face. By determining the respective densities of characters opening in each direction (e.g., right or left), the method can establish in which direction the text as a whole is orientated. The present invention may be adapted for use in automated mail processing, to determine the orientation of checks in automated teller machine envelopes, or the orientation of scanned or copied documents, or documents sent via facsimile, or to determine the orientation of digital photographs that include text (e.g., road signs, business cards, driver'"'"'s licenses, etc.), among other applications. A fast, substantially automatic determination of text orientation according to the present invention will reduce the labor expense and processing delay required for manual orientation.
39 Citations
13 Claims
-
1. A method for determining a dominant character orientation for a given script, comprising steps of:
using a processor to perform steps comprising; providing a set of training images of said script; orientating said set of training images right side up; calculating a first value representing a degree to which characters in said set of training images open toward a first direction; calculating a second value representing a degree to which characters in said set of training images open toward a second direction orientated oppositely from said first direction; determining, in accordance with said first value and said second value, a direction in which said training images exhibit a dominant directional property, wherein said determining comprises; specifying a first direction of interest, wherein an axis of said first direction of interest forms a first angle with respect to a horizontal axis; and rotating said set of training images by a second angle, said second angle being a negative of said first angle, to orientate said first direction of interest horizontally; initializing a set of character directionality values to an empty set; calculating, using the processor, for each individual text character in said set of training images, an absolute difference between the first value and the second value; and appending said set of character directionality values by a value of log (ratio of the first value over the second value), if said absolute difference is greater than a predefined fraction of a respective character region of said individual text character; and storing information associating said script and said dominant directional property in a device that performs an orientation correction on documents including text. - View Dependent Claims (2, 3, 4, 5)
-
6. A computer readable storage medium containing an executable program for determining a dominant character orientation for a given script, where the program performs steps of:
-
providing a set of training images of said script; orientating said set of training images right side up; calculating a first value representing a degree to which characters in said set of training images open toward a first direction; calculating a second value representing a degree to which characters in said set of training images open toward a second direction orientated oppositely from said first direction; determining, in accordance with said first value and said second value, a direction in which said training images exhibit a dominant directional property, wherein said determining comprises; specifying a first direction of interest, wherein an axis of said first direction of interest forms a first angle with respect to a horizontal axis; and rotating said set of training images by a second angle, said second angle being a negative of said first angle, to orientate said first direction of interest horizontally; initializing a set of character directionality values to an empty set; calculating, for each individual text character in said set of training images, an absolute difference between the first value and the second value; and appending said set of character directionality values by a value of log (ratio of the first value over the second value), if said absolute difference is greater than a predefined fraction of a respective character region of said individual text character; and storing information associating said script and said dominant directional property in a device that performs an orientation correction on documents including text. - View Dependent Claims (7, 8, 9)
-
-
10. A computer readable medium containing an executable program for determining a dominant character orientation for a given script, where the program performs steps of:
-
providing a set of training images of said script; orientating said set of training images right side up; determining a direction in which said set of training images exhibit a dominant directional property, wherein said determining step comprises; specifying a first direction of interest, wherein an axis of said first direction of interest forms a first angle with respect to a horizontal axis; and rotating said set of training images by a second angle, said second angle being a negative of said first angle, to orientate said first direction of interest horizontally; initializing a set of character directionality values to an empty set; calculating, for each individual text character in said set of training images, an absolute difference between a degree to which said individual text character opens toward a first direction and a degree to which said individual text character opens toward a second direction orientated oppositely from said first direction; and appending said set of character directionality values by a value of log (ratio of the degree to which said individual text character opens toward said first direction over the degree to which said individual text character opens toward said second direction), if said absolute difference is greater than a predefined fraction of a respective character region of said individual text character. - View Dependent Claims (11, 12, 13)
-
Specification