Methods and apparatus for detecting skew in a document image, such as a
check image, to produce a de-skewed image are described. One example
method includes detecting one or more lines in the image and determining
whether the one or more lines are reliable. Reliability of a line may be
based on at least one of line length, straightness, and the presence of
holes in the line. If one or more lines are reliable, the method may
calculate a skew angle of the image based on the one or more reliable
lines' orientations with respect to an orientation of the image. A
comparison may also be made between lines detected in different regions
of the check to determine if a difference between skew angles
corresponding to each of the compared lines is lower than an error
threshold.