A Hough transform unit executes Hough transform to HIGH pixels of outline binary
image data inputted thereto, and stores the calculation result in a Hough space
data storage. A Hough space data calculating/projecting unit sequentially reads
out data stored in the Hough space data storage, executes a specific calculation,
and thereafter stores the calculation result sequentially in a calculated projection
data storage. An angle detector sequentially reads out calculated frequency data
stored in the calculated projection data storage, calculates the maximal value
of the data read out, and detects an angle that gives the maximal value as the
skew angle. The image processing device, being thus configured, allows detecting
and correcting the skew angle with high accuracy, even when the input image contains
image elements such as photograph images and dot images.