PURPOSE: To erase the abnormal part of luminance in an original image, to obtain a difference between the result and the original image, to detect even narrow and minute defects, to automate the operation, and to perform an efficient and stable detection.
CONSTITUTION: An image from a head 2 undergoes photoelectric conversion with a CCD camera 4 through an optical microscope 3. The signal is accumulated into a frame memory with an imaging device 5 by every one pixel. The data are processed, and the results are totalized and processed in a control computer 8. In the imaging in the device 5, at first, the image, wherein the minute part at the large abnormal part less than the luminance is erased, is formed. Then, the difference between the abnormality-erased image and the original image is obtained. Only the extracted image of the abnormal part is formed. In this image, contamination and the like other than intended cracks, flows and the like are extracted. Then, the abnormal places are individually separated, and the contamination and the linear defects are separated based on the difference in pixels occupring in each place. Thus, only the defective cracks and flaws can be automatically detected positively.