A method for analyzing debris components based on computer vision

Through computer vision technology, combined with pixel confidence and texture characteristics, intelligently selecting cotton handy removal processes has solved the problems of low efficiency and low automation in the existing technology of cotton impurity removal, and achieved efficient and accurate impurity recognition and handy removal processes. choose.

CN118968109BActive Publication Date: 2025-01-10SHAANXI BOYU TEXTILE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411426760.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-14
Publication Date
2025-01-10
Estimated Expiration
2044-10-14

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify complex impurities and select appropriate handy removal processes in the cotton impurity removal process, resulting in low decomposition efficiency and low degree of automation, affecting the quality of textiles.

Method used

Using a computer vision-based method, by constructing a library of handy removal processes, obtaining pixel confidence and texture features of cotton and impurity images, using clustering algorithms to divide impurity and cotton areas, combining the texture features after each handy removal process, and calculating the impurity removal Capability indicators, intelligently select the best process.

Benefits of technology

It improves the accuracy and stability of impurity removal, overcomes the problems of inaccurate identification of complex impurities and inflexible process selection, and greatly improves the efficiency and automation level of impurity removal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968109B_ABST
    Figure CN118968109B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing, and the present invention relates to a method for analyzing impurities based on computer vision, and realizes efficient detection and analysis of cotton impurities through image processing technology. The method first obtains cotton and impurity images after the impurity removal process, grays and pre-processes the images, and then uses an image segmentation algorithm to identify cotton and impurity pixel points. The features of removable impurities and non-removable impurities are extracted based on the pixel value distribution in the image and the texture of the impurities. Finally, the system selects the impurity removal process that is most suitable for the cotton to be impurity-removed through discrimination analysis according to the characteristics of different impurity removal processes. The present invention obtains and analyzes cotton and impurity images through computer vision technology, extracts impurity features, and combines image segmentation and clustering algorithms to realize efficient and accurate cotton impurity removal process selection and optimization, thereby improving production efficiency and quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a method for analyzing debris components based on computer vision. Background Art

[0002] Cotton is an important raw material for the textile industry, but during its picking and transportation, it is often mixed with a variety of impurities. These impurities include physical impurities, such as cottonseed hulls, leaves, soil, metal fragments, etc.; biological impurities, such as insects, eggs, etc.; and fiber impurities, such as broken fibers, cotton debris, etc. Impurity removal is a key step to ensure the purity of cotton and improve the quality of textiles. It usually relies on mechanical, screening, electrostatic and other means to separate impurities of different types and sizes. Existing impurity removal technologies rely on mechanical screening, wind blowing and other means. These methods are not effective when dealing with small or transparent impurities, and are prone to missed detection or false detection. In addition, traditional impurity removal equipment cannot analyze the impurity composition and removal effect in real time, resulting in low efficiency in the production process, and residual impurities in cotton still affect the quality of the final product. At the same time, the existing detection methods with low automation are difficult to achieve fast and accurate impurity identification and analysis when processing large amounts of image data, further limiting quality control in industrial production. With the development of automated production technology, the cotton impurity removal process urgently needs more intelligent and automated detection methods to improve the efficiency and accuracy of impurity removal.

[0003] For example, the Chinese patent application document with publication number CN108961251A discloses a method and system for detecting and identifying defects and impurities in raw cotton, which uses a computer to collect raw cotton images, enhance and improve target images, image segmentation, edge detection, and target image recognition and classification to extract effective feature values, thereby realizing the detection and recognition of defects and impurities contained in raw cotton and improving the detection and recognition accuracy. However, it still has some defects, such as feature recognition is limited by the coverage and quality of the database, and there may be a problem of reduced feature recognition accuracy in complex scenarios. Summary of the invention

[0004] In view of the above-mentioned problem of limited feature recognition, the present invention proposes a method for analyzing impurity components based on computer vision, including: constructing an impurity removal process library, wherein the impurity removal process library includes the serial number of each impurity removal process and the standard texture feature corresponding to each impurity removal process; the standard texture feature is: obtaining the cotton image and the impurity image after each impurity removal process, and taking the ratio of the number of the same pixel value in the cotton image to the number in the impurity image as the cotton pixel confidence of the pixel value; clustering all pixel points in the cotton image based on the cotton pixel confidence, setting a segmentation threshold for the amount of data contained in the cluster, and recording the clusters corresponding to the amount of data less than the segmentation threshold. is an impurity cluster; all the pixels contained in the impurity cluster constitute a first impurity region; the texture feature of the first impurity region is recorded as a first texture feature; the impurity region in the impurity image is identified to obtain a second impurity region, and the texture feature of the second impurity region is recorded as a second texture feature; the first texture feature and the second texture feature together constitute a standard texture feature; the impurity region in the image of the cotton to be cleaned is obtained, and the texture feature is extracted to obtain a third texture feature; the impurity removal ability index of each impurity removal process is obtained according to the difference between the third texture feature and each standard texture feature, and the impurity removal process corresponding to the maximum value of the impurity removal ability index is taken as the starting process.

[0005] The present invention constructs a library of impurity removal processes, combines the pixel confidence and texture features of cotton images and impurity images, uses a clustering algorithm to accurately divide the impurity and cotton areas, and combines the texture features of the impurities that have not been removed and the impurities that have been removed after each impurity removal process to obtain the standard texture features of each impurity removal process. This method compares the texture features of the cotton to be impurity-removed with the standard texture features, intelligently calculates the capability index of each impurity removal process, and finally selects the best process. Compared with traditional impurity removal methods based on thresholds or color segmentation, the present invention improves the precision and stability of impurity removal, overcomes the problems of inaccurate identification of complex impurities and inflexible process selection in the prior art, and greatly improves the efficiency and automation level of impurity removal.

[0006] Furthermore, the cotton pixel confidence is calculated as follows:

[0007]

[0008] Indicates that the pixel value is The cotton pixel confidence of the pixel point; Indicates that the pixel value in the cotton image is The number of pixels; Indicates that the pixel value in the impurity image is The number of pixels; is the tuning factor.

[0009] Furthermore, the method for obtaining the second impurity area is: using the maximum inter-class variance method to obtain the confidence segmentation threshold of the impurity pixel confidence of all pixels in the impurity image; taking the pixel points corresponding to the impurity pixel confidence greater than the confidence segmentation threshold as the impurity pixel points, and all impurity pixel points constitute the second impurity area; the impurity pixel confidence is positively correlated with the neighborhood consistency index, and negatively correlated with the cotton pixel confidence; the neighborhood consistency index is: determining the neighborhood window with any pixel point as the center pixel point, and taking the number of pixels in the neighborhood window with the same pixel value as the center pixel point as the neighborhood consistency index.

[0010] The maximum inter-class variance method is used to segment the impurity region, which can automatically determine the optimal segmentation threshold, avoiding the complexity of traditional manual threshold adjustment and improving segmentation accuracy. The existing technology relies on empirical parameter adjustment when segmenting the impurity region, which has low accuracy. This method improves the degree of automation of detection by optimizing the algorithm.

[0011] Furthermore, the calculation method of the impurity pixel confidence is:

[0012]

[0013] in Represents the pixel point in the impurity image The confidence of impurity pixels; Represents the pixel point in the impurity image Neighborhood consistency index; Indicates that the pixel value in the impurity image is Pixels Cotton pixel confidence.

[0014] Furthermore, the method for obtaining the impurity removal ability index is:

[0015]

[0016]

[0017]

[0018] in represents the difference between the third texture feature and the first texture feature; represents the difference between the third texture feature and the second texture feature; , and Together they represent a third texture feature; , and jointly represent a first texture feature; , , Together they represent a third texture feature; Represents the Dtw distance between two sequences; Represents the impurity removal capability index of impurity removal process number 1.

[0019] Furthermore, obtaining the cotton image and the impurity image after each impurity removal process also includes: using an industrial CCD camera to collect the cotton image and the impurity image after each impurity removal process is completed, and using a bilateral filter and a histogram equalization algorithm to pre-process the two types of images.

[0020] The use of high-definition industrial CCD cameras and image preprocessing technology ensures the high quality and clarity of the collected images. Compared with traditional camera equipment, high-definition CCD cameras have higher resolution and can capture tiny impurities. Combined with filtering and enhancement algorithms, the image processing effect is further improved, which improves the overall detection accuracy.

[0021] Furthermore, all pixels in the cotton image are clustered based on the cotton pixel confidence, and a segmentation threshold of the amount of data contained in the cluster is set, which also includes: clustering the cotton pixel confidence of all pixels in the cotton image using the DBSCAN algorithm, and using the maximum between-class variance method to obtain the segmentation threshold of the amount of data contained in the cluster.

[0022] The DBSCAN clustering algorithm is used to automatically cluster the confidence of cotton pixels. The DBSCAN algorithm can effectively process nonlinear data structures, especially for irregularly shaped areas. Compared with traditional clustering algorithms such as K-means, DBSCAN has obvious advantages in noise processing and automatic determination of cluster numbers, reducing the misclassification of impurities.

[0023] Furthermore, the texture features include: contrast, entropy and LBP feature sequence of gray level co-occurrence matrix.

[0024] By extracting contrast, entropy and LBP features through the gray-level co-occurrence matrix and comprehensively analyzing the texture features of impurities, different types of impurities can be accurately distinguished. The existing technology often relies only on geometric features or colors, while ignoring texture features. The present invention enhances the recognition ability of complex impurities by introducing texture analysis.

[0025] Furthermore, taking the impurity removal process corresponding to the maximum value of the impurity removal capability index as the starting process also includes: in response to the existence of the maximum value of the impurity removal capability index, obtaining the number of the impurity removal process corresponding to the maximum value, and executing the impurity removal processes corresponding to the subsequent numbers in ascending order of the number.

[0026] The technical effects of the present invention are:

[0027] The present invention uses computer vision technology to acquire and analyze cotton and impurity images, extract impurity features, and combine image segmentation and clustering algorithms to achieve efficient and accurate cotton impurity removal process selection and optimization, thereby improving production efficiency and quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0029] Figure 1 is a flowchart schematically showing a method for analyzing debris components based on image processing and computer vision according to an embodiment of the present invention;

[0030] Figure 2 Schematic diagram of the gray scale of cotton trash in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0032] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0033] Example of the method for analyzing debris components based on computer vision:

[0034] like Figure 1 As shown, the computer vision-based debris component analysis method of the present invention includes:

[0035] S1. Obtaining an image of cotton after the impurity removal process and an image of impurities.

[0036] In the cotton production process, impurity removal is a key step to remove impurities mixed in cotton and ensure the purity and quality of cotton. There are many types of impurities in cotton, such as Figure 2 As shown, it usually includes: physical impurities such as leaves, cotton seed hulls, soil, metal fragments, etc.; biological impurities such as insects, insect eggs, etc.; fiber impurities such as fiber fragments and broken fibers remaining in the cotton.

[0037] The impurity removal process is generally divided into multiple steps, each process is dedicated to a specific type or size of impurities, and separates them from cotton through different mechanical and technical means. Common cotton impurity removal methods include: screening impurity removal: using screens with different apertures to separate larger impurities from small particles of impurities; mechanical impurity removal: using mechanical pressure, vibration and other physical methods to separate impurities from cotton; electrostatic impurity removal: using the principle of electrostatic adsorption to separate tiny impurities in cotton; these impurity removal processes are usually carried out in a certain order, and each process focuses on removing different types of impurities to ensure maximum impurity removal during the impurity removal process.

[0038] Since cotton impurity removal usually requires multiple processes, the system can use a high-definition industrial CCD camera to collect images of cotton and impurities after each process. For example, after the first screening and impurity removal process is completed, the camera will take pictures of the removed small particles and at the same time take pictures of the cotton that has undergone preliminary impurity removal. At the same time, in order to ensure that the collected image is clear enough, the system needs to set a good light source in the image acquisition area. In this embodiment, a uniform and stable LED light source can be used.

[0039] Through the above image acquisition steps, each process will generate a cotton-impurity image pair, and all image pairs can be preprocessed using a bilateral filter and a histogram equalization algorithm, and the preprocessed image pairs can be grayed using an average method graying algorithm. So far, three preprocessed and grayed cotton-impurity image pairs are obtained in this embodiment. The above bilateral filter, histogram equalization algorithm, and average method graying algorithm are known technologies and will not be described in detail here.

[0040] The use of high-definition industrial CCD cameras and image preprocessing technology ensures the high quality and clarity of the collected images. Compared with traditional camera equipment, high-definition CCD cameras have higher resolution and can capture tiny impurities. Combined with filtering and enhancement algorithms, the image processing effect is further improved, which improves the overall detection accuracy.

[0041] S2. Obtain cotton pixel points in the cotton image and the segmentation threshold between cotton pixel points and impurity pixel points; obtain impurities that cannot be removed in the impurity removal process based on the cotton pixel points; obtain pixel points belonging to impurities in the impurity image to obtain impurities that can be removed in the impurity removal process; and obtain impurity features of irremovable impurities and removable impurities respectively.

[0042] S201, obtaining the probability that a pixel point in a cotton image is cotton.

[0043] In the process of cotton impurity removal, since all impurities cannot be removed in one process, as the impurity removal process proceeds, the size of the impurities becomes smaller, but the number may also increase, because the larger impurities will be split into pieces during the impurity removal process; and in the impurity removal process, a part of the cotton will be mistakenly removed. Therefore, in the cotton-impurity image pair obtained in step S1, both the cotton image and the impurity image contain cotton and impurities, and the difference is that in the cotton image, cotton accounts for the vast majority, and impurities account for a smaller part; while in the impurity image, impurities account for the majority, and cotton accounts for a smaller part.

[0044] In this embodiment, the probability that a pixel point is cotton can be obtained based on the pixel value distribution probability in the cotton-impurity image pair, which is recorded as the cotton pixel confidence. The specific calculation formula is as follows:

[0045]

[0046]

[0047]

[0048] in Indicates that the pixel value of the pixel in the cotton image is The probability of Indicates that the pixel value of the pixel in the cotton image is the number of and Respectively represent the length and width of the cotton-trash image pair. In this embodiment, the empirical value can be taken as , ; The pixel value of the pixel in the impurity image is The probability of The pixel value of the pixel in the impurity image is the number of Indicates that the pixel value is The probability that the pixel point is cotton, that is, the pixel value is The cotton pixel confidence of the pixel point; is the parameter adjustment factor to prevent When it is 0, an empirical value of 0.001 can be used in this embodiment.

[0049] when The larger the pixel value is, the The pixel point of has a higher probability of appearing in the cotton image in the cotton-trash image pair. Since cotton occupies a large part in the cotton image, the pixel value is The more likely the pixel is to be the pixel corresponding to cotton, the higher the cotton pixel confidence The bigger; when The larger the pixel value is, the The pixel point of has a higher probability of appearing in the impurity image in the cotton-impurity image pair. Since impurities account for the majority of the impurity image, the pixel value is The more likely the pixel is to be the pixel corresponding to impurities, the higher the confidence level of cotton pixels. The smaller.

[0050] S202, obtaining a segmentation threshold between cotton pixel points and impurity pixel points; and obtaining impurities that cannot be removed in the impurity removal process based on the cotton pixel points.

[0051] In the cotton image, because cotton occupies a large part, the pixels corresponding to cotton are relatively concentrated; while in the impurity image, the pixels corresponding to impurities are relatively concentrated. Therefore, in this embodiment, the pixel value distribution within the neighborhood range of each pixel point in the cotton image is calculated to determine the neighborhood consistency index of the pixel point. The specific acquisition method is as follows: for any pixel point in the cotton image, a 5×5 neighborhood window is determined with it as the center, and the number of pixels with the same pixel value as the center pixel point in the neighborhood window is counted, which is recorded as , then for any pixel , and its neighborhood consistency index is:

[0052]

[0053] in Represents any pixel in the cotton image Neighborhood consistency index; Indicated in pixels The determined 5×5 neighborhood window and the pixel point 25 represents the total number of pixels in the neighborhood window in this embodiment.

[0054] In the cotton image, if the neighborhood consistency index of a pixel point is larger, it means that the concentration of pixel values ​​near the pixel point is higher, and the pixel point is more likely to be the pixel point corresponding to cotton. In summary, for any pixel value in the cotton image Pixels , there is cotton pixel confidence And the neighborhood consistency index , which are collectively recorded as the feature pairs of pixels in the cotton image The feature pairs of all pixels in the cotton image are further clustered using the DBSCAN clustering algorithm. In this embodiment, the algorithm input includes the feature pairs of all pixels and hyperparameters. The neighborhood radius in the hyperparameter can be taken as an empirical value. The minimum number of points that can be taken as experience is The output of the algorithm includes the label of the data point, the number of clusters, and the center location of the clusters.

[0055] The DBSCAN clustering algorithm is used to automatically cluster the cotton pixel confidence. The DBSCAN algorithm can effectively process nonlinear data structures, especially for irregularly shaped areas. Compared with traditional clustering algorithms such as K-means, DBSCAN has obvious advantages in noise processing and automatic determination of cluster numbers, reducing the misclassification of impurities.

[0056] After clustering is completed, the clusters with more cluster pixels are more likely to be clusters composed of cotton pixels, while the clusters with fewer pixels are more likely to be clusters composed of impurity pixels. Since the number of cotton pixels is much larger than the number of impurity pixels in the cotton image, the number of data points in the clusters corresponding to cotton and the number of data points in the clusters corresponding to impurities are quite different in the clustering results. The maximum inter-class variance method can be used to obtain the cutting threshold of the number of data points contained in the clusters. , will be greater than the cutting threshold The cluster corresponding to the number of data points is recorded as the cotton pixel cluster; The clusters corresponding to the number of data points are recorded as impurity pixel clusters. Finally, the pixel coordinates corresponding to the data points contained in all impurity pixel clusters are extracted to obtain the impurity regions that cannot be removed in the impurity removal process. In this embodiment, the impurity regions that cannot be removed all refer to the first impurity regions, which will not be described in detail later.

[0057] The maximum inter-class variance method is used to segment the impurity region, which can automatically determine the optimal segmentation threshold, avoiding the complexity of traditional manual threshold adjustment and improving segmentation accuracy. The existing technology relies on empirical parameter adjustment when segmenting the impurity region, which has low accuracy. This method improves the degree of automation of detection by optimizing the algorithm.

[0058] S203, obtaining pixel points belonging to impurities in the impurity image to obtain impurities that can be removed by the impurity removal process.

[0059] For the impurity image in the cotton-impurity image pair, the impurities it contains are impurities that can be removed in the impurity removal process. Since a small amount of cotton may also be separated into the impurities due to the impurity removal process, the impurity image is also divided to obtain the areas corresponding to the impurities that can be removed.

[0060] For any pixel in the impurity image , there is also the cotton pixel confidence obtained in step S201 And the neighborhood consistency index obtained in step S202 , combining the above two characteristic parameters to obtain the confidence of impurity pixels in the impurity image , specifically:

[0061]

[0062] in Represents the pixel point in the impurity image Neighborhood consistency index; Indicates that the pixel value in the impurity image is Pixels Cotton pixel confidence.

[0063] when The larger the value, the more pixels in the impurity image The more pixels in the neighborhood of a pixel have the same value as its pixel, the The more likely it is a pixel in the impurity area, the higher the confidence of the impurity pixel. The bigger; when The smaller the value, the smaller the pixel in the impurity image. The smaller the cotton pixel confidence is, the less likely the pixel is to be a cotton region pixel. The more likely it is a pixel in the impurity area, the higher the confidence of the impurity pixel. Since the impurity pixel confidence of the cotton area pixel in the impurity image is much smaller than the impurity pixel confidence of the impurity area pixel, the maximum inter-class variance method is used here to obtain the segmentation threshold of the impurity pixel confidence of the cotton area pixel and the impurity area pixel , the impurity pixels in the impurity image whose confidence is greater than the segmentation threshold Pixels with a value less than the segmentation threshold are recorded as impurity pixels. The pixel points of are recorded as cotton pixel points, thereby obtaining the impurity region corresponding to the impurities that can be removed by the impurity removal process in the impurity image. In this embodiment, the impurity regions corresponding to the impurities that can be removed all refer to the second impurity region, which will not be described in detail later.

[0064] S204: Obtain impurity characteristics of non-removable impurities and removable impurities.

[0065] In step S202 and step S203, the impurity regions that cannot be removed in the cotton image after the impurity removal process and the impurity regions that can be removed in the impurity image are obtained respectively. The impurity features are extracted in the same way for the above two types of impurity regions. The specific method is as follows:

[0066] First, the closed operation in morphological operation can be used to smooth the impurity area; then the gray level co-occurrence matrix can be used to extract the contrast of the impurity area. and entropy ; Then, the LBP feature extraction algorithm can be used to obtain the texture features of the impurity area to obtain the LBP sequence of the impurity area. Then, for the impurity area that cannot be removed in the cotton image , there is contrast and entropy , and there is an LBP feature sequence ; For the impurity area that can be removed in the impurity image , then , and , so far the characteristic parameters of the two types of impurities are obtained.

[0067] In this embodiment, the texture features corresponding to the impurity regions that cannot be removed all refer to the first texture features, and the texture features of the impurity regions corresponding to the impurities that can be removed all refer to the second texture features, which will not be described in detail later.

[0068] For example, taking three impurity removal processes as an example, for any process , , then there are impurity characteristics respectively: , and as well as , and The above-mentioned closing operation, gray-level co-occurrence matrix and LBP feature extraction algorithm are well-known technologies and will not be described in detail here.

[0069] By extracting contrast, entropy and LBP features through the gray-level co-occurrence matrix and comprehensively analyzing the texture features of impurities, different types of impurities can be accurately distinguished. The existing technology often relies only on geometric features or colors, while ignoring texture features. The present invention enhances the recognition ability of complex impurities by introducing texture analysis.

[0070] S3. Based on the segmentation threshold of step S2, the real-time cotton image to be removed is segmented to obtain the impurity components and obtain the impurity characteristics of the impurity components; based on the distinction between the characteristics of the irremovable and removable impurities in step S2 and the characteristics of the impurity components, the impurity removal capabilities of different impurity removal processes are determined; based on the impurity removal capabilities, the appropriate impurity removal process steps are determined.

[0071] S301, based on the segmentation threshold of step S2, the real-time cotton image to be decontaminated is segmented to obtain impurity components and obtain impurity features of the impurity components.

[0072] In one embodiment, there is a batch of cotton to be cleaned, firstly, the image is taken and pre-processed; in step S202, the segmentation threshold of cotton and impurities in the cotton image is obtained. , since cotton impurity removal in this embodiment requires three different processes, each process will have a segmentation threshold, which are respectively denoted as , and The pre-processed cotton image to be cleaned is clustered according to the neighborhood consistency index obtained in step S202, and the clustering results are segmented according to the three different segmentation thresholds to obtain three different cluster segmentation results, that is, the impurity regions corresponding to the three segmentation thresholds are obtained, which are respectively recorded as , as well as Then for any of the above impurity regions , The impurity characteristics are obtained by the method of step S204, and any impurity region in the cotton image after clustering segmentation is obtained. The characteristics are , and In this embodiment, the texture feature of any of the impurity regions mentioned above refers to the third texture feature, which will not be described in detail later.

[0073] S302, determining the impurity removal capabilities of different impurity removal processes based on the difference between the characteristics of the non-removable and removable impurities in step S2 and the characteristics of the impurity components in step S301.

[0074] In this embodiment, the first process is used as an example: the cotton image to be cleaned is segmented by a threshold value. After processing, the impurity area is obtained , and the impurity characteristics of the two types of impurities in the first process can be obtained through step S204. The impurity characteristics of the first process and the impurity characteristics of the two types of impurities in the first process are combined to obtain the impurity removal ability index of the cotton to be removed in this embodiment in the first process. The specific calculation process is:

[0075]

[0076]

[0077]

[0078] in Indicates impurity area Features and impurity areas that cannot be removed by the first process The degree of distinctiveness; Indicates impurity area Features and impurity areas that can be removed in the first process The degree of distinctiveness; It represents the impurity removal capability index of the first process in processing the cotton to be impurity removed in this embodiment; and Represents the impurity region Impurity region Contrast ratio; and Represents the impurity region Impurity region Entropy of Indicates impurity area LBP sequence and impurity region DTW distance between LBP sequences; and Represents the impurity region Impurity region Contrast ratio; and Represents the impurity region Impurity region Entropy of Indicates impurity area LBP sequence and impurity region The DTW distance between the LBP sequences.

[0079] when The larger the value, the more impurity area The characteristics of the impurity area that cannot be removed by this impurity removal process The greater the difference between the features of The greater the impurity removal ability index is; when The smaller the value, the more impurity area Characteristics and impurity areas that can be removed by this impurity removal process The smaller the difference of the characteristics, that is, the more likely the impurities in this embodiment are to be removed by this process, the first process The greater the impurity removal ability index.

[0080] Use the same method to obtain the impurity area The impurity removal capability index obtained after the second impurity removal process And impurity area The impurity removal capability index obtained after the third impurity removal process So far, the impurity removal ability index of the cotton to be impurity-removed in this embodiment of different impurity removal processes has been obtained. , and .

[0081] S303: Determine appropriate impurity removal process steps based on the impurity removal capability.

[0082] Since the impurity components in different batches of cotton are different, if the same impurity removal process is used for any batch of cotton, it may lead to a decrease in impurity removal efficiency and an increase in the cotton error removal rate. For example, there is a batch of cotton with better overall quality, which contains fewer impurities and smaller impurities. When it is subjected to the first screening and impurity removal process according to the set impurity removal process, the following situations may exist: since the screening and impurity removal process can only remove impurities with larger impurity components, and in this case the impurities contained in the cotton are smaller, not only the overall efficiency of the cotton impurity removal is reduced, but also the effect of impurity removal is not reflected; at the same time, because part of the cotton may be mistakenly removed during the screening and impurity removal, the cotton error removal rate is increased.

[0083] In one embodiment, the possible order of impurity removal capability indicators of different processes is: It can be known that the second process has the strongest impurity removal ability for the cotton to be cleaned in this embodiment. Therefore, the cotton to be cleaned in this embodiment can be directly cleaned from the second process, that is, only the second mechanical impurity removal process and the third electrostatic impurity removal process are performed.

[0084] The present invention constructs a library of impurity removal processes, combines the pixel confidence and texture features of cotton images and impurity images, uses a clustering algorithm to accurately divide the impurity and cotton areas, and combines the texture features of the impurities that have not been removed and the impurities that have been removed after each impurity removal process to obtain the standard texture features of each impurity removal process. This method compares the texture features of the cotton to be impurity-removed with the standard texture features, intelligently calculates the capability index of each impurity removal process, and finally selects the best process. Compared with traditional impurity removal methods based on thresholds or color segmentation, the present invention improves the precision and stability of impurity removal, overcomes the problems of inaccurate identification of complex impurities and inflexible process selection in the prior art, and greatly improves the efficiency and automation level of impurity removal.

[0085] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly defined.

[0086] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A method for analyzing debris components based on computer vision, characterized in that: The method comprises: Construct a de-impurity process library, which includes the numbers of each de-impurity process and the standard texture features corresponding to each de-impurity process; the standard texture features are: Acquire cotton images and impurity images after each impurity removal process, and use the ratio of the number of the same pixel value in the cotton image to the number in the impurity image as the cotton pixel confidence of the pixel value; cluster all pixel points in the cotton image based on the cotton pixel confidence, set a segmentation threshold for the amount of data contained in the cluster, and record the cluster corresponding to the amount of data less than the segmentation threshold as an impurity cluster; all pixel points contained in the impurity cluster constitute a first impurity region; record the texture feature of the first impurity region as a first texture feature; identify the impurity region in the impurity image to obtain a second impurity region, and record the texture feature of the second impurity region as a second texture feature; the first texture feature and the second texture feature together constitute a standard texture feature; The impurity area in the image of the cotton to be cleaned is obtained, and the texture feature is extracted to obtain a third texture feature; the impurity removal ability index of each impurity removal process is obtained according to the difference between the third texture feature and each standard texture feature, and the impurity removal process corresponding to the maximum value of the impurity removal ability index is used as the starting process.

2. The computer vision-based debris component analysis method according to claim 1, characterized in that: The calculation method of the cotton pixel confidence is: ; Indicates that the pixel value is The cotton pixel confidence of the pixel point; Indicates that the pixel value in the cotton image is The number of pixels; Indicates that the pixel value in the impurity image is The number of pixels; is the tuning factor.

3. The computer vision-based debris component analysis method according to claim 1, characterized in that: The method for obtaining the second impurity region is: The confidence segmentation threshold of the impurity pixel confidence of all pixels in the impurity image is obtained using the maximum inter-class variance method; The pixel points corresponding to the impurity pixel confidence points greater than the confidence segmentation threshold are regarded as impurity pixel points, and all the impurity pixel points constitute a second impurity region; The impurity pixel confidence is positively correlated with the neighborhood consistency index and negatively correlated with the cotton pixel confidence; the neighborhood consistency index is: The neighborhood window is determined with any pixel as the center pixel, and the number of pixels in the neighborhood window with the same pixel value as the center pixel is used as the neighborhood consistency index.

4. The computer vision-based debris component analysis method according to claim 3, characterized in that: The calculation method of the impurity pixel confidence is: ; in Represents the pixel point in the impurity image The confidence of impurity pixels; Represents the pixel point in the impurity image Neighborhood consistency index; Indicates that the pixel value in the impurity image is Pixels Cotton pixel confidence.

5. The computer vision-based debris component analysis method according to claim 1, characterized in that: The method for obtaining the impurity removal ability index is: ; ; ; in represents the difference between the third texture feature and the first texture feature; represents the difference between the third texture feature and the second texture feature; , and Together they represent a third texture feature; , and jointly represent a first texture feature; , , jointly represent a second texture feature; Represents the Dtw distance between two sequences; It represents the impurity removal capability index of impurity removal process number 1; and Represents the impurity region Impurity region Contrast ratio; and Represents the impurity region Impurity region Entropy of Indicates impurity area Contrast ratio; Indicates impurity area Entropy of Indicates impurity area LBP sequence and impurity region DTW distance between LBP sequences; Indicates impurity area LBP sequence and impurity region The DTW distance between the LBP sequences.

6. The computer vision-based debris component analysis method according to claim 1, characterized in that: Obtain cotton images and impurity images after each impurity removal process, including: After each impurity removal process, an industrial CCD camera is used to collect cotton images and impurity images, and the two types of images are preprocessed using a bilateral filter and histogram equalization algorithm.

7. The computer vision-based debris component analysis method according to claim 1, characterized in that: Clustering all pixels in the cotton image based on the cotton pixel confidence, and setting a segmentation threshold for the amount of data contained in the cluster, including: The DBSCAN algorithm is used to cluster the cotton pixel confidence of all pixels in the cotton image, and the maximum inter-class variance method is used to obtain the segmentation threshold of the amount of data contained in the cluster.

8. The computer vision-based debris component analysis method according to claim 1, characterized in that: The texture features include: contrast, entropy and LBP feature sequence of gray level co-occurrence matrix.

9. The computer vision-based debris component analysis method according to claim 1, characterized in that: The impurity removal process corresponding to the maximum value of the impurity removal capability index is used as the starting process, including: In response to the existence of a maximum value of the impurity removal capability indicator, the number of the impurity removal process corresponding to the maximum value is obtained, and the impurity removal processes corresponding to the subsequent numbers are sequentially executed according to the increasing number.

Citation Information

Patent Citations

  • Raw cotton defect and impurity detection-identification method and system

    CN108961251A

  • Seed cotton impurity rate detection method based on image analysis

    CN112435235A