1. An image processing apparatus for determining a non-defective item by comparing a multivalued image obtained by picking up an image of a determination target object with a multivalued image group of 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.