Patent ID: 7027666

Claim:
A method for determining skew angle and location of a document in an over-scanned digital image comprising the steps of: a) scanning a document; b) capturing a gray scale image; c) detecting outline pixels of a document from said captured gray scale image; d) connecting said detected pixels in a sequential order to form an outline polygon; e) setting angle θ=0; f) determining a x-minimum, y-minimum, x-maximum, and y-maximum of said polygon; g) calculating a rectangular boundary area based on said x-minimum, y-minimum, x-maximum, and y-maximum; h) recording said boundary area and θ; i) rotating said polygon z-degrees; j) resetting θ=θ+z-degrees; k) repeating step f-j n-times; l) selecting a minimum boundary area from said boundary areas recorded in step h); m) recording a corresponding angle at said minimum boundary area; and n) assigning said rotation angle having the minimum bounding area as said skew angle of said document.