1. A method for processing an image in order to recognize a pattern of a scanning electron microscope (SEM) including a repetitive pattern, comprising: a step of inputting multi-value image data such as contact holes which are made through a semiconductor substrate into an image processing apparatus; a step of performing a spatial filtering with respect to said multi-valued image data of the contact holes to output a spatial filtering image for each of said contact holes; a step of performing a histogram processing with respect to said spatial filtered image to output histogram data; a step of automatically setting a slice level with respect to said histogram data; a step of performing a three-valued processing with respect to said spatial filtered image on the basis of said slice level to output a three-valued processed image; a step of alternatively performing a contraction and expansion with respect to said three-valued processed image; a step of performing a labeling with respect to said image data; and a step of detecting an entire area of a pattern of contact holes having an area which most closely approximates an area of a reference image which has been previously stored, after obtaining said area of said repetitive pattern.