Patent ID: 8208725

Claim:
A method for determining a text orientation in a digital image, said method comprising: in a first text line comprising a first plurality of text characters in a digital image, determining a first text-line orientation of said first text line, wherein said determining said first text-line orientation comprises: determining a text-line bounding box for said first text line; calculating an aspect ratio for said text-line bounding box; and calculating said first text-line orientation based on said aspect ratio; determining, for each of said text characters in said first plurality of text characters, a first-edge position measurement corresponding to a bounding edge associated with a first side of said first text line, thereby producing a plurality of first-edge position measurements; determining, for each of said text characters in said first plurality of text characters, a second-edge position measurement corresponding to a bounding edge associated with a second side of said first text line, thereby producing a plurality of second-edge position measurements; computing a first first-alignment feature value relative to said first text-line orientation for said first text line in said digital image, wherein said computing a first first-alignment feature comprises: calculating a sample mean for said plurality of first-edge position measurements, thereby producing a ceiling measurement; and calculating an error measure between said ceiling measurement and said plurality of first-edge position measurements, thereby producing said first first-alignment feature value; computing a first second-alignment feature value relative to said first text-line orientation for said first text line in said digital image, wherein said computing a first second-alignment feature comprises: calculating a sample mean for said plurality of second-edge position measurements, thereby producing a floor measurement: and calculating an error measure between said floor measurement and said plurality of second-edge position measurements, thereby producing said first second-alignment feature value; and determining a first text orientation of said first plurality of text characters in said digital image based on said first first-alignment feature value and said first second-alignment feature value, wherein said determining said first text orientation comprises determining a baseline-side of said first text line, wherein said determining said baseline-side of said first text line is based on the relative values of said first first-alignment feature value and said first second-alignment feature value and a relative frequency of occurrence of text characters with ascenders and text characters with descenders in a written language.