1. An image processing apparatus, comprising: a characteristic quantity calculation unit that calculates a characteristic quantity for each pixel of image data from the image data; a tightness determination unit that determines tightness indicating a degree of dispersion of pixels in image data for tightness determination by extracting the pixels having a same characteristic quantity by using the characteristic quantity and generating the image data for tightness determination composed of the pixels having the same characteristic quantity; and a pixel set calculation unit that calculates a set of the pixels from the pixels in the image data for tightness determination in accordance with a determination of the tightness.