1. An apparatus for inspecting a defect of a circuit pattern formed on a semiconductor wafer comprising: a SEM image obtaining means for obtaining a SEM image of an inspection region including the defect on the semiconductor wafer formed with the circuit pattern using positional information of the defect detected beforehand by another inspection apparatus; a defect image extracting means for comparing the SEM image of the inspection region obtained by the SEM image obtaining means with a reference image and extracting a SEM image of a defect present in a desired inspection region on the semiconductor wafer; a defect classifying means for classifying the SEM image of the defect extracted by the defect image extracting means; and an outputting means for outputting results classified by the defect classifying means; wherein the defect image extracting means further comprising: an inspection shape extracting section for extracting an inspection shape of the circuit pattern within the inspection region from the SEM image of the inspection region obtained by the SEM image obtaining means; a comparison shape forming section for forming a plurality of comparison shapes corresponding to the inspection shape extracted by the inspection shape extracting section by deforming the shape of the circuit pattern in accordance with a plurality of shape deformation rules using design data corresponding to the circuit pattern within the inspection region and a shape similar to the inspection shape of the circuit pattern extracted in the inspection shape extracting section out of the plurality of comparison shapes formed is selected as the comparison shape; and a defect image extracting section for extracting an image of a defect out of the SEM image using information of the comparison shape selected in the comparison shape forming section and the inspection shape of the circuit pattern extracted in the inspection shape extracting section.