1. A method of inspecting a substrate, comprising: dividing the substrate into inspection regions; selecting a main inspection region among the inspection regions; obtaining, with an image obtaining unit, a main image of the main inspection region and sub-images of sub-inspection regions adjacent to the main inspection region; obtaining, with a processing unit, an average image of the main image and the sub-images; randomly selecting reference inspection regions among the inspection regions; obtaining a reference image of each of the reference inspection regions; averaging the reference images to obtain an average reference image; calculating a first difference, the first difference between the average reference image and the average image; replacing the average image with the average reference image when the first difference is beyond a first error range; and detecting defects in the main inspection region, the defects detected by comparing the average image with the main image when the first difference is within the first error range and comparing the average reference image with the main image when the first difference is beyond the first error range.