Research on Coal and Rock Type Recognition Based on Mechanical Vision

In order to identify different kinds of coal, rock, and gangue, the FPV integrated image transmission camera is used to collect images of 6 types of coal, 8 types of rocks, and 2 types of coal gangue, and the images are processed based on the twodimensional discrete wavelet transform (2D-DWT) based on the steerable pyramid decomposition (SPD). -e maximum likelihood estimation method is used to estimate the parameters, and, the coal and rock types are judged by comparing the similarity of each image. -e results show the following: (1) in the eight kinds of rocks, the recognition accuracy of shale and limestone is 90%, that of anorthosite is 95%, and those of other rocks are 100%; (2) the accuracy of comprehensive identification of coal, rock, and gangue is 93%, the comprehensive of coal and gangue is 78%, and the rock classification is 97%; (3) the identification time of 6 types of coal samples, 8 types of rock samples, and 2 types of coal gangue samples are in the range of 2 s∼3 s, which is far less than 10 s, which can meet the requirements of coal and rock identification in terms of recognition speed; and (4) according to 20 groups of data, the range, variance, and standard deviation of the same coal gangue sample meet the accuracy requirements of coal and rock identification. -e identification method provides an effective method to improve the efficiency of coal separation, effectively determine the distribution of coal and rock, and timely adjust the cutting height of shearer drum and the operation parameters of various fully mechanized mining equipment, so as to improve the recovery rate of coal resources.


Introduction
With the decrease of coal resource reserves, the development of coal resources is becoming more and more difficult, and the situation of coal and rock mixing is increasing [1,2]. erefore, it is necessary to judge the distribution of coal and rock, select coal seam for mining, avoid the damage of mechanical equipment caused by equipment cutting rock stratum, affect the service life of equipment, reduce the quality of coal and rock, and improve the production cost. How to identify coal and rock efficiently and accurately has been studied by scholars at home and abroad.
Wang and Zhang [3] proposed a new method of dynamic identification in a coal-rock interface based on the fusion of adaptive weight optimization and multisensor information. As a result, a cutting experiment on a random coal-rock interface verified both the accuracy and speed of the proposed identification model, in comparison with the single signal, adaptive network-based fuzzy inference system (ANFIS) fusion, and improved PSO-BP. Liu et al. [4] proposed the multiscale feature fusion coal-rock recognition (MFFCRR) model based on a multiscale Completed Local Binary Pattern (CLBP) and a Convolution Neural Network (CNN). Experimental results show that the coal-rock image recognition accuracy of the proposed MFFCRR model reaches 97.9167%, which increased by 2%-3% compared with the state-of-the-art coal-rock recognition methods. Miao et al. [5] established a three-layered model of coal-rock and gave the mathematical analysis of this model. en numerical simulation and field experiment were carried out. Finally, in order to interpret radar image, an improved image segmentation algorithm was proposed. Chen et al. [6] proposed a coal-rock recognition method based on sound signal analysis. e experiment results show that the overall recognition accuracy is 91.7% under the actual cutting condition. Zhang et al. [7][8][9] established the simulation and reduction image of coal and rock distribution to determine the transition area of coal and rock distribution, which improved the accuracy of coal-rock identification. Luo et al. [10,11] proposed a hybrid-graph learning method to reveal the complex high-order relationships of the HSI, termed enhanced hybrid-graph discriminant learning (EHGDL), and proposed a sparse-adaptive hypergraph discriminant analysis (SAHDA) method to obtain the embedding features of the HSI.
To sum up, there is no comprehensive study on the identification of coal and rock types. erefore, the images of 6 types of coal, 8 types of rocks, and 2 types of coal gangue were collected in this paper. e images were divided into several subzones by 2D-DWT. e image processing was based on SPD, and the maximum likelihood estimation method was used to judge the sample types. (1) e identification of similar types of coal, rock, and gangue provides an important means for the separation after excavation. (2) Improve the coal mining efficiency, ensure that the coal under the coal mine is fully exploited, and make full use of the underground coal mine resources. (3) Effectively judge the type of rock, coal, and gangue; judge its hardness; prevent excessive wear of the pick; even damage the pick; affect the working life of the equipment in the fully mechanized mining face; and reduce the reliability of the cutting process of the shearer.

Coal Types and Characteristics Analysis.
At present, the more common coal resources in China are fat coal, lignitous coal, coking coal, gas fat coal, gas coal, and anthracite. Each of the above coal has its own characteristics, and the application method is not the same. erefore, it is necessary to analyze the above coal samples to ensure that the above coal carbons can be effectively distinguished. e coal types and characteristics of this paper are shown in Table 1.
Judging the type of coal can be used to mine the same kind of coal in the first mining, avoiding the need for secondary classification of coal in the later stage after largescale mining without distinguishing coal types, which increases the workload of coal sorting, takes a long time, and increases the cost of coal mining. erefore, it is necessary to effectively classify and identify the coal.

Rock Types and Characteristics
Analysis. Rock is very common in the coal mining work, and the rock hardness is generally large. If the rock is cut, it is easy to cause serious wear and tear [12,13], which affects the working life of the shearer pick. Moreover, when the shearer pick is seriously worn, it is necessary to maintain the shearer. At this time, the coal mining work must not be interrupted, which reduces the coal mining efficiency and reduces the continuity of underground mining work. It has practical application value to determine rock distribution and avoid cutting high hardness rock with pick. At present, rocks are mainly divided into three categories [14][15][16], namely, igneous rock, sedimentary rock, and metamorphic rock. e types and characteristics of rocks studied in this paper are shown in Table 2.
e identification of rock is beneficial to the removal of rock and the full utilization of underground coal seam resources [17]. At the same time, it is recognized that the rock hardness is too large, and the cutter part of the shearer should automatically adjust to avoid cutting the rock, which will bring damage to the cutter part of the shearer, affect the normal operation of the shearer, reduce the coal mining efficiency, cause mechanical damage to the fully mechanized face, and affect the overall service life of the shearer.

Gangue Types and Characteristics Analysis.
e existence of coal gangue is an unavoidable problem in the process of coal mining. erefore, the properties of coal gangue need to be studied. In this paper, lignitous coal gangue and bituminous coal gangue are taken as examples, and their characteristics are shown in Table 3.
When the hardness of coal gangue is too large, it will cause serious wear and damage to the cutting part. It is necessary to use the rocker arm of the Shearer to adjust the cutting position. When meeting the coal gangue in the coal seam, the contact with coal gangue should be avoided to prevent damage to the shearer pick due to the contact between the cutting part of the shearer and the coal gangue with greater hardness.

Image Acquisition Device.
According to the analysis of the actual working situation, the FPV integrated image transmission camera is selected. HD camera has its own control chip, is easy to use, and is of low cost. e image transmission module and HD camera are shown in Figure 1. e camera is directly connected with the image transmission module to realize the wireless transmission function of real-time video feedback. It is small and suitable for use. e camera has a wide shooting angle, which is convenient for image extraction in a larger range. e camera can reach a super wide-angle viewing angle of 135 degrees diagonally. e working voltage is 3.3 V∼6V, and the maximum working current is 140 mA. e DC3.3-6v power supply is adopted, which is convenient to connect with the image transmission and camera. e camera can be directly powered by lithium batteries, so it is convenient to use. e imaging effect is clear, the image is clear without snowflakes, 0.01LUX low illumination can still take images under the condition of insufficient light, and the effect is more perfect with the use of a high-definition image transmission acquisition card.

Coal-Rock-Gangue Image Acquisition.
Six kinds of coal samples are collected, 30 groups of each coal are selected, and the images of different types of coal are as shown in Figure 2.
Eight kinds of rock samples are collected; 30 groups are selected for each type. e images of different types of rocks are shown in Figure 3.
Two kinds of coal gangue samples are collected, 30 groups are selected for each kind of coal gangue, and the images of different kinds of coal gangue are as shown in Figure 4.

Image Processing of 2D-DWT Based on SPD.
e image decomposition process of two-dimensional discrete wavelet transform (2D-DWT) is shown in Figure 5. e low-pass filter h (n) and high-pass filter g (n) are used to output the low-frequency subband LL j − 1 from the upper-level image (or original image) by rows, and the L j ′ and H j ′ are collected to obtain Lj and Hj. By columns, a low-frequency subband LL j ′ and a medium and high-frequency subband HL j ′ are obtained by filtering Lj and Hj by filter h (n). By columns, Lj and Hj are filtered by g (n) to obtain medium and highfrequency subband LH j ′ and one high-frequency subband HH j ′ . LL j ′ , LH j ′ , HL j ′ , and HH j ′ were sampled to obtain LLj, LHj, HLj, and HHj by columns. In addition, LLj can be used as input to the next level of 2D-DWT to recursively implement multilevel 2D-DWT.
It is known that image decomposition using 2D-DWT requires row and column downsampling and that the low-pass    and high-pass filters used in all levels of 2D-DWT are unchanged. erefore, 2D-DWT is liable to cause aliasing between frequency bands. In addition, the directional resolution of 2D-DWT is still insufficient to be improved. is paper presents an image processing method based on a directioncontrollable steerable pyramidal decomposition (SPD) framework. A directional derivative operator with a specific order is used as the basis function of the decomposition transformation, and a filter bank in any direction can be constructed by a linear combination of the base filters corresponding to the base functions. erefore, the details of the image along any direction can be obtained by SPD method. From the frequency domain perspective, the SPD workflow is shown in Figure 6, and the dashed range represents a recursive iteration process for multilevel SPDs. Taking anorthosite as an example, the images before and after processing are shown in Figure 7.
As shown in Figure 7, after the image collected by the camera is processed by this method, it has obvious visual enhancement effect. e color difference of the image and the surface features are very obvious. It can capture the image information more accurately and prevent the lack of recognition accuracy due to the lack of obvious image information. is method can effectively express the different features of different samples and improve the recognition accuracy. erefore, the image processing method is effective, 2.4 Image database establishment. e pictures of the database are created by using OCR Trainer under image processing and computer vision in MATLAB. e more categories the database contains, the more comprehensive the database will be and the more reliable the visual recognition results will be. In this paper, 30 image-processed sample pictures of each type of sample are selected as the database. As shown in Figure 8, when the progress bar is completed, the extraction of training samples is completed.

Machine Visual Recognition Based on Quantitative Discrimination of Similarity
After 2D-DWT transformation, each mid-high-frequency subband of the image to be identified obeys each parameter under the AGGD condition. e image similarity calculation is a very important issue. At present, it is common to construct feature vectors from each AGGD parameter involved in each image and use the nearest neighbor classifier to complete coal and rock identification. Most classifiers in this process assume that the metric space of the eigenvectors is Euclidean space. erefore, Euclidean distance is used as the criterion for evaluating similarity. From the perspective of information theory, the degree of coincidence of probability distribution is often described by relative entropy. Set P(x, Θ 1 ) as the subband x 1 coefficient probability distribution density function. Set P(x, Θ 2 ) as the subband x 2 coefficient probability distribution density function, where Θ 1 � (α 1 , β L1 , β R1 ), Θ 2 � (α 2 , β L2 , β R2 ) define the relative entropy between x 1 and x 2 . Given two images I 1 and I 2 , the similarity between them is defined as In the formula, J is the total series of 2D-DWT.  I 2 ), the higher the similarity between I 1 and I 2 , and vice versa.
is paper takes anorthosite-coking coal as an example, and the result of image recognition is shown in Figure 9.
As shown in Figure 9, this paper takes an anorthositecoking coal image as an example to test the method, and the test proves that the method can effectively identify anorthosite-coking coal. In the actual test process, it is necessary to conduct repeated tests on various samples under various rock categories and various coals under various coal categories, record the working time and recognition time of each recognition process, and judge the accuracy of the image recognition process. In order to ensure the accuracy of coal and rock recognition based on machine vision, the recognition accuracy between different categories and between coal and rock samples is judged.

Coal-Rock Identification Accuracy Test.
Sixteen samples are collected and 20 sets of data are tested for each sample, totaling 320 sets of data. Each sample can be placed in different directions, postures, and sizes (within the size range of sample specifications). e identification accuracy of 320 sets of data is counted, and the accuracy of sample Shock and Vibration identification is recorded and counted at the same time, as shown in Table 4. Five of the eight rocks have 100% recognition accuracy and 96.9% average recognition accuracy, which fully meet the needs of rock identification. e recognition accuracy of coking coal, anthracite, and bituminous coal gangue is over 90%, which can meet the recognition standard. Due to the low lignite coalification, lignitous coal gangue is usually mixed in lignitous coal. e recognition accuracy of lignitous coal and lignitous coal gangue is only about 60%. Currently, the recognition accuracy of lignitous coal and lignitous coal gangue by radar and acoustic emission is less than 50%. erefore, the coal-rock recognition method proposed in this paper has application value. e comprehensive recognition accuracy of this method is 93% for coal, rock, and gangue; 78% for coal and gangue; and 97% for rock. is method can accurately identify coal, rock, or gangue, which meets the needs of the coal and rock identification process and has practical application value.

Time-Consuming Test for Coal and Rock Identification.
16 kinds of samples are tested, and the time of each test is counted, as shown in Table 5.
e actual application of coal and rock identification in coal mine needs high speed. Nowadays, the recognition time of coal and rock identification technology is about 10 seconds. e experimental results show that the recognition time of 6 types of coal samples, 8 types of rock samples, and 2 types of coal gangue samples in this test is in the range of 2 s∼3 s, which is far less than 10 s, which can meet the requirements of recognition speed of coal and rock.
Column-operations Row-operations

Coal-Rock Identification Morphological Parameter Test.
e same sample is used to identify 20 times continuously. Taking bituminous coal gangue as an example, the average value, variance, and range of each morphological parameter are counted, as shown in Table 6. e accuracy of coal and rock image acquisition equipment has a great impact on the results of coal and rock identification. erefore, it is necessary to test the morphological parameters in the process of coal and rock identification. In this test, 20 measurements are made on the same sample, and the range, variance, and standard deviation between the data obtained from 20 sets of data all meet the accuracy requirements of coal and rock identification. Random verification proves that the image recognition    Granite  20  20  100  20  Sandstone  20  20  100  20  Quartz sandstone  20  20  100  20  Diabase  20  20  100  20  Shale  18  20  90  20  Quartzite  20  20  100  20  Limestone  18  20  90  20  Anorthosite  19  20  95  20  Anthracite  20  20  100  20  Coking coal  20  20  100  20  Fat coal  4  20  20  20  Gas fat coal  8  20  40  20  Gas coal  4  20  20  20  Lignitous coal  13  20  65  20  Lignitous coal gangue  12  20  50  20  Bituminous coal gangue  19  20 95 20

Conclusion
(1) e images of 6 kinds of coal, 8 kinds of rocks, and 2 kinds of coal gangue are collected. e image processing is based on the two-dimensional discrete wavelet transform (2D-DWT) of steerable pyramid tower decomposition (SPD). e method has an obvious visual enhancement effect and obvious surface features. 30 groups of 480 samples of each type are selected to establish the image database.
(2) e maximum likelihood estimation method is used for machine vision recognition. e recognition accuracy of shale and limestone is 90%, that of anorthosite is 95%, and that of other rocks is 100%. In this method, the comprehensive recognition accuracy of coal, rock, and gangue is 93%, the comprehensive recognition rate of coal and gangue is 78%, and the accuracy of rock type identification is 97%. (3) e identification time of 6 types of coal samples, 8 types of rock samples, and 2 types of coal gangue samples in this test is in the range of 2 s∼3 s, which is far less than 10 s, which can meet the requirements of coal and rock identification in terms of identification speed. e same coal gangue sample is measured for 20 times, and the range, variance, and standard deviation between the data are obtained according to 20 groups of data. e range, variance, and standard deviation of each data meet the accuracy requirements of coal and rock identification. is paper provides an effective method to improve the recognition accuracy of coal rock and gangue and provide a theoretical basis for intelligent adjustment of drum.

Data Availability
All the data supporting this paper are mentioned in the manuscript.

Conflicts of Interest
e authors declare that they have no conflicts of interest.