Cotton impurity inspection is important to control the quality of fabric and reduce production costs. To detect cotton impurity in industrial environment with uneven illumination
an impurity detection algorithm based on Gabor filter is proposed. In the algorithm
the image is divided into multiple zones using Otsu’s threshold method and morphological filter
and the texture features for foreground and background are then extracted using Gabor filter. An adaptive threshold segmentation method is designed and applied to the Gabor filter output
and then the impurities in the image are detected using a morphological filter and connected-zone analysis. Experiment results show that the proposed algorithm can remove the undesired interference caused by light source fluctuations effectively
and the common impurities in cotton also can be accurately detected.