1. An image inspection apparatus for performing visual inspection of a workpiece, the apparatus comprising: three or more illumination sections for illuminating the workpiece from mutually different illumination directions; an illumination controlling section for turning on the three or more illumination sections one by one in a turning-on order; an imaging section for capturing an image of the workpiece from a certain direction at illumination timing for turning on each of the illumination sections by the illumination controlling section, to capture a plurality of partial illumination images with different illumination directions; a normal vector calculating section for calculating a normal vector with respect to a surface of the workpiece at each of pixels by a photometric stereo method by use of a pixel value of each of pixels having a corresponding relation among the plurality of partial illumination images captured by the imaging section; and a contour image generating section for performing differential processing in an X-direction and a Y-direction on the normal vector at each of the pixels calculated by the normal vector calculating section, to generate a contour image that shows a contour of inclination of the surface of the workpiece.