Intelligent detection method and system for cotton impurities based on fan conveying and visual algorithm

CN120182675BActive Publication Date: 2026-08-18NANJING FORESTRY UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510233817.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-28
Publication Date
2026-08-18
Estimated Expiration
2045-02-28

AI Technical Summary

Technical Problem

然而,现有的视觉检测系统仍然无法综合考虑多个因素(如颜色信息、光照变化、反射特性等)进行精准识别,缺乏有效的多模态信息融合技术,导致在复杂环境下的检测效果不理想

Benefits of technology

[0047] Beneficial effects: Compared with the prior art, the present invention has the following advantages: (1) The present invention combines polarized images and RGB images, and uses polarization characteristics to identify smooth impurities (such as plastic film), reducing light interference and significantly improving detection accuracy and robustness; (2) The present invention weightedly fuses RGB and polarized images to generate RGB-P images, and combines them with an optimized YOLOv5 model to enhance feature representation, reduce information redundancy, and improve detection efficiency and adaptability; (3) The present invention uses YOLOv5 to quickly extract foreign fiber candidate regions and MobileNet V2 twin network verification to reduce false detection and missed detection, while taking into account both real-time performance and accuracy. (4) The present invention processes RGB and polarized image data in parallel to avoid processing delays, adapt to high-speed conveying systems, and ensure real-time detection. (5) The present invention uses a white background for the RGB camera and a black background for the polarized camera to optimize lighting conditions and improve image quality and detection accuracy. (6) The present invention fuses multiple impurity detection masks and combines them with precise control of the spray valve based on conveying speed to achieve one-stop impurity removal and improve cotton quality. (7) The present invention combines the price of the fan conveyor with the vision algorithm, and the modular design facilitates integration, improves production efficiency, reduces labor costs, and is suitable for industrial applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120182675B_ABST
    Figure CN120182675B_ABST
Patent Text Reader

Abstract

The application discloses a cotton impurity intelligent detection and removal method and system based on a fan conveying and visual algorithm, and the method comprises the following steps: synchronously collecting cotton images through symmetrically arranged RGB cameras and polarization cameras; registering, normalizing and weightedly fusing the RGB images and the polarization images to generate an RGB-P image; detecting a mulch film by using an improved YOLOv5 model combined with LBP texture matching and generating a mask film; converting the RGB image to a Lab color space, screening drip irrigation belts and woven bag regions based on a color threshold value and generating a mask film; identifying foreign fibers by using an EfficientNet backbone network and a MobileNet V2 twin network and generating a mask film; and fusing the multiple mask films to generate a comprehensive detection result, and dynamically controlling a spray valve to accurately remove impurities in combination with a cotton conveying speed. The application solves the problems of low precision and low efficiency of traditional methods in a complex light and multi-class impurity scene, and significantly improves detection robustness, real-time performance and industrial application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of agricultural machine vision technology, and in particular to an intelligent method and system for detecting cotton impurities based on fan conveying and visual algorithms. Background Technology

[0002] In cotton production and processing, the quality of cotton directly affects the final product's usability and market competitiveness. Especially during cotton cleaning, the presence of impurities can severely impact cotton quality, increase the difficulty of subsequent processing, and potentially damage machinery, reducing production efficiency. Therefore, how to efficiently and accurately detect and remove impurities from cotton has become a pressing issue in the cotton production sector.

[0003] Traditional methods for detecting cotton impurities largely rely on manual visual inspection, which is not only slow and subjective but also inefficient at identifying minute impurities. While some vision-based automated inspection systems have been implemented with the development of automated equipment, these systems are often affected by factors such as changes in ambient lighting and the variety of impurity types during high-speed inspections, leading to low accuracy and even missed or false detections. Traditional visual algorithms struggle to effectively identify particularly small impurities similar in color to cotton, such as mulch film, foreign fibers, and drip irrigation tape.

[0004] In recent years, with the rapid development of deep learning and computer vision technologies, image processing techniques have been widely applied in the field of object detection. In particular, the application of deep learning algorithms such as Convolutional Neural Networks (CNNs) has significantly improved the accuracy of object detection. However, existing visual detection systems still cannot comprehensively consider multiple factors (such as color information, illumination changes, and reflectivity) for accurate identification, and lack effective multimodal information fusion techniques, resulting in unsatisfactory detection performance in complex environments. Summary of the Invention

[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a method and system for intelligent detection of cotton impurities based on fan conveying and visual algorithms.

[0006] Technical Solution: The technical solution adopted by this invention to solve the problem is as follows: The first aspect provides a method for intelligent detection of cotton impurities based on fan conveying and visual algorithms, comprising the following steps:

[0007] S1: Simultaneously capture images of cotton using symmetrically arranged RGB and polarization cameras;

[0008] S2: Transmit the acquired RGB and polarization images to the image processing module;

[0009] S3: Register and normalize the RGB and polarization images, and generate an RGB-P image through weighted fusion; detect the mulch film area based on an optimized deep learning model and generate a mulch film mask;

[0010] S4: Convert the RGB image to the Lab color space, filter out the drip irrigation tape and woven bag areas according to the color threshold, and generate the corresponding mask;

[0011] S5: Use an improved deep learning model combined with a Siamese network to identify foreign fiber regions in cotton and generate a foreign fiber mask;

[0012] S6: Integrates mulch film mask, drip irrigation tape mask, woven bag mask and foreign fiber mask to generate a comprehensive detection mask;

[0013] S7: Determine the location and area of ​​impurities based on the comprehensive detection mask, calculate the trigger parameters of the spray valve in conjunction with the conveying speed, and control the spray valve to accurately remove impurities.

[0014] Furthermore, the specific implementation method of "simultaneously capturing images using symmetrically arranged RGB cameras and polarization cameras" in step S1 is as follows:

[0015] S11: Use MatroxMILSDK to simultaneously control an RGB camera and a polarization camera, and use external trigger mode to acquire cotton impurity images.

[0016] Furthermore, the specific implementation method for "transmitting the acquired RGB image and polarization image to the image processing module" in step S2 is as follows:

[0017] S22: In the program, two threads are opened, and the cameras on both sides of the observation area respectively send the captured images to the image information processing module.

[0018] Furthermore, the specific implementation method of step S3, which involves "weightedly fusing the RGB image and the polarization image to obtain an RGB-P image with polarization information, detecting the mulch film through optimized deep learning, and generating a mask," is as follows:

[0019] S31: Preprocess the RGB and polarization images by calibration and geometric transformation to ensure that the RGB and polarization images are registered to the same coordinate system and remove distortion and resolution differences.

[0020] S32: Data normalization; Normalize each channel of the image, mapping pixel values ​​to the [0,1] interval to ensure consistency in numerical range across different channels:

[0021]

[0022] Where I represents the original image pixel value, and I′ represents the normalized value.

[0023] S33: Fusion Calculation; For each pixel (x, y), the weighted fusion formula for the RGB three channels and the polarization channel is:

[0024]

[0025] F p (x,y)=w p ·I Pol (x,y)

[0026] Weights of the three RGB channels: w r ,w g ,w b The weight of the polarization channel: w p The weights satisfy: w r +w g +w b +w p =1, Represents the pixel value of the r channel. Represents the pixel value of the g channel. This represents the pixel value of the b channel.

[0027] S34: By modifying the YOLOv5 object detection algorithm, the original network input dimension for the RGB three channels is optimized to a network model structure suitable for RGB-P input. YOLOv5 is used to roughly identify areas containing plastic film, outputting results including detection boxes and confidence scores, and converting the RGB image into a grayscale image.

[0028] S35 performs LBP feature extraction on each small block of the grayscale image and matches it with a preset mulch film texture template to further filter and confirm the mulch film area. The final mulch film mask is generated by combining the YOLOv5 and LBP results.

[0029] Furthermore, the specific implementation method of step S4, "converting the RGB image to the Lab color space, filtering out pixel regions that do not belong to the cotton color range based on the cotton color range model, and generating detection masks for drip irrigation tape, woven bags, and other brightly colored impurities," is as follows:

[0030] S41: Convert the input RGB image from RGB to Lab color space. Extract the a and b channels, whose values ​​will be significantly different from the background. By setting a threshold range, extract the drip tape and woven bags from the image.

[0031] S44: Post-processing; applying morphological operations to remove noise and further refine the test results, retaining only the larger impurity areas.

[0032] Furthermore, the specific implementation method of "using optimized one-stage deep learning and Siamese networks to identify smaller foreign fibers in impurities" in step S5 is as follows:

[0033] S51: This paper presents an improved one-stage deep learning object detection algorithm, YOLOv5, using the efficient convolutional neural network architecture EfficientNet as its backbone. Efficiency is enhanced by improving network width, depth, and resolution, while computation is reduced by decreasing the number of network layers. The Feature Pyramid Network (FPN) method is employed to ensure improved detection accuracy at a lower computational cost. EfficientNet adjusts its network parameters using the following formula:

[0034] Depth Scaling:d=α d ·d0

[0035] Width Scaling:w=α w ·w0

[0036] Resolution Scaling: r = α r ·r0

[0037] Where d0, w0, and r0 are the initial depth, width, and resolution of the network, and α d α w a r This is the scaling factor for each dimension. During image feature extraction, EfficientNet uses the MBConv (Mobile Inverted Bottleneck Convolution) module to reduce computation. Specifically, the MBConv operation flow is as follows:

[0038] y = Conv1x1(F(x))

[0039] y′=Depthwise Conv(y)

[0040] y″=Conv1x1(y′)

[0041] Where F(x) is the input feature map, which, after passing through an expansion layer and a depthwise separable convolution operation, is compressed to obtain the final output feature map y". The Feature Pyramid Network (FPN) technique is used to fuse features at different scales. The specific mathematical formula is:

[0042] P l =Conv(F l )+UpSampling(P l+1 )

[0043] Among them, F l These are the original features from layer l, Conv is the convolution operation, UpSampling is the upsampling operation, and P... l This is the final fusion feature. After detecting the foreign fiber region, YOLOv5 returns a candidate box containing a rough location of the foreign fiber.

[0044] S52: After the deep learning model detects the location of foreign fibers in the cotton image, the MobileNet V2 Siamese network is used to verify candidate boxes, extract features of regions and templates, calculate similarity, and further filter for foreign fibers to identify smaller foreign fibers among the impurities. After the deep learning model detects the location of foreign fibers in the cotton image, the MobileNet V2 Siamese network is used to verify candidate boxes, extract features of regions and templates, and calculate the similarity between feature vectors using Euclidean distance.

[0045]

[0046] If the similarity is greater than 0.7, the candidate box is considered to be of a different fiber.

[0047] Beneficial effects: Compared with the prior art, the present invention has the following advantages: (1) The present invention combines polarized images and RGB images, and uses polarization characteristics to identify smooth impurities (such as plastic film), reducing light interference and significantly improving detection accuracy and robustness; (2) The present invention weightedly fuses RGB and polarized images to generate RGB-P images, and combines them with an optimized YOLOv5 model to enhance feature representation, reduce information redundancy, and improve detection efficiency and adaptability; (3) The present invention uses YOLOv5 to quickly extract foreign fiber candidate regions and MobileNet V2 twin network verification to reduce false detection and missed detection, while taking into account both real-time performance and accuracy. (4) The present invention processes RGB and polarized image data in parallel to avoid processing delays, adapt to high-speed conveying systems, and ensure real-time detection. (5) The present invention uses a white background for the RGB camera and a black background for the polarized camera to optimize lighting conditions and improve image quality and detection accuracy. (6) The present invention fuses multiple impurity detection masks and combines them with precise control of the spray valve based on conveying speed to achieve one-stop impurity removal and improve cotton quality. (7) The present invention combines the price of the fan conveyor with the vision algorithm, and the modular design facilitates integration, improves production efficiency, reduces labor costs, and is suitable for industrial applications. Attached Figure Description

[0048] Figure 1 This is a flowchart of the detection method of the present invention;

[0049] Figure 2 This is a schematic diagram of the internal planar structure of the present invention. Detailed Implementation

[0050] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. These embodiments are implemented under the premise of the technical solution of the present invention. It should be understood that these embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention.

[0051] like Figure 1 As shown in the embodiment, the intelligent cotton impurity detection method based on fan conveying and visual algorithm in this embodiment uses a camera that is triggered by a fixed frequency signal from a lower-level computer to capture images. After the cotton passes through the camera scanning position via the conveying pipe, the image data is sent to the information processing module for processing. The RGB image and polarized image are sent to the industrial control computer 6 for processing. Finally, the processing results are merged and sent to the valve plate to control the spray valve to start and spray out the identified impurities.

[0052] To ensure the image processing module can efficiently handle real-time data streams from both cameras, a dual-thread technique is employed to receive image data streams from each camera separately. Each thread is responsible for data reception and preprocessing for its corresponding camera. The camera's line frequency is 10kHz, and the captured image resolution is 4096*1024, ensuring high detail capture capabilities. After the images are transmitted to the image processing module, a series of preprocessing operations are performed, including image denoising, illumination equalization, and grayscale conversion.

[0053] Preprocessing is performed on the RGB and polarization images. Image intrinsic and extrinsic parameters are obtained through camera calibration. Using geometric transformation methods, the RGB and polarization images are registered to the same coordinate system. Simultaneously, image distortion is corrected, eliminating nonlinear deformations caused by the lens or imaging device. Resolution differences are adjusted to ensure consistent spatial resolution between the RGB and polarization images.

[0054] The registered image is then normalized. The maximum and minimum pixel values ​​for each channel are calculated using the formula:

[0055]

[0056] Pixel values ​​are mapped to the 0, 1 range. Normalization is performed separately for the three RGB channels and the polarization channel. For each pixel (x, y), a weighted fusion of the three RGB channels and the polarization channel is performed. The formula is:

[0057]

[0058] Weights of the three RGB channels: w r ,w g ,w b The weight of the polarization channel: w p The weights satisfy: w r +w g +w b +wp =1, Represents the pixel value of the r channel. Represents the pixel value of the g channel. This represents the pixel value of the b channel.

[0059] The above weighted calculation yields the fused four-channel RGB-P image.

[0060] By setting the in_channels parameter of the first convolutional layer of the YOLOv5 network to 4, YOLOv5 will perform a coarse detection of the mulch film area based on the fused image, and output a coarse result containing the detection box and confidence score.

[0061] The RGB portion of the YOLOv5 detection bounding box is converted to grayscale. Local Binary Pattern (LBP) feature extraction is performed on the converted grayscale image. The grayscale image is divided into several small blocks, and the LBP value of each block is calculated. The extracted LBP features are matched with a pre-defined mulch film texture template. By calculating the similarity between the LBP features and the template, the mulch film area is further confirmed. Finally, a mask is generated to represent the mulch film area.

[0062] When processing RGB images containing drip irrigation tape and woven bags, the image is first converted from the RGB color space to the Lab color space. The RGB to Lab color space conversion typically requires normalizing the RGB values ​​and converting them to the XYZ color space, and then converting them from XYZ to Lab. The specific conversion process is as follows:

[0063]

[0064] Where R, G, BR, G, BR, G, B are the normalized RGB values, and X, Y, Z are the converted XYZ values. Conversion from XYZ to Lab: To convert XYZ space values ​​to Lab space values, use the following formula:

[0065] L * =116·f(Y / Y) n )-16

[0066] a * =500·(f(X / X) n )-f(Y / Y n ))

[0067] b * =200·(f(Y / Y) n )-f(Z / Z n ))

[0068] Where Xn, Yn, Zn are the XYZ values ​​of the reference white point (usually D65), and f(t) is a nonlinear function defined as:

[0069]

[0070] Where L*, a*, and b* represent the brightness, green-red component, and blue-yellow component in the Lab color space, respectively.

[0071] Based on the color characteristics of impurities such as drip irrigation tape and woven bags, an appropriate threshold range is set. Drip irrigation tape, woven bags, and other brightly colored impurities are extracted from the image.

[0072] To further improve detection accuracy, morphological operations are applied to remove noise and refine the detection results. Some small areas may be noise; by setting a minimum area threshold, these irrelevant small areas can be removed, ensuring that the larger impurity areas are retained, thus generating a detection mask for impurities such as drip irrigation tape and woven bags.

[0073] The YOLOv5 deep learning object detection algorithm is used, combined with the EfficientNet backbone network and FPN (Feature Pyramid Network) feature fusion technology to roughly identify foreign fibers in cotton. EfficientNet adjusts the network parameters using the following formula:

[0074] Depth Scaling: d=αd·d0

[0075] Width Scaling: w = αw·w0

[0076] Resolution Scaling: r=αr·r0

[0077] Where d0, w0, and r0 are the initial depth, width, and resolution of the network, and αd, αw, and αr are the scaling factors for each dimension.

[0078] During image feature extraction, EfficientNet employs the MBConv (Mobile Inverted Bottleneck Convolution) module to reduce computational cost. Specifically, the MBConv operation flow is as follows:

[0079] y = Conv1x1(F(x))

[0080] ′=Depthwise Conv(y)

[0081] y = Depthwise Conv(y)

[0082] "'

[0083] y″=Conv1x1(y)

[0084] Where F(x) is the input feature map, which, after passing through an expansion layer and a depthwise separable convolution operation, is compressed to obtain the final output feature map y". The Feature Pyramid Network (FPN) technique is used to fuse features at different scales. The specific mathematical formula is:

[0085] Pl = Conv(Fl) + UpSampling(Pl) +1 )

[0086] Here, Fl represents the original features from layer l, Conv is the convolution operation, UpSampling is the upsampling operation, and Pl is the final fused feature. After detecting the foreign fiber region, YOLOv5 returns a candidate box containing a coarse location of the foreign fiber.

[0087] A Siamese network with MobileNetV2 as the backbone is used to further identify regions within the candidate boxes. MobileNetV2 extracts features from the template and candidate regions, and a global average pooling layer is used to compress the feature maps into low-dimensional feature vectors. The sizes of the candidate box regions and template images are uniformly adjusted to 224×224. The feature vectors fcandidate and ftemplate of the candidate boxes and template are extracted.

[0088] Calculate the similarity between feature vectors using Euclidean distance:

[0089]

[0090] If the similarity is greater than 0.7, the candidate box is considered to be of a different fiber.

[0091] The detection masks for plastic film, drip irrigation tape, and woven bags from the two threads are merged pixel-by-pixel. A logical OR operation is used to fuse all masks, generating a comprehensive detection mask. The fused mask result is output. For spray valve control and impurity removal, the location and area of ​​impurities are determined based on the comprehensive mask result. The triggering timing and duration of the spray valve are calculated based on the cotton conveying speed. The spray valve is triggered to precisely remove impurities from the affected area.

[0092] like Figure 2As shown, the cotton impurity sorting system based on fan conveying and visual algorithms in this embodiment includes a housing 11, an image acquisition module, a multimodal information processing module, a cotton conveying module, and an impurity conveying module. A first LED light source 51, a second LED light source 55, a third LED light source 52, a fourth LED light source 53, a fifth LED light source 56, a sixth LED light source 57, a seventh LED light source 54, and an eighth LED light source 58 are installed on both sides of the cotton conveying pipe. The image acquisition module is located on both sides of the cotton conveying pipe, with two rectangular openings reserved on each side for camera image acquisition. The image acquisition module includes: an RGB camera 21 fixed to a first camera bracket, an RGB camera 32 fixed to a second camera bracket, a polarization camera 23 fixed to a third camera bracket, a polarization camera 42 fixed to a fourth camera bracket, an impurity conveying pipe 9, a finished cotton conveying pipe 8, an automatic spray valve module 7, and a multimodal information processing module industrial control computer 6. The multimodal information processing module industrial control computer 6 is used to execute the algorithm flowchart of a cotton impurity sorting method based on a visual algorithm in this embodiment.

[0093] The first LED light source 51 is installed on the upper left side of the position scanned by the RGB camera, at a 20-degree angle to the vertical direction of the pipe. The second LED light source 55 is installed on the upper right side of the position scanned by the RGB camera, at a 20-degree angle to the vertical direction of the pipe. The third LED light source 52 and the fourth LED light source 53 are installed on the lower left side of the position scanned by the RGB camera, at a 160-degree angle to the vertical direction of the pipe. The fifth LED light source 56 and the sixth LED light source 57 are installed on the lower right side of the position scanned by the RGB camera, at a 160-degree angle to the vertical direction of the pipe.

[0094] The seventh LED light source 54 is installed on the lower left side of the position scanned by the polarization camera, at a 160-degree angle to the vertical direction of the pipe. The eighth LED light source 58 is installed on the lower right side of the position scanned by the polarization camera, at a 160-degree angle to the vertical direction of the pipe. The first and second camera supports are located on the same horizontal line and at the center of the first to eighth light sources within the position scanned by the RGB camera. The third and fourth camera supports are also located on the same horizontal line and at the center of the first to eighth light sources within the position scanned by the polarization camera. To ensure that the images captured by the camera are not affected by external light, the entire image acquisition module is sealed with an opaque aluminum alloy cover.

[0095] The first, second, third, and fourth camera brackets located on both sides of the cotton conveying pipe are in soft contact with the housing 11 to avoid the impact of machine vibration. The covers on both sides of the housing 11 can be opened freely for easy adjustment of the cameras, light sources, etc. The openings reserved on both sides of the cotton conveying pipe for adjusting and measuring wind speed can be opened and closed freely to avoid affecting the wind speed inside the pipe during production.

Claims

1. A method for intelligent detection of cotton impurities based on fan conveying and visual algorithms, characterized in that, Includes the following steps: S1: Simultaneously capture images of cotton using symmetrically arranged RGB and polarization cameras; S2: Transmit the acquired RGB and polarization images to the image processing module; S3: Register and normalize the RGB and polarization images, and generate an RGB-P image through weighted fusion; detect the mulch film area based on an optimized deep learning model and generate a mulch film mask; S4: Convert the RGB image to the Lab color space, filter out the drip irrigation tape and woven bag areas according to the color threshold, and generate the corresponding mask; S5: Use an improved deep learning model combined with a Siamese network to identify foreign fiber regions in cotton and generate a foreign fiber mask; S6: Integrates mulch film mask, drip irrigation tape mask, woven bag mask and foreign fiber mask to generate a comprehensive detection mask; S7: Determine the location and area of ​​impurities based on the comprehensive detection mask, calculate the trigger parameters of the spray valve in combination with the conveying speed, and control the spray valve to accurately remove impurities; The weighted fusion step of S3, which involves combining the RGB image and the polarization image, includes: preprocessing the RGB image and the polarization image; calibrating and geometrically transforming the RGB image and the polarization image to be registered to the same coordinate system; removing distortion and resolution differences; normalizing each channel of the image; and mapping pixel values ​​to the [0,1] interval to ensure consistency in the numerical range of different channels. , Where I represents the original image pixel value, and I′ represents the normalized value. For each pixel (x, y), the weighted fusion formula for the RGB three channels and the polarization channel is: , , , , Weights of the three RGB channels: Weights of polarization channels: The weights satisfy: , Represents the pixel value of the r channel. Represents the pixel value of the g channel. Represents the pixel value of the b channel; In step S5, an optimized deep learning step is used, employing the YOLOv5 deep learning object detection algorithm, combined with the EfficientNet backbone network and FPN feature fusion technology to roughly identify foreign fibers in cotton. EfficientNet adjusts the network parameters using the following formula: , , , in, , , These are the initial depth, width, and resolution of the network. , , It is the scaling factor for each dimension; During image feature extraction, EfficientNet uses the MBConv module to reduce computation. Specifically, the MBConv operation flow is as follows: , , , in, The input feature map is processed through an expansion layer and a depthwise separable convolution operation, and then compressed to obtain the final output feature map. The FPN technique is used to fuse features at different scales. The specific mathematical formula is as follows: , in, It comes from the layer The original characteristics, It's a convolution operation. It is an upsampling operation. It is the final fusion feature; After detecting the foreign fiber region, YOLOv5 returns a candidate box containing the approximate location of the foreign fiber. In step S5, a Siamese network is used to identify smaller foreign fibers among impurities. After the deep learning model detects the location of foreign fibers in the cotton image, a MobileNet V2 Siamese network is used to verify candidate boxes, extract features of regions and templates, and calculate the similarity between feature vectors using Euclidean distance. , If the similarity is greater than 0.7, the candidate box is considered to be of a different fiber type. By optimizing the deep learning process for detecting plastic film, and using the YOLOv5 object detection algorithm, the original network input dimension for RGB three channels is optimized to a network model structure suitable for RGB-P input. YOLOv5 is used to roughly identify areas containing plastic film, and the results including detection boxes and confidence scores are output. The RGB image is converted into a grayscale image, and LBP features are extracted from each small block of the grayscale image. These features are then matched with a preset plastic film texture template to further filter and confirm the plastic film area. Finally, the plastic film mask is generated by combining the YOLOv5 and LBP results.

2. The intelligent cotton impurity detection method based on fan conveying and visual algorithms as described in claim 1, characterized in that, In step S4, the input RGB image is converted from RGB to Lab color space, and the a and b channels are extracted. The values ​​of the a and b channels are different from the background. A threshold range is set to extract the drip irrigation tape and woven bags from the image. Morphological operations are applied to remove noise, optimize the detection results, retain larger impurity areas, and generate a mask for the drip irrigation tape and woven bags.

3. A cotton impurity intelligent detection system based on fan conveying and visual algorithms, characterized in that, The system includes a housing (11), a fan conveying module, a multimodal information acquisition module, an information processing module, and an automatic spray valve module. The multimodal information acquisition module includes symmetrically arranged RGB cameras (21, 32) and polarization cameras (23, 42), as well as a light source (51-58). The information processing module includes an industrial control computer (6) for executing the detection method according to any one of claims 1-2. The automatic spray valve module (7) triggers spraying based on the comprehensive detection mask to remove impurities. The fan conveying module transports cotton through a pipeline and controls the impurity separation path in conjunction with the spray valve module.

4. The intelligent cotton impurity detection system based on fan conveying and visual algorithms according to claim 3, characterized in that, The light sources (51-58) are arranged symmetrically around the observation area, with the RGB camera corresponding to the white background and the polarization camera corresponding to the black background. The RGB camera and the polarization camera synchronously acquire images through an external trigger mode and process the image data in parallel through dual threads.

5. The intelligent cotton impurity detection system based on fan conveying and visual algorithms according to claim 3, characterized in that, The industrial control computer (6) is configured to: register, normalize and fuse RGB images and polarization images; run the improved YOLOv5 model, LBP texture matching algorithm and MobileNet V2 twin network to generate a comprehensive detection mask.

6. The intelligent cotton impurity detection system based on fan conveying and visual algorithms according to claim 3, characterized in that, The spray valve module (7) dynamically adjusts the spray timing and duration according to the cotton conveying speed and the location of impurities.

Citation Information

Patent Citations

  • Distance metric learning-based cotton grading method and device

    CN104408473A

  • Cotton foreign fiber online detection method and system

    CN114419011A