As I mentioned in my previous post, Correct Photos of Documents – Ambient Lighting, most images of documents suffer from skew. There are two types of skew: two-dimensional and three-dimensional.
Text is typically parallel to the top and bottom of the paper. Simply put, two-dimensional skew is the angle of the text when compared to the top or bottom edge of the image. This type of skewing can occur in photos of documents as well as document images produced by a scanner. While it is relatively easy to correct with a simple rotate, determining the angle of rotation can be tricky. Fortunately, LEADTOOLS includes a DeskewCommand
class that can determine the angle of skew.