Patent Document ID: 9160885
Application ID: 13382097

Base Claim:
1. A skew detection apparatus, the apparatus comprising: an input to receive an image of a document; and a processor to, for each of a plurality of sides of the image: determine locations of a set of foreground pixels or a set of edge pixels of the document that are nearest to the side of the image; generate from said set of pixels an estimate of a probability distribution of values of an angle of a line joining two pixels of a subset of pairs of pixels chosen from among all possible pairs of pixels from the set, wherein a distance between the pixels in each pair of the chosen subset of pairs of pixels is predefined; and determine the angle corresponding to a maximum value of a plurality of values in the estimated probability distribution, produce a first estimated skew angle by combining said angles determined for each of the plurality of sides of the image, and estimate a first confidence value for the first estimated skew angle.

---

Claim 2:
2. The skew detection apparatus of claim 1 , wherein the processor is further to: calculate a confidence value for each angle; combine said angles by clustering them into one or more groups; calculate a group confidence value for each group based on a sum of the confidence values of the angles in that group; select the group having the highest group confidence value; produce the first estimated skew angle based on the angles in that selected group; and estimate the first confidence value for the first estimated skew angle based on a comparison between the highest confidence value and the second highest group confidence value.