Patent ID: 8249391

Claim:
A method for correcting skew in an image, the method comprising: receiving, by an input device, at least two distinct points on a skew-line from a user, wherein the at least two distinct points on the skew-line are immediately updated with every move of the input device by the amount specified by a current position of the input device; calculating the sine and cosine of the skew-angle, wherein the skew-angle is the angle defined by the intersection of the skew-line with respect to a reference line, and the skew-angle is calculated using the points having coordinates (x 1 , y 1 ) and (x 2 , y 2 ), the calculating of the sine and cosine using the formulas: sin ⁡ ( θ ) = ( y 2 - y 1 ) ( y 2 - y 1 ) 2 + ( x 2 - x 1 ) 2 , ⁢ cos ⁡ ( θ ) = ( x 2 - x 1 ) ( y 2 - y 1 ) 2 + ( x 2 - x 1 ) 2 ; ⁢ and transforming the image according to the sine and cosine of the skew-angle, wherein the transforming is updated with the movement of the input device.