Portable Detection Device and Detection Method for Ginned Cotton Processing Quality Grading
Through the portable lint roller quality grading detection device, a classification model of support vector machine is established using machine vision and image processing technology, which solves the problems of uncertainty and labor intensity of artificial sensory inspection, and realizes accurate and efficient detection of lint roller quality.
Patent Information
- Application Number
- CN202210642907.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-08
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2042-06-08
AI Technical Summary
In the prior art, the assessment of the quality of lint tiller relies on artificial sensory inspection, and there are problems of uncertainty and labor intensity.
A portable cotton rolling machine quality grading detection device is designed. Using machine vision technology and image processing method, the types, numbers and texture characteristics of the defects on the surface of the cotton layer are extracted through double-sided image acquisition and image preprocessing, and a classification and discrimination model of the support vector machine is established to achieve accurate discrimination of rolling machine quality.
It improves the accuracy of rolling workers' quality inspection, reduces labor intensity, realizes the instrumentation of quality grading of cotton rolling workers, and enhances the reliability and efficiency of inspection.
Smart Images

Figure CN114894716B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lint ginning quality detection, and particularly relates to a portable lint ginning quality grading detection device and a detection method. Background Art
[0002] Cotton quality inspection is an important link to ensure cotton quality. Quality inspection includes color grade, ginning quality, length, micronaire value, content of foreign fibers, breaking tenacity, and length uniformity inspection. Among them, ginning quality is a very important index of cotton quality. The quality of ginning directly affects the quality of lint and the quality of yarn, and has a great impact on the textile use value. With the implementation of GB1103.1-2012, ginning quality is taken out as an important quality index and relevant regulations are given for ginning quality. After the seed cotton is processed, according to the roughness of the appearance of the lint, the types and quantities of the contained defects, the ginning quality is divided into three grades: good, medium, and poor, which are represented by P1, P2, and P3 respectively. The physical standard of ginning quality is the basis for evaluating the ginning quality of cotton. The physical standard of ginning quality is the bottom line standard for each grade.
[0003] At present, the evaluation of ginning quality still adopts sensory inspection. During the inspection, the cotton inspector holds the cotton sample to make the surface density of the cotton sample similar to that of the current standard cotton sample, and checks the degree of fiber disorder, the number and nature of defects, etc. of the sample, and compares with the physical standard to determine the grade of ginning quality. However, as a quality evaluation method, relying solely on sensory inspection has certain uncertainties. During the actual inspection process, after the cotton inspector works for a long time, the judgment ability will gradually weaken, which is likely to cause misidentification and lead to errors in the grading of ginning quality. In addition, the labor force is very large when relying on manual sensory inspection. Therefore, it is very necessary to realize the instrumentalization of ginning quality grading inspection.
[0004] Aiming at the problems in the research of existing ginning quality detection devices and methods, this paper designs a portable image acquisition device, and proposes a lint ginning quality grading detection method based on machine vision, which can reduce the labor intensity of cotton inspectors, avoid various instability factors in the inspection process, realize the accurate grading of the ginning quality grade of cotton, and increase the economic benefits of enterprises. Summary of the Invention
[0005] One of the objectives of the present invention is to provide a portable detection device for the quality grading of lint ginning, which is portable, small in size, simple to operate, and has good detection effect. Another objective of the present invention is to provide a detection method for a portable detection device for the quality grading of lint ginning, which uses machine vision technology and image processing methods to grade and inspect the quality of cotton ginning. This method can effectively distinguish the quality grades of cotton ginning, has important reference significance for realizing the instrumentalization of cotton ginning quality grading, can improve the accuracy of ginning quality detection, and reduce labor intensity.
[0006] The technical solution of the present invention is realized as follows:
[0007] A portable detection device for the quality grading of lint ginning, the structure of the detection device mainly includes: a detection box body, a detection box door, a CCD camera and a square light source are respectively arranged at the upper top and the lower bottom inside the box body, a light-transmitting cotton pressing plate, a pull-out light-transmitting drawer, a double-axis ball screw linear guide slide table, and a servo motor are also arranged inside the box body. The structure of the double-axis ball screw linear guide slide table includes: a light axis and a ball screw. The light-transmitting cotton pressing plate is fixedly connected to the box body through a cotton pressing plate connecting piece. The pull-out light-transmitting drawer is connected to the double-axis ball screw linear guide slide table through the light axis and the ball screw. The pull-out light-transmitting drawer is located directly below the light-transmitting cotton pressing plate. The up and down movement of the pull-out light-transmitting drawer is controlled by the servo motor to realize the height adjustment of the pull-out light-transmitting drawer and the adjustment of the pressure between the cotton sample and the light-transmitting cotton pressing plate. The cotton sample to be detected is placed in the pull-out light-transmitting drawer. One group of CCD cameras is directly opposite the light-transmitting cotton pressing plate for collecting the front image of the cotton sample. Another group of CCD cameras is directly opposite the pull-out light-transmitting drawer for collecting the reverse image of the cotton sample. Both groups of CCD cameras are connected to a computer.
[0008] The computer is used for image processing, image data processing and analysis of the collected cotton sample images, and establishing a classification discrimination model to realize the accurate discrimination of the quality of lint ginning.
[0009] Preferably, a handle is arranged on the detection box body, and a sampling port is arranged on the detection box door.
[0010] Specifically:
[0011] I. A portable detection device for the quality grading of lint ginning (hereinafter referred to as the device):
[0012] A portable detection device for the quality grading of lint ginning mainly includes: a sampling port 1, a detection box door 2, a handle 3, CCD cameras 4 and 14, square light sources 5 and 15, a double-axis ball screw linear guide slide table, light axes 6 and 8, a ball screw 7, a cotton pressing plate connecting piece 9, a light-transmitting cotton pressing plate 10, a cotton sample 11, a pull-out light-transmitting drawer 12, a servo motor 13, and a computer 16;
[0013] Its positional connection relationship is as follows:
[0014] Inside the detection box, there are a light-transmitting cotton pressing plate 10, a pull-out light-transmitting drawer 12, optical axes 6 and 8, a ball screw 7, a cotton pressing plate connecting piece 9, and a cotton sample 11; the light-transmitting cotton pressing plate 10 is fixed on both side walls of the detection box; the pull-out light-transmitting drawer 12 is connected to the double optical axis ball screw linear guide slide table through the optical axes 6 and 8 and the ball screw 7, and is located directly below the light-transmitting cotton pressing plate 10. The height adjustment and the pressing force adjustment are realized by controlling its up and down movement; the double optical axis ball screw linear guide slide table is fixed on the rear wall of the detection box; the cotton sample 11 to be detected is placed in the pull-out light-transmitting drawer 12.
[0015] The CCD cameras 4 and 14 are respectively placed at the centers of the square light sources 5 and 15; the CCD camera 4 faces the light-transmitting cotton pressing plate 10 directly and is used to collect the front image of the cotton sample 11; the CCD camera 14 faces the pull-out light-transmitting drawer 12 directly and is used to collect the reverse image of the cotton sample 11; the two CCD cameras 4 and 14 are connected to the computer 16.
[0016] The square light sources 5 and 15 are distributed on the upper and lower walls of the detection box and uniformly irradiate the cotton sample 11 to be measured.
[0017] The portable lint ginning quality grading detection device is characterized in that when collecting images, two symmetrically arranged CCD cameras 4 and 14 are used to collect double-sided images of the cotton sample 11, so as to obtain more characteristic information during the detection process and improve the discrimination accuracy.
[0018] The portable lint ginning quality grading detection device is characterized in that a double optical axis ball screw linear guide slide table is selected, and the cotton pressing action is realized by the up and down movement of the ball screw 7, and at the same time, it is driven by the servo motor 13 to realize the automation of the cotton pressing.
[0019] The portable lint ginning quality grading detection device is characterized in that a pull-out light-transmitting drawer 12 is designed, and the bottom of the drawer is made of transparent glass to realize image collection. At the same time, in order to avoid interference from the outside during the detection process, the detection box door 2 is closed during work, and sampling is realized through the sampling port 1 by using the pull-out light-transmitting drawer 12.
[0020] II. A portable lint ginning quality grading detection method (hereinafter referred to as the method) mainly completes the following work in the present invention:
[0021] a. Collect clear lint images;
[0022] b: Perform image preprocessing on the collected lint images;
[0023] c: Obtain the types and numbers of defects on the surface of the cotton layer;
[0024] d: Obtain the texture features on the surface of the cotton layer;
[0025] e: Establish a classification and discrimination model based on the obtained types and numbers of defects and texture features;
[0026] f: Visualize the detection results and save the results;
[0027] Specifically: A detection method based on the portable lint ginning quality grading detection device described above mainly includes the following steps:
[0028] Step 1: Collect clear lint images:
[0029] Prepare several cotton samples with good, medium, and poor ginning quality ratings in terms of quality and number them in sequence; open the door of the detection box of the detection device, place the weighed cotton samples on the pull-out light-transmitting drawer in sequence according to the numbers, close the door of the detection box, turn on two groups of square light sources, then control the servo motor to start working, push the pull-out light-transmitting drawer upward to a suitable position, compress the cotton samples with the light-transmitting cotton pressing plate, and after compressing to the optimal state, use the computer to control two groups of CCD cameras to collect the front and back images of the cotton samples, and store the images for subsequent image processing; after the image collection is completed, control the servo motor to make the pull-out light-transmitting drawer return to its original position, and replace it with the next cotton sample in sequence to continue the image collection;
[0030] Step 2: Perform image preprocessing on the collected lint images:
[0031] a. Perform corresponding cropping on the collected lint images to remove the interference caused by light source reflection, and make the final picture sizes consistent;
[0032] b. Use the multi-scale homomorphic filtering enhancement algorithm to enhance the lint images, improve the image quality, and increase the contrast between the defects and the lint itself;
[0033] Step 3: Obtain the types and numbers of defects on the surface of the cotton layer:
[0034] Now, according to the differences in the shape and color of the defects, the defect types are divided into defect categories and stubs. Among them, the defect categories include broken seeds, immature seeds, soft seed epidermis, and fiber-bearing seed fragments. The stubs are regarded as a separate category. The methods used are as follows:
[0035] a. For the defect categories, extract the B channel in the RGB color space from the image enhanced by multi-scale homomorphic filtering for feature recognition, and then perform threshold-based image segmentation processing on the obtained B channel image. Determine the optimal threshold through the histogram of the enhanced lint image; after segmentation, use the method of marking connected regions to count the number of defects;
[0036] b. For the stiff sheet type, extract the Y channel, Cb channel, and Cr channel in the YCbCr color space from the original image. Use the method of subtracting the Y channel from the Cb channel to identify the characteristics of the stiff sheet type. Use the method of threshold segmentation to segment the image of the stiff sheet type defects. Perform an opening operation on the segmented image to eliminate edge burrs and avoid misidentification of the target caused by uneven edges. Use a closing operation to fill the internal holes of the detection object and reduce detection errors caused by cotton fiber occlusion in the image. Then, use the method of marking connected regions to count the number of stiff sheets.
[0037] Step 4: Obtain the texture features of the cotton layer surface:
[0038] According to the manifestation of the cotton layer clarity, surface smoothness, cotton layer fluffiness, uniformity, and fiber entanglement degree characteristics on the image, use the gray-level co-occurrence matrix method in the statistical method to extract the texture features of the cotton layer surface. Specifically, read the image and use the gray-level co-occurrence matrix method. Take the mean and standard deviation of the energy, entropy, inertia moment, and correlation obtained as the final texture features.
[0039] Step 5: Establish a classification and discrimination model based on the obtained defect types and numbers, and texture features:
[0040] Use the support vector machine method in the machine learning algorithm to establish a discrimination model for the quality grading of lint ginning. Use the obtained lint texture features and defect numbers as input variables, and use the lint ginning quality grade as the output variable to achieve accurate discrimination of the lint ginning quality.
[0041] Step 6: Visualize and save the detection results:
[0042] Use the GUI interface designed by computer software to visualize the detection results of the lint ginning quality grading and save the results.
[0043] The present invention first prepares a certain mass of cotton samples with good, medium, and poor ginning quality ratings and numbers them in sequence. Open the door 2 of the detection box, place the weighed cotton samples 11 on the pull-out light-transmitting drawer 12 in sequence according to the numbers, close the door 2 of the detection box, turn on the square light sources 5 and 15, and then control the servo motor 13 to start working, pushing the pull-out light-transmitting drawer 12 upward to an appropriate position, compressing the cotton samples 11 with the light-transmitting cotton pressing plate 10. After compressing to the optimal state, use the computer 16 to control the CCD cameras 4 and 14 to collect the front and back images of the cotton samples and store the images. The computer performs a series of processes on the collected images through image processing software, and then uses the programmed procedure to extract and count the texture features, defect types, and numbers on the cotton layer surface. Then, a ginning quality grading model for lint is established using the support vector machine method, with the above-mentioned appearance morphology features and defect numbers of lint as input quantities and the ginning quality grade of lint as the output quantity, so as to accurately discriminate the ginning quality of lint. Finally, the predicted results are visually displayed using the GUI interface designed by matlab and the results are saved.
[0044] The ginning quality in the present invention is defined as: after processing seed cotton, the roughness of the appearance morphology of lint, the types and quantities of defects contained, and the ginning quality is divided into three grades: good, medium, and poor, which are represented by P1, P2, and P3 respectively.
[0045] The portable ginning quality grading detection device of the present invention is mainly used for image acquisition.
[0046] The detection method provided by the present invention is based on the above-mentioned portable ginning quality grading detection device, and the grade of the ginning quality of lint is obtained through the proposed method steps. The basic idea of the method is: (1) obtaining the types and quantities of defects; (2) the texture features on the surface of lint. The two are combined to judge the ginning quality.
[0047] Compared with the prior art, the differences are as follows:
[0048] 1) The methods for extracting the types and quantities of defects are different.
[0049] The detection method of the present invention for feature recognition and counting of defect types and dead stock is:
[0050] a. For defect types (broken seeds, sterile seeds, soft seed epidermis, and fiber - bearing seed fragments), the B channel in the RGB color space is extracted from the image enhanced by the above - mentioned multi - scale homomorphic filtering for feature recognition. Then, threshold - based image segmentation processing is performed on the obtained B - channel image. The optimal threshold is finally determined by observing the histogram of the lint - enhanced image and through repeated attempts. After segmentation, the number of defects is counted by the method of labeling connected regions. b. For the hard - seeded lint types, the Y channel, Cb channel, and Cr channel in the YCbCr color space are extracted from the original image. Through comparison, the method of subtracting the Cb channel from the Y channel is used to identify the features of the hard - seeded lint types. The image segmentation of the hard - seeded lint defects is performed using the above - mentioned method for determining the optimal threshold. The segmented image is subjected to opening operation to eliminate edge burrs and avoid mis - recognition of the target caused by uneven edges. The closing operation is used to fill the internal holes of the detection object and reduce detection errors caused by cotton fiber occlusion in the image. Then, the number of hard - seeded lint is counted by the above - mentioned method of labeling connected regions.
[0051] 2) The methods for judging the ginning quality grade are different.
[0052] The detection method of the present invention uses the support vector machine (SVM) method in the machine learning algorithm to establish a discrimination model for the ginning quality grading of lint. Then, taking the obtained appearance morphology features and the number of defects of the lint as input variables and the ginning quality grade of the lint as the output variable, the accurate discrimination of the ginning quality of the lint is realized.
[0053] Compared with the prior art, to solve the problem that in the process of cotton quality inspection, the ginning quality index of lint depends on the sensory grading of cotton inspectors, the present invention uses machine vision technology and image - processing methods to grade and inspect the ginning quality of lint. The proposed method can effectively discriminate the ginning quality grade of cotton, which has important reference significance for realizing the instrumentalization of the ginning quality grading of lint, can improve the accuracy of ginning quality detection, and reduce the labor intensity. The detection device has the advantages of small volume, simple operation, and good detection effect. Description of the Drawings
[0054] Figure 1 It is a schematic structural diagram of the cotton ginning quality grading detection device described in the present invention;
[0055] Figure 2 It is a flow chart of the cotton ginning quality grading detection method described in the present invention;
[0056] Figure 1As shown in the figure: 1. Sampling port, 2. Inspection box door, 3. Handle, 4. CCD camera I, 5. Square light source I, 6. Optical axis I, 7. Roller screw, 8. Optical axis II, 9. Compressed cotton plate connecting piece, 10. Translucent compressed cotton plate, 11. Cotton sample, 12. Pull-out translucent drawer, 13. Servo motor, 14. CCD camera II, 15. Square light source II, 16. Computer. Detailed implementation method
[0057] The following specifically describes the detailed implementation method of the present invention in conjunction with the attached drawings;
[0058] Example 1:
[0059] As Figure 1 shown, a portable lint ginning quality grading detection device, the detection object is the cotton sample 11, and the detection device is provided with a sampling port 1, an inspection box door 2, a handle 3, CCD cameras 4 and 14, square light sources 5 and 15, a double optical axis ball screw linear guide slide table, including optical axes 6 and 8, ball screw 7, compressed cotton plate connecting piece 9, translucent compressed cotton plate 10, cotton sample 11, pull-out translucent drawer 12, servo motor 13, computer 16.
[0060] Inside the inspection box, there are a translucent compressed cotton plate 10, a pull-out translucent drawer 12, optical axes 6 and 8, a ball screw 7, a compressed cotton plate connecting piece 9, and a cotton sample 11; the translucent compressed cotton plate 10 is fixed on both side walls of the inspection box; the pull-out translucent drawer 12 is connected to the double optical axis ball screw linear guide slide table through optical axes 6 and 8 and ball screw 7, and is directly below the translucent compressed cotton plate 10, and the height adjustment and compression force adjustment are realized by controlling its up and down movement; the double optical axis ball screw linear guide slide table is fixed on the rear wall of the inspection box; the cotton sample 11 to be detected is placed in the pull-out translucent drawer 12.
[0061] The CCD cameras 4 and 14 are respectively placed at the centers of the square light sources 5 and 15; the CCD camera I 4 is directly opposite to the translucent compressed cotton plate 10 and is used to collect the front image of the cotton sample 11; the CCD camera II 14 is directly opposite to the pull-out translucent drawer 12 and is used to collect the reverse image of the cotton sample 11; the two CCD cameras are connected to the computer 16.
[0062] The square light sources 5 and 15 are distributed on the upper and lower walls of the inspection box and uniformly irradiate the cotton sample 11 to be detected.
[0063] Working principle:
[0064] Prepare a certain amount of cotton samples with good, medium, and poor ginning quality ratings and number them in sequence. Open the door 2 of the detection box, place the weighed cotton samples 11 on the pull-out light-transmitting drawer 12 in sequence according to the numbers, close the door 2 of the detection box, turn on the square light sources 5 and 15, and then control the servo motor 13 to start working. Push the pull-out light-transmitting drawer 12 upward to a suitable position, compress the cotton samples 11 with the light-transmitting cotton pressing plate 10. After compressing to the optimal state, use the computer 16 to control the CCD cameras 4 and 14 to collect the front and back images of the cotton samples, and store the images for subsequent image processing. After the image collection is completed, control the servo motor 13 to make the pull-out light-transmitting drawer 12 return to its original position, and replace it with the next cotton sample in sequence to continue the image collection.
[0065] Example 2:
[0066] Compared with Example 1, the difference in this example is that: a handle 3 is provided on the detection box body, and a sampling port 1 is provided on the door 2 of the detection box.
[0067] Example 3:
[0068] As Figure 2 shown, a detection method of the portable lint ginning quality grading detection device based on the weight described, its main working process is:
[0069] a. Collect clear lint images;
[0070] b: Perform image preprocessing on the collected lint images;
[0071] c: Obtain the types and numbers of defects on the cotton layer surface;
[0072] d: Obtain the texture features of the cotton layer surface;
[0073] e: Establish a classification and discrimination model according to the obtained types and numbers of defects and texture features;
[0074] f: Perform visual display of the detection results and save the results;
[0075] More specifically, the detection method of the portable lint ginning quality grading detection device mainly includes the following steps:
[0076] Step 1: Collect clear lint images;
[0077] Prepare a certain amount of cotton samples with good, medium, and poor ginning quality grades and number them in sequence. Use the above portable cotton ginning quality grading detection device to perform image acquisition. Open the door of the detection box of the detection device, place the weighed cotton samples on the pull-out light-transmitting drawer in sequence according to the numbers, close the door of the detection box, turn on two groups of square light sources, and then control the servo motor to start working. Push the pull-out light-transmitting drawer upward to a suitable position, use the light-transmitting cotton pressing plate to compress the cotton samples. After compressing to the best state, use the computer to control two groups of CCD cameras to collect the front and back images of the cotton samples, and store the images for subsequent image processing; after the image acquisition is completed, control the servo motor to make the pull-out light-transmitting drawer return to its original position, and replace the next cotton sample in sequence to continue the image acquisition;
[0078] Step 2: Perform image preprocessing on the collected cotton lint images;
[0079] a. Perform corresponding cropping on the collected cotton lint images to remove the interference caused by light source reflection and other reasons, and make the final picture sizes consistent.
[0080] b. Use the multi-scale homomorphic filtering enhancement algorithm to enhance the cotton lint images, improve the image quality, and increase the contrast between the defects and the cotton lint itself.
[0081] The MSR calculation formula is:
[0082] In formula (1), N is the number of scale parameters
[0083] Step 3: Obtain the types and numbers of defects on the cotton layer surface;
[0084] Now, according to the differences in the shape and color of the defects, the defect types are divided into defect categories and stubs. Among them, the defect categories include broken seeds, immature seeds, soft seed epidermis, and fiber-bearing seed fragments. The stubs are regarded as a separate category. The methods adopted are as follows:
[0085] a. For the defect categories, extract the B channel in the RGB color space from the image enhanced by the above multi-scale homomorphic filtering for feature recognition, and then perform threshold-based image segmentation processing on the obtained B channel image. The optimal threshold is finally determined by observing the histogram of the enhanced cotton lint image and through repeated attempts. After segmentation, use the method of labeling connected regions to count the number of defects.
[0086] b. For the stiff sheet type, extract the Y channel, Cb channel, and Cr channel in the YCbCr color space from the original image, and use the method of subtracting the Y channel from the Cb channel to identify the characteristics of the stiff sheet type. Use the method of threshold segmentation to segment the image of the stiff sheet type defects, perform opening operation on the segmented image to eliminate edge burrs and avoid misidentification of the target caused by uneven edges, and use closing operation to fill the internal holes of the detection object to reduce detection errors caused by cotton fiber occlusion in the image. Then use the above method of marking connected regions to count the number of stiff sheets.
[0087] Step 4: Obtain the texture features on the surface of the cotton layer;
[0088] Adopt the gray-level co-occurrence matrix method in the statistical method to extract the texture features on the surface of the cotton layer. After reading the image and using this method, the mean and standard deviation of energy, entropy, inertia moment, and correlation obtained will be used as the final texture features.
[0089] The relevant formulas for calculating texture parameters such as energy, entropy, inertia moment, and correlation are as follows:
[0090]
[0091]
[0092]
[0093]
[0094] In the above formulas, i and j represent the element gray levels; Dx and Dy represent the position offsets; d is the generation step length; θ is the generation direction
[0095] Step 5: Establish a hierarchical discrimination model based on the obtained defect types and numbers, and texture features;
[0096] Use the support vector machine method in the machine learning algorithm to establish a classification discrimination model for the quality of lint ginning. Take the above-mentioned appearance morphology features and defect numbers of lint as input quantities, and take the quality grade of lint ginning as the output quantity to achieve accurate discrimination of the quality of lint ginning.
[0097] Step 6: Visualize and save the detection results;
[0098] Use the GUI interface designed by MATLAB software to visualize and save the detection results of the quality classification of lint ginning.
Claims
1. A detection method based on a portable lint ginning quality grading detection device, characterized in that it mainly includes the following steps: Step 1: Collect clear lint images: Prepare several cotton samples with good, medium, and poor ginning quality grades in a certain quality and number them in sequence; open the door of the detection box of the detection device, place the weighed cotton samples on the pull-out light-transmitting drawer in sequence according to the numbers, close the door of the detection box, turn on two groups of square light sources, and then control the servo motor to start working, push the pull-out light-transmitting drawer upward to a suitable position, compress the cotton samples with the light-transmitting cotton pressing plate, and after compressing to the best state, use a computer to control two groups of CCD cameras to collect the front and back images of the cotton samples, and store the images for subsequent image processing; after the image collection is completed, control the servo motor to make the pull-out light-transmitting drawer return to its original position, and replace the next cotton sample in sequence to continue image collection; Step 2: Perform image preprocessing on the collected lint images: a. Perform corresponding cropping on the collected lint images to remove the interference caused by light source reflection, and make the final picture sizes consistent; b. Use the multi-scale homomorphic filtering enhancement algorithm to enhance the lint images, improve the image quality, and increase the contrast between defects and the lint itself; Step 3: Obtain the types and numbers of defects on the cotton layer surface: Now, according to the differences in the shape and color of the defects, the defect types are divided into defect categories and stubs. Among them, the defect categories include broken seeds, immature seeds, soft seed epidermis, and fiber-bearing seed fragments. The stubs are regarded as a separate category. The methods used are as follows: a. For the defect categories, extract the B channel in the RGB color space from the image enhanced by multi-scale homomorphic filtering for feature recognition, and then perform threshold-based image segmentation processing on the obtained B channel image to determine the optimal threshold through the histogram of the enhanced lint image; after segmentation, use the method of labeling connected regions to count the number of defects; b. For the stubs, extract the Y channel, Cb channel, and Cr channel in the YCbCr color space from the original image, use the method of subtracting the Y channel from the Cb channel to identify the stub features, use the threshold segmentation method to segment the stub defects in the image, perform opening operation on the segmented image to eliminate edge burrs and avoid misrecognition of the target caused by uneven edges, use closing operation to fill the internal holes of the detection object and reduce the detection errors caused by cotton fiber occlusion in the image, and then use the method of labeling connected regions to count the number of stubs; Step 4: Obtain the texture features of the cotton layer surface: According to the manifestation methods of the cotton layer clarity, surface smoothness, cotton layer fluffiness, uniformity, and fiber entanglement degree characteristics on the image, use the gray-level co-occurrence matrix method in the statistical method to extract the texture features of the cotton layer surface. Specifically, read the image, use the gray-level co-occurrence matrix method, and take the mean and standard deviation of the energy, entropy, inertia moment, and correlation as the final texture features; Step 5: Establish a classification and discrimination model based on the obtained defect types and numbers, and texture features Establish a discriminant model for the quality grading of lint ginning by using the support vector machine method in machine learning algorithms; take the obtained lint texture features and the number of defects as input variables, and take the quality grade of lint ginning as the output variable to achieve accurate discrimination of the quality of lint ginning; Step 6: Visualize and save the detection results: Use the GUI interface designed by computer software to visualize the detection results of the quality grading of lint ginning and save the results; The structure of the detection device mainly includes: a detection box body, a detection box door, a CCD camera and a square light source are respectively provided at the upper top and the lower bottom inside the box body. A light-transmitting cotton pressing plate, a pull-out light-transmitting drawer, a double-axis ball screw linear guide slide table and a servo motor are also provided inside the box body. The structure of the double-axis ball screw linear guide slide table includes: a light axis and a ball screw. The light-transmitting cotton pressing plate is fixedly connected to the box body through a cotton pressing plate connecting piece. The pull-out light-transmitting drawer is connected to the double-axis ball screw linear guide slide table through the light axis and the ball screw. The pull-out light-transmitting drawer is located directly below the light-transmitting cotton pressing plate. The up and down movement of the pull-out light-transmitting drawer is controlled by a servo motor to achieve the height adjustment of the pull-out light-transmitting drawer and the adjustment of the pressure between the cotton sample and the light-transmitting cotton pressing plate. The cotton sample to be detected is placed in the pull-out light-transmitting drawer. One group of CCD cameras is directly opposite the light-transmitting cotton pressing plate for collecting the front image of the cotton sample; the other group of CCD cameras is directly opposite the pull-out light-transmitting drawer for collecting the reverse image of the cotton sample; both groups of CCD cameras are connected to a computer; The computer is used for image processing, image data processing and analysis of the collected cotton sample images, and establishing a classification discriminant model to achieve accurate discrimination of the quality of lint ginning; A handle is provided on the detection box body, and a sampling port is provided on the detection box door.
Citation Information
Patent Citations
System for detecting cotton rolling quality and method for detecting cotton rolling quality based on image
CN103698341A
Seed cotton color grade detection device for seed cotton purchasing link and grading method of seed cotton color grade detection device
CN114486768A