Patent ID: 6985640

Claim:
A method of determining skew of an image in an optical scanning device, said method comprising: (a) optically scanning a document to produce scanned image data including a plurality of scan lines having ON and OFF pixels; (b) sampling image data on at least one scan line along (i) a fast scan direction and (ii) a slow scan direction for one document rotation angle to determine a number of ON pixels on each scan line; (c) from the sampled image data, calculating: (i) a second order moment of ON pixels on the at least one scan line along the fast scan direction for a plurality of document rotation angles, said calculation yielding a fast scan second order moment data set; and (ii) a second order moment of ON pixels on the at least one scan line along the slow scan direction for a plurality of document rotation angles, said calculation yielding a slow scan second order moment data set; (d) calculating a first skew angle estimate from the fast scan second order moment data set; (e) calculating a second skew angle estimate from the slow scan second order moment data set; (f) determining whether the fast scan second order moment data set and the slow scan second order moment data set are valid; and (g) combining calculated skew angle estimates corresponding to valid second order moment data sets to yield a resultant skew angle.