# Research on Coal and Rock Recognition in Coal Mining Based on Artificial Neural Network Models
## 2 Coal and Rock Image Acquisition and Image Feature Extraction
### Image Feature Extraction Based on Wavelet Three-Level Decomposition  
The experimental site is the 52603 fully mechanized mining face of the Tashan Coal Mine in Shanxi Province, with a total length of 135 m. A mine explosion-proof camera is used to video capture the mining area of the whole fully mechanized mining face. The captured video is intercepted every 1 s, and a total of 1860 pictures are obtained. Then, the sample maps that meet the experimental requirements are selected, and the number of samples is expanded by image cropping. A total of 270 sample maps that meet the experimental requirements are obtained. The acquired sample images are classified into coal seam images, rock stratum images, and coal-rock mixed-layer images and numbered. Some samples are shown in Figure 2. Finally, the sample images are randomly divided into training sets and test sets in a ratio of 2:1 for deep learning training. When using the neural network model for coal and rock recognition, it is preferred to determine the type of image features and to extract the eigenvalues. In this paper, a feature extraction method using wavelet three-level decomposition to extract texture features of images is proposed. The three-level wavelet decomposition is to extract image features by the multi-scale and multi-resolution decomposition of the image. It can fully reflect the difference of coal seam image, rock stratum image, and coal-rock mixed-layer image features while avoiding the redundancy and over-fitting problems caused by too many features and can thus ensure the high-precision and fast recognition of coal images and rock images by the network model [15; 16]. The principle of the wavelet decomposition of an image is to perform convolutional filtering on the image through a low-pass filter and a high-pass filter and then to perform a two-to-one downsampling. Each decomposition continuously decomposes the low-frequency part of each level, and the high-frequency part does not move [17; 18]. The principle of wavelet three-level decomposition is shown in Figure 3. In the figure, L and H represent low-frequency and high-frequency information, respectively. LL is a low-frequency sub-band, which is an approximate representation of the image. HL, LH,  
Figure 2: Coal mining area image acquisition system. (**a**) Coal seam sample image; (**b**) Rock stratum sample image; (**c**) Coal–rock mixed-layer sample image. and HH are all high-frequency sub-bands, which represent the details of the image in all directions. The subscript represents the level of wavelet decomposition. Three kinds of images (coal seam images, rock images, and coal-rock mixed-layer images) are decomposed by wavelet three-level decomposition, and the wavelet coefficients of their low-frequency sub-bands (LL sub-bands) are calculated as the eigenvalues of image texture features. In this section, the wavelet three-level decomposition results of coal seam images are taken as an example to demonstrate the texture feature extraction results of images based on wavelet three-level decomposition, as shown in Figure 4a. In the experiment, the wavelet coefficients calculated by the LL\({}_{1}\) sub-band, that is, the texture features of the coal seam image extracted in the LL\({}_{1}\) sub-band, are drawn into a network diagram, as shown in Figure 4b. The wavelet coefficients calculated from the LL\({}_{2}\) sub-band, that is, the texture features extracted from the LL\({}_{2}\) sub-band, are drawn into a network, as shown in Figure 4c. The wavelet coefficients calculated from the LL\({}_{3}\) sub-band, that is, the texture features extracted from the LL\({}_{3}\) sub-band, are drawn into a network, as shown in Figure 4d. Figure 4: Coal seam image decomposition results and sub-band characteristic network diagram.