A document image is often accidentally placed at an undesirable angle
during image scanning. In order to correct the orientation of the image
document, an angle must be determined based upon the document image. In
determining the angle, the document image is processed to reverse the
brightness as necessary.