deskew
Library used to deskew a scanned document
Skew detection in scanned images
Detect and fix skew in images containing text
Automatically extract documents from images and perspectively correct them with classic computer-vision algorithms. In maintenance mode. Check out its successor at: