A parallel, non-iterative, memory efficient method of determining image
skew. A document skew angle is determined from a fast scan second order
moment data set and a slow scan second order moment data set. A slow scan
second order moment data set can be generated by receiving a current
scanline of image data, updating columns sums for a set of rotation
angles using scanlines within a buffer comprising a band having a
predetermined number B of scanlines, and updating the buffer with the
current scanline. A fast scan second order moment data set is generated
by projecting a plurality of pixels within each scanline of image data
received to a first rotation angle wherein the plurality pixels project
onto M rows; updating M memory locations, wherein each one of the M
memory locations corresponds to one of the M rows and wherein each memory
location is updated using pixels projecting onto the corresponding row
whereby one of the M memory locations contains a completed row; and
adding the square of the completed row sum to a moment accumulator.