Detecting skew and determining skew angle using the front of a document by
determining background-to-document transitions. Incoming scanlines are
interval sampled in the fast scan direction every nth pixel. The samples
are collected and organized into a two dimension array comprised of
scanline based rows and interval based columns. The collected and
organized samples are analyzed by intervals to determine a scanline (row)
where a specified sampling condition exceeds predetermined threshold. The
corresponding row-interval point forms a background-to-medium transition
point of the edge of a document. When two or more background-to-medium
transition points are found from different intervals the skew angle can
be determined using linear regression.