A head section includes: a light projecting part for projecting incident light as structured illumination of a predetermined projection pattern; the image capturing part for acquiring reflected light that is projected by the light projecting part and reflected on an inspection target, to capture a plurality of pattern projected images; a distance image generating part capable of generating a distance image based on the plurality of pattern projected images captured in the image capturing part; a head-side storage part for holding the distance image generated in the distance image generating part; and a head-side communication part for transmitting the distance image held in the storage part to the controller section. The controller section includes: a controller-side communication part for communicating with the head-side communication part; and an inspection executing part for executing predetermined inspection processing on the distance image received in the controller-side communication part.