1. An inspection apparatus comprising: an illumination unit configured to illuminate an object with light, a spatial filter, and a changing unit which changes type of diffraction pattern formed on said spatial filter as a function of type of pattern formed on the object.