A method and system for detecting the quality of powder grinding
By segmenting and clustering the powder image, the canny operator threshold is dynamically adjusted, which solves the problem of inaccurate detection of the lower ore edges and improves the accuracy of ore particle detection.
Patent Information
- Application Number
- CN202510490014.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-04-18
AI Technical Summary
In traditional ore particle detection methods, the edges of the lower ore particles are easily blocked by the upper ore, resulting in the problem of low detection accuracy.
By segmenting the powder image into tiles, building grayscale feature vectors and clustering, calculating the upper and lower thresholds of the canny operator are dynamically adjusted to improve edge detection accuracy.
It reduces the loss of the lower ore edges and improves the accuracy of ore particle detection.
Smart Images

Figure CN120031868B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and particularly to a method and system for detecting the quality of powder grinding. Background Art
[0002] In the ore processing industry, in order to extract valuable components from ores, the ores need to be crushed and ground. Only when the particle size of the ores reaches a certain level can the effective components in the ores be fully extracted. Therefore, the particle size of the ground ore powder is an important indicator in the grinding process. To ensure the quality of ore powder grinding, it is necessary to detect the ore powder during the grinding process. The traditional detection method is the laboratory sampling detection method, which requires manual sampling multiple times and detecting the samples in the laboratory. This method not only consumes a large amount of human resources but also has a low detection efficiency. Therefore, image processing detection technology has gradually been applied to the process of ore powder grinding. For example, a method for evaluating the crushing effect of ores based on image processing disclosed in the patent application document with the publication number CN116823827A; it mainly includes the following steps: obtaining a grayscale image of the ore, generating an ore shape image through a particle detection algorithm, performing segmentation processing on the ore shape image to generate an ore particle image, and then the crushing effect of the ore can be evaluated.
[0003] The common canny edge detection algorithm can be applied to the extraction step of the ore shape image. The canny algorithm mainly includes the steps of calculating the pixel point gradient, presetting high and low thresholds; and screening the pixel points according to the pixel point gradient and the thresholds. In the process of ore detection, there is usually a stacking phenomenon of ore materials. According to the position of the ore particles, the ore particles can be divided into upper-layer ores located on the surface of the material pile and lower-layer ore particles located in the lower layer. The lower-layer ore particles are usually affected by the upper-layer particles. For example, the light shielding from the upper-layer ores results in a smaller change in the edge grayscale of the lower-layer ore particles, which in turn leads to the loss of the edges of the lower-layer ore particles and ultimately results in low accuracy of ore particle detection. Summary of the Invention
[0004] To solve the problem of low accuracy in ore particle detection, this application provides a method and system for detecting the quality of powder grinding.
[0005] In a first aspect, this application provides a method for detecting the quality of powder grinding, adopting the following technical solution:
[0006] A method for detecting the grinding quality of powder materials includes the steps of: collecting powder material images, segmenting the powder material images to form multiple tiles; constructing gray feature vectors of each tile, performing clustering processing on each tile to obtain multiple classification clusters; calculating the upper-layer probability of each clustering cluster as the upper-layer ore, and determining the upper adjustment coefficient and the lower adjustment coefficient of each clustering cluster; determining the optimal upper threshold and the optimal lower threshold of the canny operator based on the upper adjustment coefficient and the lower adjustment coefficient, and using the canny operator to perform edge detection on the tiles in each clustering cluster to determine whether the powder materials are qualified;
[0007] The calculation formula for the upper-layer probability of the clustering cluster is:
[0008] ; In the formula, represents the upper-layer probability of the th clustering cluster; represents the mean value of the overall gray level of all tiles in the th clustering cluster; represents the mean value of the global deviation of all tiles in the th clustering cluster; represents the mean value of the internal contrast of all tiles in the th clustering cluster; represents the logarithmic function with the natural constant as the base; is the linear normalization function.
[0009] First, the powder material image is segmented into multiple tiles, and then the tiles are clustered to form clustering clusters with approximate features. Calculate the probability that each clustering belongs to the upper-layer ore, and adjust the upper threshold of the canny operator through the probability that each clustering cluster belongs to the upper-layer ore to obtain the optimal upper threshold, and at the same time adjust the lower threshold to obtain the optimal lower threshold. The upper-layer ore usually has the characteristic of a large edge gradient amplitude. Therefore, when using canny for edge extraction of the upper-layer ore, the upper threshold of the canny operator can be increased. Since the lower-layer ore is affected by the upper-layer ore, the amplitude of its edge is relatively reduced compared to the edge of the upper-layer ore. Therefore, the conditions for screening edge pixels can be relaxed. In this application, the upper and lower thresholds in the process of edge extraction by the canny operator are dynamically adjusted according to the upper-layer probability corresponding to each clustering cluster. On the one hand, it can reduce the situation where high-saturation areas in the powder material image are misjudged as edge pixels. On the other hand, the edge pixel screening conditions can be automatically relaxed for the edges of the lower-layer ore, thereby reducing the loss of the edges of the lower-layer ore and improving the accuracy of ore particle detection.
[0010] Optionally, the calculation steps for the overall gray level of the tile include obtaining the gray level value of each pixel point in the tile; using the mean value of the gray level values of all pixel points in the tile as the overall gray level of the tile.
[0011] Calculate the average gray value of all pixels in the tile, so as to obtain the overall gray value that can reflect the gray level of the entire tile.
[0012] Optionally, the calculation formula for the internal contrast of the tile is:
[0013] ; represents the internal contrast in the th tile; represents the total number of pixel points in the th tile; represents the pixel point ordinal number; represents the th gray value of the th pixel point in the th tile; represents the average gray value of all pixel points in the th tile;
[0014] represents the difference between any pixel in the tile and the overall gray value of the tile. The larger this difference is, the more discrete the gray data of each pixel point in the tile is. The edge of the upper ore is clear and the light and dark changes are drastic. If the tile is the upper ore, it is manifested as the gray values of each pixel point in the tile being relatively discrete. Therefore, the internal contrast of the tile calculated in this formula helps to distinguish whether the tile is in the upper ore.
[0015] Optionally, the calculation formula for the internal contrast of the tile is:
[0016] ; represents the internal contrast in the th tile; represents the total number of pixel points in the th tile; represents the pixel point ordinal number; represents the th gray value of the th pixel point in the represents the th average gray value of all pixel points in the th tile;
[0017] The absolute value calculation is introduced in this formula, the calculation is relatively simple, the calculation efficiency is fast, and it can be applied to the environment with high requirements for calculation efficiency.
[0018] Optionally, the calculation steps for the global deviation of the tile include: obtaining the gray values of all pixel points in the powder image and calculating the average value to obtain the global gray value; taking the difference between the overall gray value of the tile and the global gray value as the global deviation.
[0019] Optionally, the feature vector includes: the overall grayscale of the patch, the global grayscale of the patch, and the internal contrast of the patch.
[0020] The eigenvalues in multiple dimensions jointly form a feature vector, which is used as a metric in the subsequent clustering process to comprehensively consider the features of multiple aspects of the patch, thereby improving the accuracy of the clustering result, providing effective data support for subsequent calculations, and further contributing to improving the accuracy of the edge detection result.
[0021] Optionally, the iterative self-organizing clustering algorithm is used to cluster the patches with the feature vector as the metric.
[0022] Optionally, the method of superpixel segmentation is used to segment the powder material image.
[0023] Optionally, in the step of calculating the upper adjustment coefficient and the lower adjustment coefficient of each clustering cluster according to the upper layer probability, the calculation formula of the upper adjustment coefficient is: , where represents the upper adjustment coefficient of the th clustering cluster; represents the upper layer probability of the th clustering cluster;
[0024] The calculation formula of the lower adjustment coefficient is: , where represents the lower adjustment coefficient of the th clustering cluster; represents the upper layer probability of the th clustering cluster.
[0025] Determine the upper adjustment coefficient and the lower adjustment coefficient according to the upper layer probability. When the upper layer probability changes, the upper adjustment coefficient and the lower adjustment coefficient calculated in the formula change correspondingly, so as to dynamically adjust the upper threshold and the lower threshold of the canny algorithm.
[0026] In a second aspect, the present application provides a powder material grinding quality detection system, adopting the following technical solution:
[0027] A powder material grinding quality detection system includes a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, the above-mentioned powder material grinding quality detection method is implemented.
[0028] Generate a computer program for the above-mentioned powder material grinding quality detection method and store it in the memory to be loaded and executed by the processor. Thus, a system is made according to the memory and the processor, which is convenient to use.
[0029] The present application has the following technical effects: the powder image is segmented into multiple tiles, and the tiles are clustered. By calculating the upper probabilities of different clustering clusters, the upper adjustment coefficient and the lower adjustment coefficient suitable for each clustering cluster can be calculated. When the canny algorithm extracts the edges of the tiles in each clustering cluster, the upper threshold of the canny algorithm is specifically adjusted by the upper adjustment coefficient of each clustering cluster, and the lower threshold of the canny algorithm is specifically adjusted according to the lower adjustment coefficient of each clustering cluster, so that thresholds more suitable for extracting the edges of the upper-layer ore or the lower-layer ore can be obtained, the situation of missing the edges of the lower-layer ore can be reduced, the accuracy of edge extraction by the canny operator can be improved, and further the accuracy of ore detection can be improved. Description of the Drawings
[0030] Figure 1 is the flowchart of a method for detecting the quality of powder grinding in an embodiment of the present application.
[0031] Figure 2 is the flowchart of step S1 of a method for detecting the quality of powder grinding in an embodiment of the present application. Detailed Embodiments
[0032] An embodiment of the present application discloses a method and a system for detecting the quality of powder grinding, which segment a powder image of an ore to form multiple tiles. After clustering the tiles, clustering clusters are formed, and the upper probability that each clustering cluster belongs to the upper-layer ore is calculated. Based on the upper probability of the clustering cluster, the optimal upper threshold and the optimal lower threshold of each clustering cluster are calculated, and the canny algorithm extracts edges based on the optimal upper threshold and the optimal lower threshold of each clustering cluster. In this process, the optimal upper threshold and the optimal lower threshold in the canny algorithm are automatically adjusted under the action of the upper probability of each clustering cluster, so as to reduce the situation of missing the edges of the lower-layer ore particles and improve the accuracy of ore particle detection.
[0033] Referring to Figure 1 , the method for detecting the quality of powder grinding includes steps S1 - S3.
[0034] Step S1: Collect a powder image, segment the powder image to form multiple tiles;
[0035] Use an image acquisition device in cooperation with a telephoto macro lens to obtain a macro image of ore particles, and perform grayscale processing on the macro image of ore particles to obtain a powder image. By performing grayscale processing on the image, the workload of subsequent calculations is reduced and the calculation efficiency is improved.
[0036] Use an image segmentation algorithm to segment the powder image to form tiles, and the gray values of the pixels in the tiles are similar. In this embodiment, the superpixel segmentation method is used to segment the powder image. In other embodiments, the image can also be segmented by the region growing method.
[0037] Step S1: Construct the grayscale feature vectors of each tile, perform clustering processing on each tile, and obtain multiple classification clusters;
[0038] Refer to Figure 2 , step S1 includes steps S11 - S15;
[0039] S11: Calculate the overall grayscale of the tile;
[0040] Obtain the grayscale values of the pixel points in the tile, and use the mean of the grayscale values of all pixel points in the tile as the overall grayscale of the tile.
[0041] S12: Calculate the internal contrast of the tile;
[0042] In one embodiment, the calculation formula for the internal contrast is:
[0043] ;
[0044] In the formula, represents the internal contrast of the th tile; represents the total number of pixel points in the th tile; represents the pixel point ordinal number; represents the th pixel point in the th tile; represents the th tile; represents the mean grayscale value of all pixel points in the
[0045] represents the difference between the grayscale value of any pixel point in the tile and the mean grayscale value of the pixel points in the tile. Accumulate the differences between the grayscale values of each pixel point in the tile and the mean grayscale value of the pixel points in the tile. The larger the accumulated value, the greater the difference in the grayscale values of the pixel points in the tile and the higher the internal contrast.
[0046] In another embodiment, the calculation formula for the internal contrast can be expressed as:
[0047] ;
[0048] In the formula, represents the internal contrast of the th tile; represents the total number of pixel points in the th tile; represents the pixel point ordinal number; represents the th pixel point in the th tile; denotes the average gray value of all pixel points in the th tile; denotes the linear normalization function.
[0049] S13: Calculate the global deviation of the tile;
[0050] The steps of calculating the global deviation include: calculating the average gray value of all pixel points in the powder image to obtain the image gray value; taking the difference between the overall gray value of any tile and the image gray value as the global deviation of the tile.
[0051] S14: Construct the feature vector;
[0052] In one embodiment, the expression of the feature vector corresponding to any tile is: ;
[0053] In the formula, is the overall gray value of the tile; is the internal contrast of the tile; is the global deviation of the tile;
[0054] In another embodiment, the expression of the feature vector corresponding to any tile is: ;
[0055] In the formula, is the overall gray value of the tile; is the internal contrast of the tile; is the global deviation of the tile; denotes the average of the gradient magnitudes of the pixel points in the tile.
[0056] The gradient magnitude of the pixel points in the tile can be obtained through the sobel operator. The eigenvalue of the pixel point gradient is introduced into the feature vector, thereby further improving the accuracy of subsequent clustering of the feature vector.
[0057] S15: Cluster the feature vectors;
[0058] Use the clustering method to cluster the feature vectors to obtain multiple clustering clusters; in this embodiment, the clustering method is the iterative self-organizing clustering algorithm, and in other embodiments, it can also be other clustering algorithms, such as the K-means clustering method, and the value of K in this method is set by the staff according to experience.
[0059] The feature vector of the tile contains multi-dimensional data, and the tile is classified based on the multi-dimensional data of the feature vector, improving the accuracy of classification.
[0060] S2: Calculate the upper-layer probability of each clustering cluster being the upper-layer ore, and calculate the upper adjustment coefficient and the lower adjustment coefficient of each clustering cluster according to the upper-layer probability of each clustering cluster;
[0061] S21: Calculate the upper-layer probability;
[0062] In one embodiment, the formula for calculating the upper-layer probability is:
[0063] ; where represents the upper-layer probability of the th clustering cluster; represents the mean of the overall grayscale of all tiles in the th clustering cluster; represents the mean of the global deviation of all tiles in the th clustering cluster; represents the mean of the internal contrast of all tiles in the th clustering cluster; represents the logarithmic function with the natural constant as the base; is the linear normalization function.
[0064] Where is multiplied by to enhance the synergistic effect of high grayscale and high contrast. The logarithmic function is used to limit the value range of the calculation result, avoid numerical explosion caused by excessive contrast, and at the same time make have a non-linear growth characteristic;
[0065] When and gradually increases, the value gradually approaches 0; and then approaches 1, and the possibility that all tiles in this clustering cluster belong to the upper-layer ore increases; conversely, when , increases, and the possibility that all tiles in this clustering cluster belong to the upper-layer ore decreases.
[0066] If the mean of the global deviation in this clustering cluster is positive, that is, , it indicates that the grayscale value in this clustering cluster is relatively high, and the possibility that this clustering cluster is the upper-layer ore is greater; conversely, if the mean of the global deviation in this clustering cluster is negative, that is, , it indicates that the grayscale value in this clustering cluster is relatively low, and the possibility that this clustering cluster is the upper-layer ore is smaller.
[0067] When , approaches 1, and the possibility that all tiles in this clustering cluster belong to the upper-layer ore is significantly improved; when , increases, and the possibility that all tiles in this clustering cluster belong to the upper-layer ore is suppressed and decreased.
[0068] In another embodiment, the calculation formula for the upper layer probability is as follows:
[0069] ; where, represents the upper layer probability of the th clustering cluster; represents the mean value of the overall gray level of all tiles in the th clustering cluster; represents the mean value of the global deviation of all tiles in the th clustering cluster; represents the mean value of the internal contrast of all tiles in the th clustering cluster; represents the logarithmic function with the natural constant as the base; is the linear normalization function; is the adjustment coefficient, which is used to adjust the influence degree of the global deviation on the upper layer probability. This coefficient can be adjusted according to the actual situation to adapt to a more complex industrial production environment.
[0070] S22: Calculate the upper adjustment coefficient and the lower adjustment coefficient;
[0071] The calculation formula for the upper adjustment coefficient is: , where, represents the upper adjustment coefficient of the th clustering cluster; represents the upper layer probability of the th clustering cluster.
[0072] The calculation formula for the lower adjustment coefficient is: , where, represents the lower adjustment coefficient of the th clustering cluster; represents the upper layer probability of the th clustering cluster.
[0073] S3: Determine the optimal upper threshold and the optimal lower threshold of the canny operator based on the upper adjustment coefficient and the lower adjustment coefficient, and use the operator to perform edge detection on the tiles in each clustering cluster to determine whether the powder is qualified;
[0074] During the edge detection process, calculate the optimal high threshold and the optimal low threshold of each clustering cluster according to the upper layer probability of each clustering cluster, so that the optimal high threshold and the optimal low threshold can be automatically adjusted during the process of the canny operator extracting edges, thereby reducing the situation of lower layer edge loss and improving the accuracy of ore particle detection.
[0075] In one embodiment, the calculation formula for the optimal high threshold is:
[0076] ;
[0077] represents the optimal high threshold of the operator; represents the preset empirical threshold; represents the up-regulation coefficient of the
[0078] The calculation formula for the optimal low threshold is:
[0079] ;
[0080] represents the low threshold of the operator; represents the preset empirical threshold; represents the down-regulation coefficient of the
[0081] In another embodiment, the calculation formula for the optimal high threshold is:
[0082] ;
[0083] represents the optimal high threshold of the operator; represents the preset empirical threshold; represents the up-regulation coefficient of the
[0084] The calculation formula for the optimal low threshold is:
[0085] ;
[0086] represents the low threshold of the operator; represents the preset empirical threshold, and ; represents the down-regulation coefficient of the
[0087] In this embodiment, the staff can adjust the minimum difference between the optimal upper threshold and the optimal lower threshold according to the actual situation to improve the flexibility in the edge detection process.
[0088] During the edge extraction process, when the upper probability of a clustering cluster is relatively large, the finally calculated optimal high threshold is also relatively large, which will also result in a relatively small optimal low threshold; furthermore, it makes the screening of edge pixels by the Canny operator more stringent. Since the upper-layer powder is not blocked, the gradient amplitude of its edge pixels is relatively large, and choosing a relatively large optimal high threshold can reduce the misdetection of oversaturated areas in the powder image.
[0089] When the upper probability of a clustering cluster is relatively small, the optimal upper threshold decreases, the optimal lower threshold increases, and the screening conditions for edge pixels are relaxed, so that more edge pixels can be retained and the loss of lower-layer edges can be reduced.
[0090] Perform a closing operation on any edge to connect broken edges and calculate the equivalent diameter of the edge. The calculation formula for the equivalent diameter is:
[0091] ; where represents the equivalent diameter of the edge; represents the number of all pixel points included in the edge, that is, the area of the edge.
[0092] Take the product of the equivalent diameter of the edge and the actual length of a unit pixel as the actual diameter of the edge;
[0093] Among them, the actual length of a unit pixel can be obtained by using the method of calibrating a reference object. For example, obtain a reference object with a known actual length, obtain the pixel length of the reference object, and the ratio of the actual length of the reference object to the number of pixel blocks is the actual length of a unit pixel.
[0094] Set an abnormal length, and determine that the edge is abnormal when the actual diameter of the edge is greater than the abnormal length; set a quantity threshold, and determine that the crushing of the stone material is unqualified and needs further crushing and grinding when the ratio of the number of abnormal edges to the total number of edges is greater than the quantity threshold.
[0095] The embodiment of the present application also discloses a powder grinding quality detection system, including a processor and a memory. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a powder grinding quality detection method according to the present application is implemented.
[0096] The above system also includes other components well known to those skilled in the art such as a communication bus and a communication interface, and their settings and functions are known in the art, so they will not be described in detail here.
[0097] The above are all the preferred embodiments of the present application. The protection scope of the present application is not limited accordingly. Therefore, all equivalent changes made according to the structure, shape, and principle of the present application should be covered within the protection scope of the present application.
Claims
1. A method for detecting the grinding quality of powder materials, characterized in that, Including the steps of: collecting powder images, segmenting the powder images to form multiple tiles; constructing gray feature vectors of each tile, performing clustering processing on each tile to obtain multiple classification clusters; Calculating the upper layer probability of each clustering cluster as the upper layer ore, determining the upper adjustment coefficient and the lower adjustment coefficient of each clustering cluster; determining the optimal upper threshold and the optimal lower threshold of the canny operator based on the upper adjustment coefficient and the lower adjustment coefficient, and using the canny operator to perform edge detection on the tiles in each clustering cluster to determine whether the powder is qualified; The calculation formula for the upper layer probability of the clustering cluster is: ; wherein, represents the upper probability of the -th clustering cluster; represents the mean of the overall grayscale of all patches in the -th clustering cluster; represents the mean of the global deviation of all patches in the -th clustering cluster; represents the mean of the internal contrast of all patches in the -th clustering cluster; represents the logarithmic function with the natural constant as the base; is the linear normalization function; The calculation steps for the overall gray level of the tile include obtaining the gray level value of each pixel point in the tile; taking the mean value of the gray level values of all pixel points in the tile as the overall gray level of the tile; The calculation formula for the internal contrast of the tile is: ; represents the internal contrast in the th tile; represents the total number of pixel points in the th tile; represents the pixel point ordinal number; represents the gray value of the th pixel point in the th tile; represents the average gray value of all pixel points in the th tile; represents the standard normalization function; The calculation steps for the global deviation of the tile include: obtaining the gray level values of all pixel points of the powder image and calculating the mean value to obtain the global gray level; taking the difference between the overall gray level of the tile and the global gray level as the global deviation.
2. The powder grinding quality detection method according to claim 1, characterized in that, The calculation formula for the internal contrast of the tile is as follows: ; represents the internal contrast in the th tile; represents the total number of pixel points in the th tile; represents the pixel point ordinal number; represents the th pixel point's grayscale value in the th tile; represents the average grayscale value of all pixel points in the th tile; represents the standard normalization function.
3. A method for detecting the quality of ground powder according to claim 1, characterized in that, The feature vector includes: the overall gray level of the tile, the global gray level of the tile, and the internal contrast of the tile.
4. A method for detecting the quality of powder grinding according to claim 1, characterized in that, Using the iterative self-organizing clustering algorithm to cluster the tiles with the feature vector as the metric.
5. A method for detecting the grinding quality of powder materials according to claim 1, characterized in that, Using the method of superpixel segmentation to segment the powder image.
6. A method for detecting the quality of powder grinding according to claim 1, characterized in that, In the step of calculating the up-regulation coefficient and down-regulation coefficient of each clustering cluster according to the upper-layer probability of each clustering cluster, the calculation formula of the up-regulation coefficient is: , where represents the up-regulation coefficient of the th clustering cluster; represents the upper-layer probability of the th clustering cluster; The calculation formula for the down-regulation coefficient is as follows: , where represents the down-regulation coefficient of the th clustering cluster; represents the upper-layer probability of the th clustering cluster.
7. A powder grinding quality detection system, characterized in that, Including: A processor and a memory, the memory stores computer program instructions, and when the computer program instructions are executed by the processor, a method for detecting the grinding quality of powder as described in any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Ore crushing effect evaluation method based on image processing
CN116823827A
Ore image granularity detection algorithm based on image processing technology
CN111047555A
Ore recognition method, detection mechanism and mineral product sorting machine
CN113083724A
Mineral aggregate crushing degree detection method based on image analysis
CN119477892A