Patent ID: 7657120

Claim:
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.