A method for correcting skew images. The method first groups a scanned
image into blocks with N*N pixels, and detects all the blocks to find out
the edge areas with the larger luminance or chrominance difference
afterward. Next, gradient angles of the edge areas are calculated, and a
predominant angle is determined from among the calculated gradient
angles; and (c) rotating the image according to the predominant gradient
angle. The predominant gradient angle is taken as the skew angle for the
image to be rotated. In consequence, a higher accuracy of image
correction is achieved.