A coal preparation method and system based on image processing

By using high-definition CCD cameras, Lab color space and K-Means clustering algorithm in coal screening, combined with brightness gradient features, the problem of difficulty in distinguishing between illumination changes and grayscale differences is solved, and efficient and accurate identification of coal and gangue is achieved. Filtering improves the stability and accuracy of the system.

CN118470366BActive Publication Date: 2024-10-25SHAANXI XINNENG COAL PREPARATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410919789.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-10-25
Estimated Expiration
2044-07-10

AI Technical Summary

Technical Problem

When screening coal, the existing technology is sensitive to changes in illumination and has difficulty in distinguishing coal from coal gangue due to differences in grayscale, resulting in low classification accuracy and affecting screening efficiency and accuracy.

Method used

Using a method based on image processing, coal images are captured with a high-definition industrial CCD camera, bilateral filtering is performed to reduce noise and converted to Lab color space, and K-Means clustering algorithm and brightness gradient features are used for clustering, and clustering clusters and template coal are calculated. similarity to distinguish coal lumps and coal gangue.

Benefits of technology

It improves the coal identification accuracy and screening efficiency, enhances the stability and robustness of the system, reduces light and noise interference, and significantly improves the reliability and stability of screening.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118470366B_ABST
    Figure CN118470366B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of coal block screening, and the present invention relates to a coal selection method and system based on image processing. The invention obtains a color space image of the coal by preprocessing and color space conversion of the original image of the coal to be screened, and clusters the original image to obtain the brightness gradient of each cluster cluster, thereby calculating the similarity between the cluster cluster and the template coal, and finally determining whether the coal is a coal block or coal gangue by setting a similarity threshold. The present invention performs color space conversion on the original image of the coal to be screened, customizes the cluster distance according to the brightness feature, calculates the probability density of the brightness feature of each cluster cluster, thereby obtaining the similarity between the cluster cluster and the template coal, and then determines whether the corresponding area of ​​the cluster cluster is a coal block, thereby improving the coal block recognition accuracy and screening efficiency. At the same time, the screening method has good adaptability and stability to external conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of coal block screening, and in particular to a coal selection method and system based on image processing. Background Art

[0002] As an important fossil fuel and industrial raw material, coal plays a pivotal role in the development of modern economy and industry. Its main functions include energy production, industrial raw materials and heating. However, coal blocks and coal gangue are mixed together during the mining process, and their properties and uses are very different: coal blocks are mainly composed of carbon, containing certain volatile matter and ash. It has a high calorific value and is an important fuel and industrial raw material. Coal gangue is mainly an ore associated with the coal mining process, containing more impurities and lower calorific value. Its main components include minerals such as silicon and aluminum. Coal gangue cannot be used as an efficient fuel, it causes great wear on equipment, and it also produces harmful gases when burned.

[0003] Therefore, the importance of screening coal blocks is reflected in: Improving combustion efficiency: The pure coal blocks screened out have higher calorific value, higher combustion efficiency, and reduced energy waste. Protecting equipment: The hardness of coal gangue is high, which is easy to cause wear and tear on the equipment. Screening can extend the service life of the equipment. Environmental protection: The combustion of coal gangue will produce a large amount of harmful gases. Screening coal blocks can reduce pollutant emissions.

[0004] Economic benefits: High-purity coal blocks can be sold at a better price, increasing the economic benefits of the mine.

[0005] The conventional image processing process for screening coal blocks includes image acquisition, image preprocessing, feature extraction, classification algorithms, etc. to distinguish between coal blocks and coal gangue. For example, the Chinese patent application document with publication number CN110930450A discloses a coal gangue positioning method based on image threshold segmentation and BLOB analysis method, which obtains the geometric feature information of the target object by using the coordinate statistical information results of points on the target object in the coal gangue image that belong to the same feature partition, thereby solving the problem of being unable to locate the edge of the image in the coal gangue image due to its high background and other reasons. However, this method has some technical defects: for example, the difference between coal blocks and coal gangue in grayscale images is often not obvious, especially in environments with poor lighting conditions or a lot of dust, and traditional grayscale features are difficult to effectively distinguish between the two. Summary of the invention

[0006] In view of the problem that the classification effect is not ideal when screening coal, in the first aspect, the present invention proposes a coal selection method based on image processing, comprising: shooting an image of coal to be screened to obtain an original image of the coal; preprocessing and color space conversion of the original image to obtain a color space image of the coal; clustering the color space image of the coal to obtain the brightness gradient of the clusters corresponding to the coal blocks and coal gangue in the coal; the distance calculation formula between two pixel points during clustering is as follows:

[0007]

[0008] in, Represents the distance between two pixels; Represents the position difference between two pixels; Represents the maximum intra-cluster distance within the initial cluster; Represents the difference in brightness characteristics between two pixels in an image; Represents the maximum brightness feature difference between each pixel point in the initial cluster; wherein the initial cluster represents the cluster formed in the process of clustering the color space image of the coal; the similarity between the cluster and the template coal is calculated according to the brightness gradient, and the coal corresponding to the cluster is judged to be a coal block or coal gangue according to the size of the similarity.

[0009] The inventors found that there are many defects in the process of screening coal blocks using existing image processing technology, mainly including sensitivity to light changes, difficulty in distinguishing coal blocks from coal gangue due to grayscale differences, and insufficient feature extraction resulting in low classification accuracy. These defects seriously affect the screening efficiency and accuracy. The present invention introduces the concept of brightness features and uses the Lab color space to separate the brightness and color information of the image, reducing the interference of light and noise on the image. Clustering using brightness features can more effectively capture the slight differences between coal blocks and coal gangue. By calculating the brightness gradient of the clustering clusters and judging based on the similarity of these gradient features with the template coal, accurate distinction between coal blocks and coal gangue is achieved. This method not only improves the accuracy of screening, but also enhances the stability and robustness of the system, and solves many problems existing in traditional methods.

[0010] Furthermore, obtaining the original image of the coal also includes: using a high-definition industrial CCD camera to photograph the coal to be screened to obtain the original image of the coal.

[0011] Use a high-definition industrial CCD camera to shoot the coal to be screened and obtain high-quality original images. High-definition industrial CCD cameras have high resolution and good photosensitivity, and can take clear images under different lighting conditions, providing a good foundation for subsequent image processing.

[0012] Furthermore, obtaining the color space image of the coal also includes: using bilateral filtering to reduce noise on the original image of the coal; and performing Lab color space conversion on the denoised image to obtain the Lab color space image of the coal.

[0013] The present invention performs noise reduction processing on the original image of coal and adopts a bilateral filtering method, which can effectively remove the noise in the image while retaining important edge information. The noise-reduced image is then converted to the Lab color space, which can better separate brightness and color information, so that high image quality can be maintained in an environment with large changes in lighting conditions. This method greatly improves the clarity and processing accuracy of the image, reduces the impact of environmental noise and lighting changes on image analysis, and solves the problem of high image quality requirements but unsatisfactory results in traditional methods.

[0014] Furthermore, clustering the color space image of the coal also includes: clustering the color space image of the coal using a K-Means clustering algorithm.

[0015] The present invention uses the K-Means clustering algorithm to cluster the color space image, and can effectively classify the pixels in the image into different clusters. The K-Means clustering algorithm has high computational efficiency and stability, can quickly process large-scale data, and classify coal blocks and coal gangue separately. By calculating the brightness gradient for each cluster, the surface characteristics of coal blocks and coal gangue can be analyzed more carefully. This clustering method significantly improves the accuracy and processing efficiency of screening, and solves the problems of high computational complexity and insufficient precision in traditional classification methods.

[0016] Further, Indicates the position difference between two pixels, and also includes: Represents the Euclidean distance between two pixels.

[0017] Further, Indicates the difference in brightness characteristics between two pixels in an image, and also includes:

[0018]

[0019] in Represents the difference in brightness characteristics between two pixels in an image; Represents the weight of the brightness channel feature difference in the brightness feature; Represents the characteristic value of the brightness channel of the i-th pixel; Represents the characteristic value of the brightness channel of the jth pixel; Represents the weight of the a channel feature difference in Lab color space; and They represent the a-channel feature values ​​of the i-th pixel and the j-th pixel in the Lab color space respectively; Represents the weight of the b channel feature difference in Lab color space; and They respectively represent the b-channel eigenvalues ​​of the i-th pixel and the j-th pixel in the Lab color space.

[0020] Further, calculating the similarity between the cluster and the template coal according to the brightness gradient also includes: obtaining the probability density of the brightness feature of each cluster according to the brightness gradient, and obtaining the similarity between the cluster and the template coal through the probability density calculation; wherein:

[0021]

[0022] represents the similarity between the brightness feature of the sth cluster and the template coal; Represents the probability density of the brightness gradient in the kth direction interval of the sth cluster; represents the template coal block, then Represents the probability density of the brightness gradient of the template coal block in the kth direction interval; represents template gangue, then Represents the probability of the brightness gradient of the template gangue in the kth direction interval.

[0023] Furthermore, obtaining the probability density of the brightness features of each cluster cluster based on the brightness gradient also includes: calculating the brightness gradient of the pixel point and obtaining the brightness gradient direction based on the brightness gradient; for a cluster cluster, obtaining the probability density of the brightness features of the cluster cluster according to the size and direction of the brightness gradient of each pixel point, dividing the brightness gradient direction in the cluster cluster into different intervals, calculating the sum of the brightness gradients of the pixels in each interval in the brightness gradient direction, the ratio of the sum of the brightness gradients of each interval to the sum of the brightness gradients of all intervals is the probability of the brightness gradient of the interval, and the probability of the brightness gradient of each interval constitutes the probability density of the brightness features of the cluster cluster.

[0024] Furthermore, judging whether the coal corresponding to the cluster is a coal block or coal gangue by the similarity also includes: setting a similarity threshold, when the similarity between the cluster and the template coal is greater than the similarity threshold, the coal corresponding to the cluster is considered to be a coal block area; when the similarity between the cluster and the template coal is less than the similarity threshold, the coal corresponding to the cluster is considered to be a coal gangue area.

[0025] The present invention can effectively distinguish between coal lumps and coal gangue by calculating the brightness gradient of each cluster and judging based on the similarity between these gradient features and the template coal. A similarity threshold is set. When the similarity between the brightness feature of the cluster and the template coal is greater than the threshold, it is judged as a coal lump area; otherwise, it is a coal gangue area. The similarity calculation method of brightness features provides a reliable judgment standard to ensure the accuracy and consistency of the screening results. This method solves the problem of misjudgment caused by small grayscale differences in traditional methods, and significantly improves the reliability and stability of screening.

[0026] In a second aspect, the present invention provides a coal preparation system based on image processing, comprising a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the coal preparation method based on image processing of the present invention is implemented.

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

[0028] The present invention performs color space conversion on the original image of the coal to be screened, customizes the clustering distance according to the brightness characteristics, calculates the probability density of the brightness characteristics of each cluster cluster to obtain the similarity between the cluster cluster and the template coal, and then determines whether the area corresponding to the cluster cluster is a coal lump, thereby improving the coal lump recognition accuracy and screening efficiency. At the same time, the screening method has good adaptability and stability to external conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. 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:

[0030] Figure 1 is a flow chart schematically showing a coal preparation method based on image processing in an embodiment of the present invention;

[0031] Figure 2 is a grayscale diagram schematically showing a comparison between a coal block and coal gangue in an embodiment of the present invention;

[0032] Figure 3 It is a block diagram schematically showing the structure of a coal preparation system based on image processing in an embodiment of the present invention. DETAILED DESCRIPTION

[0033] 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.

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

[0035] Coal preparation method embodiment based on image processing:

[0036] like Figure 1 As shown, the coal preparation method based on image processing of the present invention includes:

[0037] S1. Obtain a color space image of the coal to be screened.

[0038] A high-definition CCD camera can be used to capture the original image of the coal to be screened. After the capture is completed, the original image of the coal is filtered to remove noise in the image. In the present invention, bilateral filtering can be used for noise reduction. This filter effectively removes noise while retaining image edge details, and is suitable for complex lighting and dust conditions in the coal mine shooting environment.

[0039] In the process of coal mining, there is coal gangue in the excavated coal, which needs to be removed. Figure 2 As shown, the left picture is a coal block, and the right picture is coal gangue. In the process of screening coal blocks through images, due to the shooting environment and the characteristics of the coal mine itself, the grayscale features of the coal block area and the coal gangue area in the captured image are sometimes not very different. Directly using grayscale features for classification will result in a low accuracy rate of the final result. However, the reflectivity of the coal block area and the coal gangue area in the image is quite different. The reflectivity of the coal block area is stronger, and the reflectivity of the coal gangue area is lower. Therefore, the RGB image of the coal after noise reduction can be converted to Lab color space to obtain the Lab color space image of the coal to be screened.

[0040] The present invention performs noise reduction processing on the original image of the coal and adopts a bilateral filtering method, which can effectively remove the noise in the image while retaining important edge information. The noise-reduced image is then converted to the Lab color space, which can better separate brightness and color information, so that high image quality can be maintained in an environment with large changes in lighting conditions. This method greatly improves the clarity and processing accuracy of the image, reduces the impact of environmental noise and lighting changes on image analysis, and solves the problem of high image quality requirements but unsatisfactory results in traditional methods.

[0041] S2. Obtain the color space image clustering result of the coal to be screened.

[0042] The pixel values ​​in the Lab color space image of the coal can be clustered, and the clustering takes into account the differences in position and brightness features. The specific position difference calculation formula uses the Euclidean distance between two pixel points, and the brightness feature difference calculation formula is as follows:

[0043]

[0044] in Represents the difference in brightness characteristics between two pixels in an image; Represents the weight of the brightness channel feature difference in the brightness feature; Represents the characteristic value of the brightness channel of the i-th pixel; Represents the characteristic value of the brightness channel of the jth pixel; Represents the weight of the a channel feature difference in Lab color space; and They represent the a-channel feature values ​​of the i-th pixel and the j-th pixel in the Lab color space respectively; Represents the weight of the b channel feature difference in Lab color space; and They represent the b channel eigenvalues ​​of the i-th pixel and the j-th pixel in the Lab color space, respectively. The a channel eigenvalue represents the value ranging from red to green in the Lab color space; the b channel eigenvalue represents the value ranging from yellow to blue in the Lab color space.

[0045] In the screening of coal blocks and coal gangue, the brightness characteristics of the two are obviously different. Therefore, the weight of the brightness channel characteristic difference is greater. In the present invention, the empirical value is given. , and , implementers can adjust the weights according to actual conditions.

[0046] The distance between two pixels during clustering is calculated as follows:

[0047]

[0048] in, Represents the distance between two pixels; Represents the position difference between two pixels; Represents the maximum intra-cluster distance within the initial cluster; Represents the difference in brightness characteristics between two pixels in an image; Indicates the maximum brightness feature difference within the initial cluster, where the initial cluster represents the cluster formed during the clustering process. The distance when clustering is constructed based on the position features and brightness features within the initial cluster, while taking into account the features of the initial cluster and the features of the pixels to be divided into the cluster.

[0049] According to the above distance formula, the Lab color space image of the coal is clustered. After the clustering is completed, the noise clusters can be removed by using the morphological operation of corrosion and expansion on each cluster to obtain the clustering result of the Lab color space image of the coal.

[0050] The present invention uses K-Means clustering algorithm to cluster Lab color space images, and can effectively classify pixels in the image into different clusters. The K-Means clustering algorithm has high computational efficiency and stability, can quickly process large-scale data, and classify coal blocks and coal gangue respectively. By calculating the brightness gradient for each cluster, the surface characteristics of coal blocks and coal gangue can be analyzed more carefully. This clustering method significantly improves the accuracy and processing efficiency of screening, and solves the problems of high computational complexity and insufficient precision in traditional classification methods.

[0051] S3. Obtain the probability density of the brightness feature of each cluster.

[0052] When the above clustering method is used to cluster the lab image, different faces of the same coal block or coal gangue may be clustered into different clusters, so the above clustering results need to be adjusted according to the characteristics of each cluster. The size and direction of the brightness feature of each cluster can be calculated, and the calculation process is as follows:

[0053] First calculate the brightness gradient of the pixel in the x-axis direction, and then calculate the brightness gradient of the pixel in the y-axis direction. The brightness gradient calculation formula of the pixel is as follows:

[0054]

[0055] in, Represents the brightness gradient of a pixel; Represents the gradient of the pixel in the x direction; Represents the gradient of the pixel in the y direction. The direction calculation formula of the brightness gradient of the pixel is as follows:

[0056]

[0057] in, is the gradient direction; Represents the gradient of the pixel in the x direction; Indicates the gradient of the pixel in the y direction.

[0058] The magnitude and direction of the brightness gradient of each pixel in the cluster can be calculated according to the above formula, and then the probability density of the brightness feature of the cluster can be obtained through the magnitude and direction of the brightness gradient of each pixel in the cluster. Specifically, the brightness gradient direction in the cluster can be divided into different intervals (the interval range includes: 0 degrees to 30 degrees, 30 degrees to 60 degrees, 60 degrees to 90 degrees, 90 degrees to 120 degrees, 120 degrees to 150 degrees, 150 degrees to 180 degrees) to calculate the sum of the brightness gradients of the pixels in each interval. The ratio of the sum of the brightness gradients of each interval to the sum of the brightness gradients of all intervals is the probability of the brightness gradient of the interval. The probability of the brightness gradient of each interval constitutes the probability density of the brightness feature of the cluster. Take the following content as an example:

[0059] For any cluster , remember the first The pixels are , a total of pixel points, and for this pixel point, it includes brightness gradient and gradient direction, which are recorded as as well as , assuming that the pixels in the cluster whose gradient directions belong to the first interval (0 degrees to 30 degrees) are ,Right now , then in the cluster The probability density calculation of the brightness feature in the first interval is as follows:

[0060]

[0061] in In this example, the cluster The probability density of brightness features in the first interval; Represents the sum of the brightness features of the pixels in the first interval in the gradient direction; Represents the sum of the brightness features of all pixels in cluster C.

[0062] S4. Obtain the similarity between the probability density of brightness features of each cluster and the probability density of brightness features of the template coal; and select the coal blocks according to the similarity.

[0063] The similarity between the cluster and the template coal can be obtained by calculating the probability density of the brightness feature of the cluster, and the calculation formula is as follows:

[0064]

[0065] represents the similarity between the brightness feature of the sth cluster and the template coal; Represents the probability density of the brightness gradient in the kth direction interval of the sth cluster; represents the template coal block, then Represents the probability density of the brightness gradient of the template coal block in the kth direction interval; represents template gangue, then Represents the probability of the brightness gradient of the template gangue in the kth direction interval.

[0066] when The larger the value is, the closer the probability of the brightness gradients of the cluster and the template coal block in different directions is, and the greater the similarity of the brightness characteristics of the two is. The larger the value of is, the greater the possibility that the area corresponding to the cluster is a coal block; The larger the value is, the closer the probability of the brightness gradients of the cluster and the template gangue in different directions is, and the greater the similarity of the brightness characteristics of the two is. The smaller the value is, the greater the possibility that the area corresponding to the cluster is coal gangue.

[0067] You can set the similarity threshold , when the similarity Greater than or equal to the set threshold When , the cluster corresponding to the coal area is considered to be a coal block; on the contrary, when the similarity Less than the set threshold , the coal region corresponding to the cluster is considered to be coal gangue, and subsequent separation operations are performed on it; the present invention gives an empirical value of the similarity threshold , implementers can make adjustments based on actual conditions to adapt to different screening requirements.

[0068] By calculating the brightness gradient of each cluster and judging based on the similarity between these gradient features and the template coal, coal lumps and coal gangue can be effectively distinguished. The similarity calculation method of brightness features provides a reliable judgment standard to ensure the accuracy and consistency of the screening results. This method solves the problem of misjudgment caused by small grayscale differences in traditional methods and significantly improves the reliability and stability of screening.

[0069] The present invention introduces the concept of brightness features and uses the Lab color space to separate the brightness and color information of the image, thereby reducing the interference of light and noise on the image. Clustering using brightness features can more effectively capture the slight differences between coal blocks and coal gangue. By calculating the brightness gradient of the clusters and judging based on the similarity between these gradient features and the template coal, accurate distinction between coal blocks and coal gangue is achieved. This method not only improves the accuracy of screening, but also enhances the stability and robustness of the system, and solves many problems existing in traditional methods.

[0070] Coal preparation system implementation based on image processing:

[0071] On the other hand, the present invention also provides a coal selection system based on image processing. Figure 3 As shown, the coal preparation system based on image processing includes a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a coal preparation method based on image processing according to the first aspect of the present invention is implemented.

[0072] The coal preparation system based on image processing also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose configuration and functions are known in the art and will not be described in detail here.

[0073] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

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

[0075] 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 coal preparation method based on image processing, characterized in that: The method comprises: Taking an image of the coal to be screened to obtain an original image of the coal; Preprocessing and color space conversion are performed on the original image to obtain a color space image of the coal; Clustering is performed on the color space image of the coal to obtain the brightness gradient of the clusters corresponding to the coal lumps and coal gangue in the coal; the distance calculation formula between two pixel points during clustering is as follows: ; in, Represents the distance between two pixels; Represents the position difference between two pixels; Indicates the maximum intra-cluster distance within the initial cluster; Represents the difference in brightness characteristics between two pixels in an image; represents the maximum brightness feature difference between each pixel in the initial cluster; wherein the initial cluster represents the cluster formed in the clustering process of the color space image of the coal; Calculating the similarity between the cluster and the template coal according to the brightness gradient includes: obtaining the probability density of the brightness feature of each cluster according to the brightness gradient, and obtaining the similarity between the cluster and the template coal by calculating the probability density; wherein: ; represents the similarity between the brightness feature of the sth cluster and the template coal; Represents the probability density of the brightness gradient in the kth direction interval of the sth cluster; represents the template coal block, then Represents the probability density of the brightness gradient of the template coal block in the kth direction interval; represents template gangue, then The probability of the brightness gradient of the template coal gangue in the kth direction interval is represented, and the coal corresponding to the cluster is judged to be a coal block or coal gangue according to the similarity; Obtaining the probability density of the brightness feature of each cluster according to the brightness gradient includes: Calculating the brightness gradient of the pixel point and obtaining the brightness gradient direction according to the brightness gradient; For a cluster, the probability density of the brightness feature of the cluster is obtained according to the size and direction of the brightness gradient of each pixel. The brightness gradient direction in the cluster is divided into different intervals, and the sum of the brightness gradients of the pixels in each interval is calculated. The ratio of the sum of the brightness gradients of each interval to the sum of the brightness gradients of all intervals is the probability of the brightness gradient of the interval. The probability of the brightness gradient of each interval constitutes the probability density of the brightness feature of the cluster.

2. A coal selection method based on image processing according to claim 1, characterized in that: Acquiring the original image of the coal, including: A high-definition industrial CCD camera is used to photograph the coal to be screened to obtain the original image of the coal.

3. A coal selection method based on image processing according to claim 1, characterized in that: Acquiring a color space image of the coal, comprising: Using bilateral filtering to reduce noise on the original image of the coal; The denoised image is converted into a Lab color space to obtain a Lab color space image of the coal.

4. A coal selection method based on image processing according to claim 1, characterized in that: Clustering the color space image of the coal includes: The K-Means clustering algorithm is used to perform clustering on the color space image of the coal.

5. A coal selection method based on image processing according to claim 1, characterized in that: Represents the position difference between two pixels, including: Represents the Euclidean distance between two pixels.

6. A coal selection method based on image processing according to claim 3, characterized in that: Indicates the difference in brightness characteristics between two pixels in an image, including: ; in Represents the difference in brightness characteristics between two pixels in an image; Represents the weight of the brightness channel feature difference in the brightness feature; Represents the characteristic value of the brightness channel of the i-th pixel; Represents the characteristic value of the brightness channel of the jth pixel; Represents the weight of the a channel feature difference in Lab color space; and They represent the a-channel feature values ​​of the i-th pixel and the j-th pixel in the Lab color space respectively; Represents the weight of the b channel feature difference in Lab color space; and They respectively represent the b-channel eigenvalues ​​of the i-th pixel and the j-th pixel in the Lab color space.

7. A coal selection method based on image processing according to claim 1, characterized in that: Judging whether the coal corresponding to the cluster is a coal lump or coal gangue by the similarity includes: A similarity threshold is set. When the similarity between the cluster and the template coal is greater than the similarity threshold, the coal corresponding to the cluster is considered to be a coal block area; when the similarity between the cluster and the template coal is less than the similarity threshold, the coal corresponding to the cluster is considered to be a coal gangue area.

8. A coal selection system based on image processing, characterized in that: The invention comprises a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the coal selection method based on image processing as described in any one of claims 1 to 7 is implemented.