1. An image processing apparatus, comprising: a gradation direction determination hardware that determines a gradation direction existing in an image in which a color or density changes by dividing the image into a plurality of boxes of pixels in rows and a plurality of boxes of pixels in columns; a reference area setting hardware that sets a shape of a reference area based on a determination result by the gradation direction determination hardware, the reference area oriented to be elongated in a direction perpendicular to the gradation direction or oriented to be short in both vertical and horizontal directions; and a color estimation hardware that estimates a color in which a non-target image superimposition does not occur based on a pixel value within the reference area set by the reference area setting hardware and substitute an input pixel value with the estimated color.