Just to clarify - what is a skew document? If you mean for example a scanned text document that is rotated you might want to look at some log-polar transformation for finding the rotation. If you mean skew in image as what might result from projective mapping, then you probably would like to study some registration (alignment) methods based on interest point descriptors like SIFT. As said, a bit too wide topic to answer without knowing what you want to do...