In this paper, considered automatic optical methods detect surface defects, taking TFT-LCD panel surface defects as an example. Study the problem of surface defect detection in the condition of the frequency patterned background and low image contrast. At the same time, study the surface defect detection in the condition of non-periodicity background. In order to improve the speed of detection, do parallel optimization of related algorithms on GPU/CUDA.For the LCD panel surface periodic texture background, have some relationship between the distance of adjacent peak value Δx in the spatial domain and Δu in the frequency domain. It eliminates the frequency components that represent the periodic pattern of a TFT-LCD line image in the1-D Fourier spectrum. In order to improve defects contrast, remove high-frequency and reserve the low-frequency which is represent defect, and then reconstruct the1-D Fourier domain image to1-D spatial domain image using the inverse Fourier transform.1-D Haar wavelet transform is applied to remove uneven illumination in the filtered image so that defects can be segmented with simple statistical control limits. Get the Connected Component Labeling (CCL) of each defect and marked them with the Minimum Enclosing Rectangle (MER).In order to improve the speed of the surface defect detection, parallel the image processing based on NVIDIA’s GPU/CUDA. Optimize the algorithm which is time-consuming, such as Fourier transform, wavelet decomposition, connected component labeling, and minimum enclosing rectangle. Apply different optimization strategy to different problem.In the experiment, analyze the coefficient of k which controlled the thresholds and w which decide the range of high-frequency. At the same time, consider the image under different illumination. At last, considered the performance of algorithms run on GPU, According the size of the image, achieved the speedup about20-50times. It has a well reference value on surface defect detection. |