In integrated circuit manufacturing industry, in order to meet the high demand of electronic products, wafers are designed to be smaller and smaller, which makes automatic wafer defect detection a great challenge. The existing wafer defect detection methods are mainly based on the precise segmentation of one single wafer, which relies on high-cost and complicated hardware instruments. The segmentation performance obtained is unstable because there are too many limitations brought by hardware implementations such as the camera location, the light source location, and the product location. To address this problem, in this paper, we propose a method for wafer defect detection. This novel method includes two phases, namely wafer segmentation and defect detection. In wafer segmentation phase, the target wafer image is segmented based on the affine iterative closest algorithm with spatial feature points guided (AICP-FP). In wafer defect detection phase, with the inherent characteristics of wafers, a simple and effective algorithm based on machine vision is proposed. The simulations demonstrate that, with these two phases, the higher accuracy and higher speed of wafer defect detection can be achieved at the same time. For real industrial system, this novel method can satisfy the real-time detection requirements of automatic production line.INDEX TERMS Wafer segmentation, defect detection, affine iterative closest point, corner point, machine vision.