A representative value calculator calculates a representative value which is a luminance value representing a main inspection object area from an input image. On the other hand, an image divider divides an image area of the input image, and sets a plurality of divided ranges. A factor calculator calculates a tone conversion factor for enhancing or suppressing contrast adjacent the representative value calculated by the representative value calculator for each area (each divided area) divided by the image divider. A tone converter converts the tone of each pixel of the input image based on the tone conversion factor for the range divided by the image divider, which range includes a pixel for image processing, and ranges adjacent that range. As a result, the contrast of the area for which enhancement is desired can be enhanced optimally.