Method for monitoring the state of cotton seeds in the lower row of a gin based on image recognition technology

By using image recognition technology to monitor the status of cotton seeds discharged from the bottom of the gin, the inefficiency and instability caused by relying on human experience in existing technologies have been solved, and intelligent control and accurate status feedback of the gin have been achieved.

CN122116272APending Publication Date: 2026-05-29ZHENGZHOU COTTON & JUTE ENG TECH & DESIGN RES INST

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHENGZHOU COTTON & JUTE ENG TECH & DESIGN RES INST
Filing Date
2026-02-12
Publication Date
2026-05-29

Smart Images

  • Figure CN122116272A_ABST
    Figure CN122116272A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on image recognition technology's cotton seed state monitoring method of roller machine lower row, comprising: real-time acquisition of roller machine lower row seed area cotton seed row drop image by industrial camera;Image is preprocessed and feature extraction, and constructs lower row seed state feature model;Real-time extracted feature data are compared and analyzed with lower row seed state feature model;Determine the current working state of roller machine based on comparison result;Output monitoring result and early warning information.The application is through visual detection to the cotton seed row drop of roller machine lower row seed area and the analysis of the feature data of falling cotton seed, feedback roller machine yield, working compartment seed cotton roll and the working state of row seed path, realizes the all-weather, quantifiable, high-precision real-time monitoring of roller machine working state, overcome the strong subjectivity of traditional manual experience judgment, low efficiency, heavy workload, high labor intensity, unable to respond in real time, unable to quantify and other shortcomings.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of cotton processing technology, and in particular to a method for monitoring the state of cotton seeds discharged from a ginning machine based on image recognition technology. Background Technology

[0002] Currently, in cotton processing, the operational status of the cotton gin is a crucial factor in ensuring the efficiency and quality of the production line. Operators currently assess the gin's status by observing the rotation of the seed cotton rolls within the working chamber and the distribution of cotton seeds in the lower seed area, combined with the feel of the cotton rolls to gauge their firmness. This reliance on experience demands a high level of expertise from the operators. However, with changing times, the cotton processing industry is facing a severe labor shortage, with a critical lack of qualified successors.

[0003] Cotton processing production lines have numerous pieces of equipment, and operators cannot constantly monitor the operation of each ginning machine. Coupled with fatigue and negligence, changes in the working status of the ginning machines or abnormalities may not be detected in a timely manner. As a result, operators cannot make timely adjustments and handle the ginning machines, and the efficiency and quality of cotton processing cannot be effectively guaranteed. This may even lead to equipment damage and fires, affecting the smooth progress of cotton ginning production.

[0004] The working principle of a cotton gin is as follows: Figure 3 As shown, the rotation of the saw blade roller 4 causes the saw teeth to shift relative to the seed cotton and hook the seed cotton fibers. Due to the obstruction of the rib row 3, the fibers and cotton seeds are separated. The fibers on the saw teeth are brushed off by the brush roller 9 and enter the lint pipe. At the same time, the cotton seeds are discharged through the seed discharge channel 6 and fall into the cotton seed conveying auger, thus completing the ginning process. Therefore, the state of the cotton seeds discharged from the ginning machine can indirectly reflect the processing and production status of the ginning machine. Summary of the Invention

[0005] The purpose of this invention is to provide a method for monitoring the status of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology. This method can replace manual feedback of the working status of the cotton gin in real time, providing accurate technical data support for the intelligent control of the cotton gin.

[0006] The technical solution adopted in this invention is as follows:

[0007] A method for monitoring the state of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology includes the following steps:

[0008] Step S1: Image Acquisition: Use a camera to acquire real-time images of cotton seeds falling in the lower seed discharge area of ​​the cotton gin;

[0009] Step S2: Image preprocessing: The acquired image is preprocessed to enhance features, and then feature data is extracted from the enhanced image. The feature data includes the number of cotton seeds and the center of the cotton seed outline.

[0010] Step S3: Model Building: Establish a model of the characteristics of the lower row of seeds that correlates with the working state of the cotton gin;

[0011] Step S4: Status determination: Input the real-time extracted feature data into the lower row seed feature model, and compare and analyze to determine the current working status of the cotton gin;

[0012] Step S5: Output the result: Output the working status level and the corresponding warning information.

[0013] The preprocessing in step S2 includes image denoising, enhancement, and segmentation, specifically including the following steps:

[0014] Step S2.1, use cv2.cvtColor to convert the image to grayscale:

[0015] B corresponds to blue, G to green, and R to red;

[0016] Step S2.2: Use cv2.GaussianBlur to perform Gaussian filtering. The basic principle of Gaussian filtering is to perform a weighted average of the values ​​of each pixel in the image based on the values ​​of its surrounding neighboring pixels to remove image noise and smooth the image. Where x and y are the coordinates of the Gaussian convolution kernel relative to the kernel center;

[0017] Step S2.3: Use an adaptive thresholding segmentation algorithm to binarize the image. The core idea of ​​adaptive thresholding segmentation is to divide the image into smaller regions and calculate a specific threshold for each region. In this way, the binarization threshold of each pixel is dynamically calculated instead of being fixed, so that the image can be segmented well under different brightness conditions.

[0018] S2.4 Perform morphological operations on the image obtained in step 2 to eliminate small objects, smooth the boundaries of objects, and fill small holes in foreground objects.

[0019] S2.5, using the `cv2.findContours` function to detect contours: Based on the area of ​​the detected target, two thresholds are set. When the target area is greater than the first threshold, it is recorded as one cotton seed; when the target area is greater than the second threshold, it is recorded as two cotton seeds. The number of cotton seeds is directly identified and calculated. The `cv2.findContours` function returns the pixel coordinates of all key points on each contour edge as a NumPy array. Inputting these contour coordinates into the `cv2.moments` function will obtain the geometric moments of the contour graphic, where `m00` represents the zeroth moment, and `m10` and `m01` represent the first moments of the x-axis and y-axis, respectively. The centroid coordinates of the contour are then calculated.

[0020] Cx=m10 / m00

[0021] Cy=m01 / m00

[0022] Based on the center coordinates of the outline, the target is divided into different regions for statistical analysis. The statistical analysis of different regions is then compared to reflect the uniformity of the falling cotton seeds.

[0023] Step S3, model construction, specifically involves training a classification model using visual detection methods on the characteristic data of cotton seed discharge under normal and abnormal conditions during cotton ginning machine operation. The classification model includes: a model of the correspondence between the amount of seeds discharged per unit time and the processing output, and a model of the uniformity value of the lateral distribution density of the cotton seed flow.

[0024] The model relating seed output per unit time to processing yield is as follows: = , P: Percentage of lint to seed cotton by weight. The percentage of impurities, dust, infertile seeds, and processing losses discharged during cotton ginning process relative to seed cotton. : Thousand-grain weight of raw cottonseeds; N: Number of cottonseeds discharged from the ginning machine per unit time.

[0025] The establishment of the uniformity value model in step S3 includes the following steps:

[0026] Step S3.1: Vertically segment the cotton seeds in the horizontal region of the image, dividing the lower row of seeds into k equal smaller regions: , , ,…, ;

[0027] Step S3.2: Divide the falling cotton seeds into groups based on the center coordinates of the cotton seed outline. , , ,…, Statistical counts for different regions: , , ,…, ;

[0028] Step S3.3, calculate the average number of cotton seeds μ in the k regions, μ= Calculate the standard deviation σ.

[0029] σ= The coefficient of variation (CV) is calculated as follows: CV = ×100%;

[0030] Step S3.4: Classify the uniformity based on the interval where the CV value lies:

[0031] Grade A (Uniform): CV ≤ 10%;

[0032] Grade B (Uneven): 10% < CV ≤ 20%;

[0033] Grade C (Very Uneven): CV > 20%.

[0034] The working states mentioned in step S4 include one or more of the following: normal state, blocked seed discharge channel, blocked rib working point, abnormal seed cotton roll operation, excessive or insufficient cotton feeding, and uneven cotton feeding. The specific judgment process is as follows:

[0035] Step S4.1: First, set the rated production range value, and set the upper limit of the rated production of cotton lint to G. 皮棉max The minimum rated output of cotton is G. 皮棉min When G 皮棉min <G 皮棉 <G 皮棉max If the uniformity is qualified, then the uniformity is judged to be qualified; otherwise, proceed directly to the next step. If the uniformity is qualified, it is judged to be in a normal state; otherwise, proceed to step S4.3. The uniformity threshold is 10%, that is, when the uniformity CV ≤ 10%, the uniformity is considered to be qualified.

[0036] Step S4.2, determine the value of the rated output threshold setting: when G 皮棉 ≥G 皮棉max When G is present, it is determined that the amount of cotton fed is too large; when G 皮棉 ≤G 皮棉min If the cotton feeding amount is too small, an alarm message is generated as the result, and then the cotton feeding amount is adjusted before returning to step S4.1.

[0037] In step S4.3, if the uniformity is not up to standard, the comparison between the uniformity value and the second threshold is continued. The second threshold is 20%. When 10% < CV ≤ 20%, it is judged that the seed discharge channel is blocked or the rib working point is blocked. When CV > 20%, it is judged that the seed cotton roll is abnormally running, and the corresponding alarm information is generated as the result.

[0038] The working status level mentioned in step S5 is divided according to the degree to which the feature data deviates from the normal value, specifically including the following steps:

[0039] Step S5.1, when CV ≤ 10% and uniformity level is A, and < < When the working status is determined to be normal, the working status level is output as level one, and the alarm system displays green, indicating normal operation;

[0040] Step S5.2 When judged as excessive cotton feeding or If the cotton feeding amount is determined to be too small, the output working status level is set to level two, the alarm system displays yellow, indicating that the cotton feeding amount is abnormal and needs to be adjusted.

[0041] Step S5.3: When 10% < CV ≤ 20% and the uniformity level is B, it is determined that the seed discharge channel is blocked or the rib working point is blocked. The output working status level is level three, and the alarm system displays orange, indicating that there is a blockage in the seed discharge channel or the rib working point, which needs to be checked and dealt with.

[0042] Step S5.4: When CV > 20% and the uniformity level is C, it is determined that the seed cotton roll is running abnormally. The output working status level is level four, the alarm system displays red, indicating that the seed cotton roll is running abnormally and needs to be opened for inspection and handling.

[0043] A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the device on which the computer-readable storage medium is located performs the method for monitoring the state of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology.

[0044] An electronic device includes a memory and a processor, wherein the memory stores a program that can run on the processor, and the processor executes the program to implement the method for monitoring the status of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology.

[0045] This invention, through visual monitoring of cotton seed discharge in the lower seed discharge area of ​​the cotton gin and extraction, comparison and analysis of the characteristic data of the falling cotton seeds, can replace manual feedback of the working status of the cotton gin in real time. It solves the problems of strong subjectivity, low efficiency, large workload, high labor intensity, inability to respond in real time and inability to quantify caused by the existing judgment of the working status of the cotton gin relying entirely on manual experience and observation.

[0046] Furthermore, by visually monitoring the cotton seed discharge in the lower seed discharge area of ​​the ginning machine and extracting, comparing and analyzing the characteristic data of the falling cotton seeds, the processing output (efficiency) of the ginning machine can be fed back based on the quantity (efficiency) of the lower seed discharge area, providing a precise data foundation for intelligent control that ensures the stability of the processing output and processing quality of the ginning machine.

[0047] Furthermore, by visually monitoring the cotton seed discharge in the lower seed discharge area of ​​the ginning machine and extracting, comparing and analyzing the characteristic data of the falling cotton seeds, the working status of the ginning machine can be fed back based on the lateral distribution density of the lower seed seed flow. The working status level can be determined in a timely manner, and corresponding early warning information can be issued. This reduces the intensity of manual labor, while also reducing the damage rate of the ginning machine and the occurrence of fires, ensuring the efficient and smooth operation of ginning production. Attached Figure Description

[0048] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a flowchart of the present invention;

[0050] Figure 2 This is a schematic diagram of the structure of the flower-tying machine described in the method of the present invention;

[0051] Figure 3 This is a left view of the flower-tying machine described in this invention;

[0052] Figure 4 This is a schematic diagram of image segmentation in the uniformity model described in this invention.

[0053] In the diagram, 1-cotton gin; 2-working chamber; 3-ribbed rack; 4-saw blade roller; 5-resistance shell ribbed rack;

[0054] 6-Seed row channel; 7-Lower seed row area; 8-Camera; 9-Brush roller; 10-Computer control system; 11-Lower seed row horizontal area. Detailed Implementation

[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0056] like Figure 1 , 2 As shown in Figures 3 and 4, the present invention includes the following steps:

[0057] Step S1: Image acquisition: Use camera 8 to acquire real-time images of cotton seeds falling in the seed discharge area 7 of the cotton gin 1;

[0058] Step S2: Image Processing: The image of the cottonseed arrangement is preprocessed to enhance features and extract feature data including the number of cottonseeds and the coordinates of the cottonseed outline centers; the preprocessing in S2 includes image denoising, enhancement, and segmentation, specifically including the following steps:

[0059] Step S2.1, use cv2.cvtColor to convert the image to grayscale:

[0060] B corresponds to blue, G to green, and R to red;

[0061] Step S2.2: Use cv2.GaussianBlur to perform Gaussian filtering. The basic principle of Gaussian filtering is to perform a weighted average of the values ​​of each pixel in the image based on the values ​​of its surrounding neighboring pixels to remove image noise and smooth the image. Where x and y are the coordinates of the Gaussian convolution kernel relative to the kernel center; In actual use, the grayscale method is not limited to using cv2.cvtColor, and the Gaussian filtering is not limited to using cv2.GaussianBlur. Other methods that can achieve grayscale and Gaussianization are also within the scope of protection of this application, and will not be listed in detail here.

[0062] Step S2.3: Use an adaptive thresholding segmentation algorithm to binarize the image. The core idea of ​​adaptive thresholding segmentation is to divide the image into smaller regions and calculate a specific threshold for each region. In this way, the binarization threshold of each pixel is dynamically calculated instead of being fixed, so that the image can be segmented well under different brightness conditions.

[0063] Step S2.4: Perform morphological operations on the image obtained in step 2 to eliminate small objects, smooth the boundaries of objects, and fill small holes in foreground objects.

[0064] Step S2.5: Use the `cv2.findContours` function to detect contours. Based on the area of ​​the detected target, set two thresholds. When the target area is greater than the first threshold, it is recorded as one cotton seed; when the target area is greater than the second threshold, it is recorded as two cotton seeds. Directly identify and calculate the number of cotton seeds. The `cv2.findContours` function returns the pixel coordinates of all key points on each contour edge as a NumPy array. Inputting these contour coordinates into the `cv2.moments` function will obtain the geometric moments of the contour graphic, where `m00` represents the zeroth moment, and `m10` and `m01` represent the first moments of the x-axis and y-axis, respectively. Thus, the centroid coordinates of the contour are calculated.

[0065] Cx=m10 / m00

[0066] Cy=m01 / m00

[0067] Based on the center coordinates of the outline, the target is divided into different regions for statistical analysis. The statistical analysis of different regions is then compared to reflect the uniformity of the falling cotton seeds.

[0068] Step S3: Model Construction: Establish a model that associates the characteristics of cotton seed discharge with the working state of the cotton gin; wherein the model construction mentioned in S3 is a classification model obtained by training on the feature data of cotton seed discharge under normal and abnormal states of the cotton gin using a visual detection method. The classification model includes:

[0069] A model relating seed discharge rate to processing output per unit time and a model for the uniformity of the lateral distribution density of cottonseed stream. The model relating seed discharge rate to processing output per unit time is as follows: = , P: Percentage of lint to seed cotton by weight. The percentage of impurities, dust, infertile seeds, and processing losses discharged during cotton ginning process relative to seed cotton. : Thousand-grain weight of raw cottonseeds; N: Number of cottonseeds discharged from the ginning machine per unit time.

[0070] The establishment of the uniformity value model includes the following steps:

[0071] Step S3.1: Vertically segment the cotton seeds in the horizontal region of the image, dividing the lower row of seeds into k equal smaller regions: , , ,…, ;like Figure 4 As shown in the figure, k=6;

[0072] Step S3.2: Divide the falling cotton seeds into groups based on the center coordinates of the cotton seed outline. , , ,…, Statistical counts for different regions: , , ,…, ;

[0073] Step S3.3, calculate the average number of cotton seeds μ in the k regions, μ= Calculate the standard deviation σ.

[0074] σ= The coefficient of variation (CV) is calculated as follows: CV = ×100%;

[0075] Step S3.4: Classify the uniformity based on the interval where the CV value lies:

[0076] Grade A (Uniform): CV ≤ 10%;

[0077] Grade B (Uneven): 10% < CV ≤ 20%;

[0078] Grade C (Very Uneven): CV > 20%.

[0079] By comparing the number of cotton seeds in several small areas and combining this with grade classification, we can obtain the uniformity value model.

[0080] Step S4: Status Determination: Input the real-time extracted feature data into the lower seed feature model, and compare and analyze to determine the current working status of the cotton gin; wherein the working status of the cotton gin mentioned in step S4 includes one or more of the following: normal status, excessive or insufficient cotton feeding, blocked seed discharge channel, blocked rib working point, and abnormal operation of seed cotton roll.

[0081] The specific judgment process is as follows:

[0082] Step S4.1: First, set the rated production range value, and set the upper limit of the rated production of cotton lint to G. 皮棉max The minimum rated output of cotton is G. 皮棉min When G 皮棉min <G 皮棉 <G 皮棉max If the uniformity is qualified, then the uniformity is judged to be qualified; otherwise, proceed directly to the next step. If the uniformity is qualified, it is judged to be in a normal state; otherwise, proceed to step S4.3. The uniformity threshold is 10%, that is, when the uniformity CV ≤ 10%, the uniformity is considered to be qualified.

[0083] Step S4.2, determine the value of the rated output threshold setting: when G 皮棉 ≥G 皮棉max When G is present, it is determined that the amount of cotton fed is too large; when G 皮棉 ≤G 皮棉min If the cotton feeding amount is too small, a corresponding feeding adjustment alarm message is generated as the result. Then, the corresponding cotton feeding amount is adjusted and the process returns to step S4.1.

[0084] In step S4.3, if the uniformity is not up to standard, the comparison between the uniformity value and the second threshold is continued. The second threshold is 20%. When 10% < CV ≤ 20%, it is determined that the seed discharge channel is blocked or the rib working point is blocked. When CV > 20%, it is determined that the seed cotton roll is abnormally running, and the corresponding alarm information is generated as the result.

[0085] S5: Output Results: Output the working status level and corresponding warning information. Specifically, 1. When CV ≤ 10% and uniformity level is A, and... < < When the operating status is determined to be normal, the operating status level is set to Level 1, and the alarm system displays green, indicating normal operation; 2. When judged as excessive cotton feeding or 1. If the cotton feed rate is too low, the output working status level is level 2, the alarm system displays yellow, indicating an abnormal cotton feed rate that needs to be adjusted; 2. If 10% < CV ≤ 20% and the uniformity level is B, the output working status level is level 3, the alarm system displays orange, indicating a blockage in the cotton feed channel or rib working point that needs to be checked and addressed; 3. If CV > 20% and the uniformity level is C, the output working status level is level 4, the alarm system displays red, indicating an abnormal cotton lap operation that needs to be checked and addressed.

[0086] like Figure 2 As shown, the seed discharge area 7 under the ginning machine 1 includes the entire transverse seed discharge area from the seed discharge channel 6 of the ginning machine 1 to the point where the cotton seeds leave the ginning machine 1 and fall into the seed conveying auger under the ginning machine 1.

[0087] like Figure 2 As shown, the present invention provides a method for monitoring the status of cotton seeds in the lower row of a cotton gin based on image recognition technology. The method is implemented on the cotton gin and includes a camera 8 and a computer control system 10. The computer control system 10 includes an image processing module, a lower row seed feature model module, and a cotton gin status determination module.

[0088] like Figure 3As shown, the camera 8 is located in the middle of the lower seed row transverse area 11 inside the lower working chamber 2 of the cotton gin 1. When the lower seed row transverse area 11 of a large cotton gin is wide, multiple cameras 8 can be evenly distributed in the lower seed row transverse area 11 to completely cover the lower seed row transverse area 11. Rib racks 3, saw blade rollers 4, and baffle rib racks 5 are respectively set on both sides of the seed discharge channel 6; the outlet of the seed discharge channel 6 is set as the lower seed row area 7; the brush roller 9 is used to clean the saw blade roller 4; and the computer control system 10 is used to control the start and stop status of the above components.

[0089] This invention utilizes a camera to acquire real-time images of cotton seeds being discharged in the lower seed discharge area of ​​a cotton gin, extracts the characteristic data of the cotton seed discharge, establishes a lower seed discharge feature model, and then uses the lower seed discharge feature model to compare and analyze the real-time images of cotton seeds being discharged from the cotton gin, thereby determining the working status of the cotton gin and providing precise technical data support for the intelligent control of the cotton gin.

[0090] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.

[0091] Existing methods for judging the working status of cotton gins rely entirely on manual observation and experience, leading to problems such as high subjectivity, low efficiency, large workload, high labor intensity, inability to respond in real time, and inability to quantify. This paper proposes a method for monitoring the status of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology. This method involves visual detection of cotton seed discharge in the bottom area of ​​the cotton gin and extraction, comparison, and analysis of the characteristic data of the falling cotton seeds.

[0092] A computer-readable storage medium stores a computer program thereon. When executed by a processor, the computer program causes the device containing the computer-readable storage medium to perform the monitoring method for the state of cotton seeds discharged from a cotton gin based on image recognition technology, as described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory, and other memories.

[0093] An electronic device includes a memory and a processor, wherein the memory stores a program that can run on the processor, and the processor executes the program to implement the monitoring method for the status of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology as described above.

[0094] If the modules / units integrated in the electronic device described in this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can also be implemented by a computer program instructing related hardware devices. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above.

[0095] Furthermore, the computer-readable storage medium may primarily include a stored program area and a stored data area, wherein the stored program area may store the operating system, an application program required for at least one function, etc.; and the stored data area may store data created based on the use of blockchain nodes, etc.

[0096] The computer-readable storage medium stores computer-readable instructions, which are executed by a processor in an electronic device to implement the method for monitoring the status of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology as described in any of the above embodiments.

[0097] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0098] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0099] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

[0100] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification and claims of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such process, method, product, or device.

[0101] Note that the above description is merely a preferred embodiment and application of the technical principles of the present invention. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the specific embodiments described herein, and may include many other effective embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for monitoring the state of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology, characterized in that: Includes the following steps: Step S1: Image Acquisition: Use a camera to acquire real-time images of cotton seeds falling in the lower seed discharge area of ​​the cotton gin; Step S2: Image preprocessing: The acquired image is preprocessed to enhance features, and then feature data is extracted from the enhanced image. The feature data includes the number of cotton seeds and the center of the cotton seed outline. Step S3: Model Building: Establish a model of the characteristics of the lower row of seeds that correlates with the working state of the cotton gin; Step S4: Status determination: Input the real-time extracted feature data into the lower row seed feature model, and compare and analyze to determine the current working status of the cotton gin; Step S5: Output the result: Output the working status level and the corresponding warning information.

2. The method for monitoring the state of cotton seeds discharged from a cotton gin based on image recognition technology according to claim 1, characterized in that, The preprocessing in step S2 includes image denoising, enhancement, and segmentation, specifically including the following steps: Step S2.1, use cv2.cvtColor to convert the image to grayscale: B corresponds to blue, G to green, and R to red; Step S2.2: Use cv2.GaussianBlur to perform Gaussian filtering. The basic principle of Gaussian filtering is to perform a weighted average of the values ​​of each pixel in the image based on the values ​​of its surrounding neighboring pixels to remove image noise and smooth the image. Where x and y are the coordinates of the Gaussian convolution kernel relative to the kernel center; Step S2.3: Use an adaptive thresholding segmentation algorithm to binarize the image. The core idea of ​​adaptive thresholding segmentation is to divide the image into smaller regions and calculate a specific threshold for each region. S2.4 Perform morphological operations on the image obtained in step 2 to eliminate small objects, smooth the boundaries of objects, and fill small holes in foreground objects. S2.5, using the `cv2.findContours` function to detect contours: Based on the area of ​​the detected target, two thresholds are set. When the target area is greater than the first threshold, it is recorded as one cotton seed; when the target area is greater than the second threshold, it is recorded as two cotton seeds. The number of cotton seeds is directly identified and calculated. The `cv2.findContours` function returns the pixel coordinates of all key points on each contour edge as a NumPy array. Inputting these contour coordinates into the `cv2.moments` function will obtain the geometric moments of the contour graphic, where `m00` represents the zeroth moment, and `m10` and `m01` represent the first moments of the x-axis and y-axis, respectively. The centroid coordinates of the contour are then calculated. Cx=m10 / m00 Cy = m01 / m00.

3. The method for monitoring the state of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology according to claim 1, characterized in that, Step S3, model construction, specifically involves training a classification model using visual detection methods on the characteristic data of cotton seed discharge under normal and abnormal conditions during cotton ginning machine operation. The classification model includes: a model of the correspondence between the amount of seeds discharged per unit time and the processing output, and a model of the uniformity value of the lateral distribution density of the cotton seed flow.

4. The method for monitoring the state of cotton seeds discharged from a cotton gin based on image recognition technology according to claim 1, characterized in that, The model relating seed output per unit time to processing yield is as follows: = , P: Percentage of lint to seed cotton by weight. The percentage of impurities, dust, infertile seeds, and processing losses discharged during cotton ginning process relative to seed cotton. : 1000-grain weight of cottonseed; N: The number of cotton seeds discharged from the cotton gin per unit time.

5. The method for monitoring the state of cotton seeds discharged from a gin based on image recognition technology according to claim 1, characterized in that, The establishment of the uniformity value model in step S3 includes the following steps: Step S3.1: Vertically segment the cotton seeds in the horizontal region of the image, dividing the lower row of seeds into k equal smaller regions: , , ,…, ; Step S3.2: Divide the falling cotton seeds into groups based on the center coordinates of the cotton seed outline. , , ,…, Statistical counts for different regions: , , ,…, ; Step S3.3, calculate the average number of cotton seeds μ in the k regions, μ= Calculate the standard deviation σ. σ= ; The coefficient of variation (CV) is calculated, CV = ×100%; Step S3.4: Classify the uniformity based on the interval where the CV value lies: Grade A (Uniform): CV ≤ 10%; Grade B (Uneven): 10% < CV ≤ 20%; Grade C (Very Uneven): CV > 20%.

6. The method for monitoring the state of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology according to claim 1, characterized in that, The working states mentioned in step S4 include one or more of the following: normal state, blocked seed discharge channel, blocked rib working point, abnormal seed cotton roll operation, excessive or insufficient cotton feeding, and uneven cotton feeding. The specific judgment process is as follows: Step S4.1: First, set the rated production range value, and set the upper limit of the rated production of cotton lint to G. 皮棉max The minimum rated output of cotton is G. 皮棉min When G 皮棉min <G 皮棉 <G 皮棉max If the uniformity is qualified, then the uniformity is judged to be qualified; otherwise, proceed directly to the next step. If the uniformity is qualified, it is judged to be in a normal state; otherwise, proceed to step S4.

3. The uniformity threshold is 10%, that is, when the uniformity CV ≤ 10%, the uniformity is considered to be qualified. Step S4.2, determine the value of the rated output threshold setting: when G 皮棉 ≥G 皮棉max When G is present, it is determined that the amount of cotton fed is too large; when G 皮棉 ≤G 皮棉min If the cotton feeding amount is too small, an alarm message is generated as the result, and then the cotton feeding amount is adjusted before returning to step S4.

1. In step S4.3, if the uniformity is not up to standard, the comparison between the uniformity value and the second threshold is continued. The second threshold is 20%. When 10% < CV ≤ 20%, it is determined that the seed discharge channel is blocked or the rib working point is blocked. When CV > 20%, it is determined that the seed cotton roll is abnormally running, and the corresponding alarm information is generated as the result.

7. The method for monitoring the state of cotton seeds discharged from a cotton gin based on image recognition technology according to claim 1, characterized in that, The working status level mentioned in step S5 is divided according to the degree to which the feature data deviates from the normal value, specifically including the following steps: Step S5.1, when CV ≤ 10% and uniformity level is A, and < < When the working status is determined to be normal, the working status level is output as level one, and the alarm system displays green, indicating normal operation; Step S5.2 When judged as excessive cotton feeding or If the cotton feeding amount is determined to be too small, the output working status level is set to level two, the alarm system displays yellow, indicating that the cotton feeding amount is abnormal and needs to be adjusted. Step S5.3: When 10% < CV ≤ 20% and the uniformity level is B, it is determined that the seed discharge channel is blocked or the rib working point is blocked. The output working status level is level three, and the alarm system displays orange, indicating that there is a blockage in the seed discharge channel or the rib working point, which needs to be checked and dealt with. Step S5.4: When CV > 20% and the uniformity level is C, it is determined that the seed cotton roll is running abnormally. The output working status level is level four, the alarm system displays red, indicating that the seed cotton roll is running abnormally and needs to be opened for inspection and handling.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it causes the device containing the computer-readable storage medium to perform the monitoring method for the status of cotton seeds discharged from the bottom of the ginning machine based on image recognition technology as described in any one of claims 1-7.

9. An electronic device, characterized in that, include: The device includes a memory and a processor, wherein the memory stores a program that can run on the processor, and the processor executes the program to implement the method for monitoring the status of cotton seeds discharged from the bottom of a cotton gin based on image recognition technology as described in any one of claims 1-7.