1. A defect inspection method for acquiring image signals from a substrate that is to be inspected, the substrate having circuit patterns repeatedly formed thereon, and inspecting a defect present on the substrate on the basis of the acquired image signals, the method comprising the steps of: setting a target local region and a plurality of corresponding local regions in the acquired image signals, the target local region including a target pixel and an area surrounding the target pixel, and the corresponding local regions including pixels corresponding to the target pixel and areas surrounding the corresponding pixels; searching for similarities between the image signal of the target local region set in the local region setting step and the image signals of the plurality of corresponding local regions set in the local region setting step; determining, by using information of the similarities found in the searching step, a plurality of image signals that represent corresponding local regions and are similar to the image signal of the target local region; comparing the image signal of the target local region with the image signals that represent the corresponding local regions and have been determined in the determining step; determining a defect on the basis of differences found in the comparing of the image signal of the target local region with the image signals that represent the corresponding local regions; forming a joint histogram feature space of the corresponding local regions on the basis of the image signals of the corresponding local regions set in the local region setting step; determining a threshold on the basis of the joint histogram feature space formed in the forming step; and using the threshold determined in the threshold determining step to detect the defect present on the target local region on the basis of differential images between the target local region and the corresponding local regions.