Patent ID: 7027638

Claim:
A method comprising: dividing images of a surface of a wafer, in which a line pattern and a space between adjacent line patterns having a smaller grey level than the line pattern are alternately and repeatedly arranged, into first pixels having a predetermined size; determining a first grey level value for each of the first pixels; wherein when X and Y regions having different color values exist in the surface of the wafer, dividing images of the surface of a wafer having the X region of a first color value and the Y region of a second color value into second pixels having a predetermined size determining a second grey level value for each of the second pixels in each of the X and Y regions; calculating the mean and standard deviation of the second grey level values for the second pixels in each of the X and Y regions; correcting the second grey level value for each of the second pixels in the X region such that the mean and standard deviation of the second grey level values of the X region are equal to those of the Y region; setting a first threshold value for the line pattern and a second threshold value for the space; and identifying first pixels that have a first grey level value greater than or equal to the first threshold value for first pixels of the line pattern and the second threshold value for first pixels of the space, wherein the first threshold value is set so that a grain existing in the line pattern is not detected, and the second threshold value is set so that a bridge existing in the space is detected.