1. An image processing apparatus for determining whether a target object is defective or not by comparing a multivalued image obtained from the target object with a group of multivalued images obtained from non-defective items, the image processing apparatus comprising: a non-defective item image acquisition device for obtaining a plurality of first multivalued images of non-defective items picked up by an image pickup device; a selection reception device for receiving selection of any one of a plurality of characteristic amount extraction devices including at least a first characteristic amount extraction device and a second characteristic amount extraction device, wherein the first characteristic amount extraction device extracts, as a characteristic amount, a pixel value of a color component for each pixel in the obtained first multivalued images, the second characteristic amount extraction device extracts, as a characteristic amount, edge intensities in two different directions for each pixel in the obtained first multivalued images; a distribution range calculation device for calculating a distribution range for determining the non-defective item based on a characteristic amount extracted by a characteristic amount extraction device of which selection is received; a multivalued image acquisition device for obtaining a second multivalued image of a determination target object; and a determination device for extracting, for each pixel in the obtained second multivalued image, a characteristic amount with the characteristic amount extraction device of which selection is received, and determining whether the characteristic amount is included in the distribution range corresponding to the extracted characteristic amount, wherein when selection of the first characteristic amount extraction device is received, the distribution range calculation device includes: a pixel mean value calculation device for calculating a mean value of pixel values of color components in respective pixels in the obtained first multivalued images; and a pixel value distribution range calculation device for calculating a distribution range of pixel values in a multidimensional space, in which the color components are respectively adopted as coordinate axes, for each pixel in the first multivalued images based on the calculated mean values of the pixel values of the color components, and the determination device is configured to calculate a pixel value of a color component for each pixel in the obtained second multivalued image, and determine whether the pixel value is included in the distribution range of the pixel values in the multidimensional space in which the color components are respectively adopted as coordinate axes, and when selection of the second characteristic amount extraction device is received, the distribution range calculation device includes: a direction-based edge intensity calculation device for calculating edge intensities in two different directions for each pixel in the obtained first multivalued images; an edge intensity mean value calculation device for calculating a mean value of edge intensities in two different directions for each pixel in the first multivalued images, based on the calculated edge intensities; and an edge intensity distribution range calculation device for calculating an intercorrelation distribution range of edge intensities in two different directions for each pixel in the first multivalued images with the calculated mean value being a center, and the determination device is configured to calculate edge intensities in two different directions for each pixel in the obtained second multivalued image, and determine whether the edge intensities are included in the intercorrelation distribution range corresponding to the calculated edge intensities.