1. An image processing apparatus, comprising: a first attribute image generation unit; a second attribute image generation unit; and a foreground image generation unit, wherein said first attribute image generation unit is configured to determine a first attribute value with regard to each pixel from an input image to generate a first attribute image, said first attribute value being expressed with a first value indicating that a pixel is a specific pixel in a specific region constituting a text or a line, or with a second value indicating that a pixel is not the specific pixel, said second attribute image generation unit is configured to determine a second attribute value with regard to each pixel from the input image to generate a second attribute image, said second attribute value being expressed with a third value indicating that a pixel is in a chromatic color, or with a fourth value indicating that a pixel is in an achromatic color, said foreground image generation unit is configured to generate a foreground image expressing color information in the specific region according to the input image, the first attribute image, and the second attribute image, and said foreground image generation unit is configured to switch a method of determining a pixel value of a target pixel of the foreground image according to contents of the first attribute image and the second attribute image in a reference region including the target pixel associated with determining the pixel value when the pixel value of each pixel of the foreground image is determined.