A method of inspecting detects includes assigning a plurality of sets of
image acquisition conditions, executing inspection using each of the sets
of conditions, classifying all detected defects into real defects and
false defects by use of an automatic defect classification function, and
selecting, from the plurality of sets of conditions, a set of conditions
ideal for detection.