Photographic document images are often rotated, if only slightly. This code mediates an input of a series of four points--assumed to be the corners of a rectangular document--in any order, as mouse clicks.Then it determines the orientation of the points and calculates a "quality" value, as an indication to the user ...