1. An image processing apparatus comprising: an image data input unit that inputs image data represented by a plurality of pixels; a luminance distribution calculator that calculates a luminance distribution of the image data; a number-of-color detector that detects a number of colors by regarding a number of luminance values in the luminance distribution as the number of colors; and an image discriminator that discriminates a type of image based on the number of colors.