Patent attributes
To make it possible to set a shift direction of phases of illuminance distributions of pattern lights to an appropriate direction and perform an inspection at high accuracy while improving setting flexibility of an illuminating section and an imaging section. A phase shift direction of pattern light irradiated from a pattern light illuminating section is determined according to moving direction information concerning a moving direction of an inspection target object with respect to an array direction of light receiving elements and positional relation information concerning a positional relation between the light receiving elements and the pattern light illuminating section.