It should be noted that the embodiments of the present invention and the features in the embodiments can be combined with each other if there is no conflict.
 In the description of the present invention, it should be understood that the terms "center", "longitudinal", "transverse", "upper", "lower", "front", "rear", "left", "right", " The orientation or positional relationship indicated by "vertical", "horizontal", "top", "bottom", "inner", "outer" etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present invention and The description is simplified, rather than indicating or implying that the pointed device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", etc. are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined with "first", "second", etc. may explicitly or implicitly include one or more of these features. In the description of the present invention, unless otherwise specified, "plurality" means two or more.
 In the description of the present invention, it should be noted that the terms "installation", "connected" and "connected" should be understood in a broad sense, unless otherwise clearly specified and limited. For example, they can be fixed or detachable. Connected or integrally connected; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the internal communication between two components. For those of ordinary skill in the art, the specific meaning of the above-mentioned terms in the present invention can be understood through specific situations.
 Hereinafter, the present invention will be described in detail with reference to the drawings and in conjunction with the embodiments.
 Such as figure 1 As shown, a foreign fiber content detection system includes a control module, a rejection module, a light source detection module, and a placement module; the light source detection module includes: a transparent cotton flow channel, a CCD and a backlight plate; the CCD and backlight plates are correspondingly located On both sides of the cotton flow channel, the backlight plate includes ultraviolet tubes and white fluorescent tubes; the upper end of the cotton flow channel is connected to a rejection module, which includes nozzles; the lower end of the cotton flow channel is connected to a laying module, which includes a fan; the CCD and nozzles are separate Connected with the control module; the fan sucks the raw cotton to be detected into the cotton flow channel, the ultraviolet lamp tube and white fluorescent tube irradiate the raw cotton to be detected in the cotton flow channel, and the CCD collects the image of the foreign fiber in the raw cotton to be detected and sends it to the control module; The control module controls the nozzle to turn on and spray the foreign fibers contained in the raw cotton to be tested.
 Such as figure 2 As shown, a foreign fiber content detection method uses the above foreign fiber content detection system:
 Step 1: Analyze the geometric characteristics and physical and chemical properties of the heterogeneous fiber, and extract 10 parameters;
 10 parameters include: diameter, length, area, weight, toughness, dyeability, moisture absorption, acid resistance, alkali resistance and composition;
 Step 2: Use the rough set attribute reduction algorithm to extract the 10 parameters in step 1 to get the reduction result: including diameter, length, area, weight, toughness and dyeability;
 The rough set attribute reduction algorithms used include: genetic algorithm and Johnson algorithm; take the common part of the calculation result as the reduction result;
 Step 3: Randomly divide the 6 reduction parameter index intervals obtained in step 2, use the maximum entropy method to divide the initial interval, use the multi-factor optimization method to adjust the boundary, and obtain a contingency table of parameter values and foreign fiber content levels. Obtained four levels of index intervals, and established a foreign fiber content index system;
 Step 4: Use fuzzy clustering algorithm to classify the foreign fiber content of the sample, and verify the rationality of the foreign fiber content clustering result through the validity function value.
 Further, in step 4:
 S1: Set clustering parameters: the radius of the field r a , R b , Parameter δ, cluster number c, fuzzy index m and minimum error ε, iteration number T, learning parameter α;
 Use the following formula to calculate the density index of all foreign fiber content sample points, and use the one with the highest density index as the first cluster center point x c1;
 S2: Further calculate the density index of the remaining n-1 data points, and find the highest as the second cluster center point x c2 , And so on, select the first c as the initial cluster centers v 0;
 S3: Calculate the degree of membership u using the degree of membership formula:
 Use the cluster center formula to calculate the cluster center v:
 Use the weight formula to calculate the feature weight ω:
 S4: Determine whether the termination condition is met: According to the current u, v and ω, use the following formula to calculate the value of the objective function. If the number of iterations is greater than T or the absolute value of the difference between the two adjacent objective function values is less than the threshold ε, then the degree of membership is output u. Cluster center v and feature weight ω; otherwise, let t=t+1, go to step S3 to restart the calculation;
 The effectiveness index function f is defined as follows:
 among them Reflect the total variation within the class, Reflect the total variation within the class; Contains improved division coefficient, reflecting whether the division result is clear, the smaller the value, the clearer the division;
 S5: According to the output membership degree u, cluster center v and feature weight ω output in step S4; use the following formula to calculate the validity index function value f c , And compare its value to judge the validity;
 To verify the foreign fiber content detection method of the present invention:
 Because the foreign fiber content in the national standard is expressed by weight ratio, although the weight ratio is more intuitive, the quality of cotton products is tested based on the number and size of defects, so it cannot fully and accurately reflect the foreign fiber content in cotton How many. The length, diameter, area, weight, toughness, dyeability and other characteristics of foreign fibers were extracted, and the relationship between six characteristics and defects was analyzed. The length, diameter, area, weight, toughness, and dyeability parameters of foreign fibers are used as characteristic indexes to measure the content of foreign fibers. Selected a typical heterosexual fiber: hair, sorted out some data as follows:
 Table 1-1 Hair characteristic index parameters
 Because it is classified for the same kind of foreign fiber content, its physical and chemical properties are roughly the same, and individual differences can be ignored, so the toughness and dyeability, when the same foreign fiber content is classified, the impact on the classification results can be ignored, only its geometry nature. The algorithm is applied to the collected sample data. According to the minimum validity function as the best classification result, the hair heterogeneous fiber content can be divided into four categories.
 Table 1-2 Hair cluster center
 Table 1-3 Validity function corresponding to the classification number
 It can be seen that when the classification number is 4, the corresponding validity function value is the smallest, and the data sample is reasonably classified and the validity is verified.
 Table 1-4 Classification of hair heterogeneous fiber content
 The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention within.