A image defect detecting vision system for the automatic optical inspection of wafer has been developed. For the successful detection of various kinds of defects, the performance of two threshold selection methods are compared and the improved Otsu method is adopted so that it can handle both unimodal and bimodal distributions of the histogram equally well. An automatic defect detection software for practical use was developed with the function of detection of ROI, fast thresholding and area segmentation. Finally each defect pattern in the wafer is classified and grouped into one of user-defined defect categories and more than 14 test wafer samples are tested for the evaluation of detection and classification accuracy in the inspection system.