In the case where there is a pattern of a lower layer formed in the preceding process beneath a pattern to-be-inspected, part of a pattern to-be-inspected where there is a pattern of the lower layer formed in the preceding process and part of a pattern to-be-inspected where there is no pattern of the lower layer formed in the preceding process can be inspected by using different inspection paramet