Patent ID: 7873216

Claim:
A method for reducing distortion in an image comprising pixels, the method comprising: segmenting the image into foreground pixels and background pixels; applying a connected component analysis to the foreground pixels to obtain letters; indexing a location for each of the letters; forming words using the indexed letters to identify a neighborhood of letters for a query letter and forming into a word the letters from the neighborhood of letters that are less than a threshold distance apart; estimating a location and orientation for each word and indexing the location of each word; forming baselines using the indexed words to identify a neighborhood of words for a query word and forming into a baseline the words from the neighborhood of words that lay on a projection of the query word along its orientation; fitting a corresponding function to each of the baselines; selecting two or more dominant baselines; responsive to a pixel in the image being located between two dominant baselines, unwarping the pixel by blending the two functions respectively fitted to the two dominate baselines; and responsive to a pixel in the image not being located between two dominant baselines, unwarping the pixel in relation to the function of a nearest dominant baseline and a shift related to a distance between the pixel's location and the function of the nearest dominant baseline.