摘要 |
In an image defect inspection method and apparatus which detects a gray level difference between corresponding portions of two images, automatically sets a threshold value based on the distribution thereof, compares the gray level difference with the threshold value, and judges one or the other of the portions to be defective if the gray level difference is larger than the threshold value, provisions are made to enhance defect detection sensitivity by correcting the threshold value when the distribution of the gray level difference is different from the usual distribution. A cumulative frequency of the gray level difference between the corresponding portions of the two images is computed (S 103 ); a converted cumulative frequency is computed by converting the cumulative frequency so that the cumulative frequency shows a linear relationship to the gray level difference when a prescribed distribution is assumed (S 104 ); an approximate straight line is computed in each of two regions, one where the gray level difference is positive and the other where the gray level difference is negative (S 105 ); when the difference between the slopes of the approximate straight lines is larger than a predetermined value (S 106 ), the approximate straight line having the smaller slope is corrected in such a manner the slope increases (S 107 ); and based on the approximate straight line, the threshold value is determined from a prescribed cumulative frequency value in accordance with a prescribed calculation method.
|