To improve the detection accuracy of an inclination with a fine angle by calculating the inclination of an image inputted based upon a previously determined prescribed angle and an inclination detected by an inclination detecting means.
An image is inputted from an image input part 101 to an image rotation part 102, the rotation part 102 rotates the inputted image by a prescribed angle and a rectangle extraction part 103 extracts a black connecting rectangle form of the rotated image. An inclination detection part 104 detects the inclination angle of the extracted black connecting rectangle. A calculation part 105 calculates the inclination angle of the inputted image based upon the prescribed angle for rotating the input image by the rotation part 102 and the inclination angle of the black connecting rectangle detected by the detection part 104. Consequently the fine angle of an inclination also can accurately be detected.