Abstract:To solve the problems of identification complexity for foreign fibers in cotton with slow computing speed and unable eliminating foreign fibers in production line, based on the foreign fiber images obtained from production line, a new method was proposed to segment images online and locate foreign fibers by standard deviation. G component of RGB images was extracted to enhance the gray value. The standard deviations of gray values of image column pixels were used to locate the foreign fibers in wide and high directions of the images. According to the width and height location informations of foreign fiber images, the exact positions in cotton conveyed pipeline were further determined. The method was applied in image recognition with plastic ropes, plastic films, hemp ropes, colored lines and feathers. The recognition results show that the foreign fibers can be quickly and accurately segmented and recognized. Using Matlab software on PC for one 3 096 × 60 pixel image, it takes approximately 0.04 s from reading image to obtaining exact pixel position of foreign fibers. The running time of the proposed algorithm can be shortened with FPGA hardware system. It is expected to realize online eliminating foreign fibers.