An image processing apparatus, comprising: a crease detecting unit configured to detect a crease in a document image; a toner peeling detecting unit configured (a) to detect as a toner peeling part a pixel area on the crease, the pixel area having a width of a predetermined number of pixels in a direction perpendicular to the crease, having a background color which is a surface material color of a paper sheet of a document or a color of a background image in the document, and of which both sides are adjacent to at least two pixels in the direction perpendicular to the crease, the at least two pixels having a color other than the background color, and (b) to correct a pixel value of the toner peeling part on the basis of pixel values of the at least two pixels adjacent to both sides of the pixel area; and a specific local gradation detecting unit configured to detect a specific local gradation indicative of a crease in a density distribution of a pixel array in a secondary scanning direction at each one of plural sampling positions along a primary scanning direction in the document image; wherein the crease detecting unit is configured to determine a set of specific local gradations at the respective plural sampling positions so that the specific local gradations have (a) starting positions (GRA_ST) in the secondary scanning direction that agree with each other within a predetermined error, (b) widths (GRA_WIDTH) in the secondary scanning direction that agree with each other within a predetermined error, and (c) local peak densities (GRA_PEAK) that agree with each other within a predetermined error; and the crease detecting unit is configured to detect the crease on the basis of positions in the primary scanning direction and positions in the secondary scanning direction of the specific local gradations that belong to the determined set. a crease detecting unit configured to detect a crease in a document image; a toner peeling detecting unit configured (a) to detect as a toner peeling part a pixel area on the crease, the pixel area having a width of a predetermined number of pixels in a direction perpendicular to the crease, having a background color which is a surface material color of a paper sheet of a document or a color of a background image in the document, and of which both sides are adjacent to at least two pixels in the direction perpendicular to the crease, the at least two pixels having a color other than the background color, and (b) to correct a pixel value of the toner peeling part on the basis of pixel values of the at least two pixels adjacent to both sides of the pixel area; and a specific local gradation detecting unit configured to detect a specific local gradation indicative of a crease in a density distribution of a pixel array in a secondary scanning direction at each one of plural sampling positions along a primary scanning direction in the document image; wherein the crease detecting unit is configured to determine a set of specific local gradations at the respective plural sampling positions so that the specific local gradations have (a) starting positions (GRA_ST) in the secondary scanning direction that agree with each other within a predetermined error, (b) widths (GRA_WIDTH) in the secondary scanning direction that agree with each other within a predetermined error, and (c) local peak densities (GRA_PEAK) that agree with each other within a predetermined error; and the crease detecting unit is configured to detect the crease on the basis of positions in the primary scanning direction and positions in the secondary scanning direction of the specific local gradations that belong to the determined set.