# A Coal Gangue Identification Method Based on HOG Combined with LBP Features and Improved Support Vector Machine

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

_{2}and Al

_{2}O

_{3}[3,4]. Raw coal mixed with gangue will not only reduce the quality of coal but also seriously pollute the atmospheric environment when burned. Therefore, coal gangue identification and separation is a vital part of the coal production process. In China, the coal industry will enter a stage of high-quality development, and the Chinese government is actively promoting efficient, clean, and green coal mining [5,6,7,8].

## 2. Design of Image Acquisition Experimental Platform

## 3. Image Processing

## 4. Future Extraction

#### 4.1. Histogram of Oriented Gradient

_{K}is used to represent the K-th gradient direction; if the gradient direction of a pixel in the square cell is bin

_{K}, the corresponding column value of the gradient direction is added to the gradient value of the pixel. In this paper, K takes 9; that is, the gradient direction is between 0° and 180°, and every 20° is divided into one direction to obtain 9 gradient directions.

#### 4.2. Local Binary Pattern

#### 4.2.1. Basic LBP Operator

_{c}, y

_{c}) is the coordinates of the central pixel, p is the p-th pixel of the neighborhood, g

_{p}is the gray value of the neighborhood pixel, g

_{c}is the gray value of the central pixel, and s(x) is the symbol function.

#### 4.2.2. Improved LBP Operator

_{P}

_{,R}; that is, in the circular neighborhood with radius R, there are P pixels compared with the central pixel threshold point, and, finally, its minimum value is the LBP value of the neighborhood.

_{c}, y

_{c}), its neighborhood pixel position is (x

_{p}, y

_{p}), p ∈ P, and the sampled pixel point (x

_{p}, y

_{p}) can be calculated as follows:

#### 4.3. HOG Combined with LBP Features

## 5. Support Vector Machine Classification

#### 5.1. Basic Principles of Support Vector Machine

_{1}, y

_{1}), (x

_{2}, y

_{2}),..., (x

_{n}, y

_{n})}, where x

_{i}∈ R

_{n}, y

_{i}∈ {−1, + 1}, (i = 1,2,..., n). Considering linear inseparable data, SVM takes sample classification as the starting point to find an optimal classification hyperplane by introducing penalty factors and relaxation variables to obtain the following inequality constraint minimization problem:

_{i}, x

_{j}), according to the KKT condition and solving the dual problem, a new objective function is obtained:

#### 5.2. Genetic Algorithm Optimizes Support Vector Machine

#### 5.3. Particle Swarm Optimization Algorithm Optimizes Support Vector Machine

#### 5.4. Grey Wolf Optimization Algorithm Optimizes Support Vector Machine

## 6. Experimental Validation

#### 6.1. Preparation of Dataset

#### 6.2. Model Parameter Setting

#### 6.3. Experimental Results and Analysis

## 7. Conclusions and Future Work

## Author Contributions

## Funding

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- Wang, J.; Liu, F.; Wang, L. Sustainable coal mining and mining sciences. J. China Coal Soc.
**2016**, 41, 2651–2660. [Google Scholar] - Zhou, N.; Yao, Y.; Song, W.; He, Z.; Meng, G.; Liu, Y. Present situation and Prospect of coal gangue treatment technology. J. Min. Saf. Eng.
**2020**, 37, 11. [Google Scholar] - Han, L.; Ren, W.; Wang, B.; He, X.; Ma, L.; Huo, Q.; Wang, J.; Bao, W.; Chang, L. Extraction of SiO
_{2}and Al_{2}O_{3}from coal gangue actuvated by supercritical water. Fuel**2019**, 253, 1184–1192. [Google Scholar] [CrossRef] - Xiao, J.; Li, F.; Zhong, Q.; Bao, H.; Wang, B.; Huang, J.; Zhang, Y. Separation of aluminum and silica from coal gangue by elevated temperature acid leaching for the preparation of alumina and SiC. Hydrometallurgy
**2015**, 155, 118–124. [Google Scholar] [CrossRef] - Wang, G.; Wang, H.; Ren, H.; Zhao, G.; Pang, Y.; Du, Y.; Zhang, J.; Hou, G. 2025 scenarios and development path of intelligent coal mine. J. China Coal Soc.
**2018**, 43, 295–305. [Google Scholar] - Bai, G.; Xu, T. Coal Mine Safety Evaluation Based on Machine Learning: A BP Neural Network Model. Comput. Intell. Neurosc.
**2022**, 2022, 5233845. [Google Scholar] [CrossRef] [PubMed] - Dai, S.; Zheng, X.; Wang, X.; Finkelman, R.B.; Jiang, Y.; Ren, D.; Yan, X.; Zhou, Y. Stone coal in China: A review. Int. Geol. Rev.
**2018**, 60, 736–753. [Google Scholar] [CrossRef] - Liu, H.; Liu, Z. Recycling utilization patterns of coal mining waste in China. Resour. Conserv. Recycl.
**2010**, 54, 1331–1440. [Google Scholar] - Zou, H.; Jia, R. Visual Positioning and Recognition of Gangues Based on Scratch Feature Detection. Trait. du Signal
**2019**, 36, 147–153. [Google Scholar] [CrossRef] - Yang, Y.; Zeng, Q.; Yin, G.; Wan, L. Vibration Test of Single Coal Gangue Particle Directly Impacting the Metal Plate and the Study of Coal Gangue Recognition Based on Vibration Signal and Stacking Integration. IEEE Access
**2019**, 7, 106784–106805. [Google Scholar] [CrossRef] - Yang, D.; Li, J.; Zheng, K.; Du, C.; Liu, S. Impact-Crush Separation Characteristics of Coal and Gangue. Int. J. Coal Prep. Util.
**2018**, 38, 127–134. [Google Scholar] [CrossRef] - Xing, J.; Zhao, Z.; Wang, Y.; Nie, L.; Du, X. Coal and gangue identification method based on the intensity image of lidar and DenseNet. Appl. Opt.
**2021**, 60, 6566–6572. [Google Scholar] [CrossRef] - Wang, W.; Zhang, C. Separating coal and gangue using three-dimensional laser scanning. Int. J. Miner. Process.
**2017**, 169, 79–84. [Google Scholar] [CrossRef] - Hu, F.; Zhou, M.; Yan, P.; Bian, K.; Dai, R. Multispectral Imaging: A New Solution for Identification of Coal and Gangue. IEEE Access
**2019**, 7, 169697–169704. [Google Scholar] [CrossRef] - Hu, F.; Hu, Y.; Cui, E.; Guan, Y.; Gao, B.; Wang, X.; Wang, K.; Liu, Y.; Yao, X. Recognition method of coal and gangue combined with structural similarity index measure and principal component analysis network under multispectral imaging. Microchem. J.
**2023**, 186, 108330. [Google Scholar] [CrossRef] - Alfarzaeai, M.S.; Niu, Q.; Zhao, J.Q.; Eshaq, R.; Hu, E.Y. Coal/Gangue Recognition Using Convolutional Neural Networks and Thermal Images. IEEE Access
**2019**, 7, 169697–169704. [Google Scholar] [CrossRef] - Zou, L.; Yu, X.H.; Li, M.; Lei, M.; Yu, H. Nondestructive Identification of Coal and Gangue via Near-Infrared Spectroscopy Based on Improved Broad Learning. IEEE Trans. Instrum. Meas.
**2020**, 69, 8043–8052. [Google Scholar] [CrossRef] - Song, L.; Liu, S.; Yu, M.; Mao, Y.; Wu, L. Research on coal and gangue classification method based on combined analysis of visible-near infrared and thermal infrared spectroscopy. Spectrosc. Spectr. Anal.
**2017**, 37, 416–422. [Google Scholar] - Song, L.; Yu, Y.; Yan, Z.; Xiao, D.; Sun, Y.; Zhang, X.; Li, X.; Cheng, B.; Gao, H.; Bai, D. Rapid Analysis of Composition of Coal Gangue Based on Deep Learning and Thermal Infrared Spectroscopy. Sustainability
**2022**, 14, 16210. [Google Scholar] [CrossRef] - Yang, H.G.; Qiao, Z.M. Design of separation system of coal and gangue based on X-ray and machine vision. Ind. Mine Autom.
**2017**, 43, 85–89. [Google Scholar] - Zhang, N.; Liu, C. Radiation characteristics of natural gamma-ray from coal and gangue for recognition in top coal caving. Sci. Rep.
**2018**, 8, 190. [Google Scholar] [CrossRef] [Green Version] - Fan, C.-L.; Chung, Y.-J. Supervised Machine Learning-Based Detection of Concrete Efflorescence. Symmetry
**2022**, 14, 2384. [Google Scholar] [CrossRef] - Doan, M.; Carpenter, A.E. Leveraging machine vision in cell-based diagnostics to do more with less. Nat. Mater.
**2019**, 18, 414–418. [Google Scholar] [CrossRef] [PubMed] - Huang, H.; Dou, D.; Zhang, C. Detecting coal-carrying rate in gangue based on binocular machine vision and particle queuing method. Int. J. Coal Prep. Util.
**2022**, 1–13. [Google Scholar] [CrossRef] - Chaves, D.; Fernandez-Robles, L.; Bernal, J.; Alegre, E.; Trujillo, M. Automatic characterisation of chars from the combusion of pulverised coals using machine vision. Powder Technol.
**2018**, 338, 110–118. [Google Scholar] [CrossRef] - Li, N.; Xue, J.; Gao, S. Feature extraction method CNDFA for target contour of coal and gangue based on multifractal. J. Electron. Imaging
**2022**, 31, 041217. [Google Scholar] [CrossRef] - Xue, G.; Li, X.; Qian, X.; Zhang, Y. Coal-gangue image recognition in fully-mechanized caving face based on random forest. Ind. Mine Autom.
**2020**, 46, 57–62. [Google Scholar] - Lin, X.; Zhang, P.; Meng, F.; Liu, C. A Coal Seam Thickness Prediction Model Based on CPSAC and WOA-LS-SVM: A Case Study on the ZJ Mine in the Huainan Coalfield. Energies
**2022**, 15, 7324. [Google Scholar] [CrossRef] - Liu, Q.; Li, J.; Li, Y.; Gao, M. Recognition Methods for Coal and Coal Gangue Based on Deep Learning. IEEE Access
**2021**, 9, 77599–77610. [Google Scholar] [CrossRef] - Gao, R.; Sun, Z.; Li, W.; Pei, L.; Hu, Y.; Xiao, L. Automatic Coal and Gangue Segmentation Using U-Net Based Fully Convolutional Networks. Energies
**2020**, 13, 829. [Google Scholar] [CrossRef] [Green Version] - Li, D.Y.; Wang, G.F.; Zhang, Y.; Wang, S. Coal gangue detection and recognition algorithm based on deformable convolution YOLOv3. Int. Image Process
**2022**, 16, 134–144. [Google Scholar] [CrossRef] - Wang, D.; Ni, J.; Du, T. An Image Recognition Method for Coal Gangue Based on ASGS-CWOA and BP Neural Network. Symmetry
**2022**, 14, 880. [Google Scholar] [CrossRef] - Shen, X.; Niu, L.; Qi, Z.; Tian, Y. Support vector machine classifier with truncated pinball loss. Pattern Recognit.
**2017**, 68, 199–210. [Google Scholar] [CrossRef] - Li, C.; Peng, T.; Zhu, Y. A Cutting Pattern Recognition Method for Shearers Based on ICEEMDAN and Improved Grey Wolf Optimizer Algorithm-Optimized SVM. Appl. Sci.
**2021**, 11, 9081. [Google Scholar] [CrossRef] - Wang, H.; Wei, S.B.; Fang, B.F. Facial expression recognition using iterative fusion of MO-HOG and deep features. J. Supercomput.
**2020**, 76, 3211–3221. [Google Scholar] [CrossRef] - Xu, P.; Huang, L.; Song, Y. An optimal method based on HOG-SVM for fault detection. Multimed. Tools Appl.
**2022**, 81, 6995–7010. [Google Scholar] [CrossRef] - Yang, B.; Chen, S. A comparative study on local binary pattern (LBP) based face recognition: LBP histogram versus LBP image. Neurocompuying
**2013**, 120, 365–379. [Google Scholar] [CrossRef] - Ojala, T.; Pietikainen, M.; Harwood, D. Performance evalution of texture measure with classification based on Kullback discrimination of distribution. In Proceedings of the 12th International Conference on Pattern Recognition, Jerusalem, Israel, 9–13 October 1994; pp. 582–585. [Google Scholar]
- Burges, C. A Tutorial on Support Vector Machine for Pattern Recognition. Data Min. Knowl. Discov.
**1998**, 2, 121–167. [Google Scholar] [CrossRef] - Wang, L.; Liu, Y.; Li, T.; Xie, X.; Chang, C. The Short-Term Forecasting of Asymmetry Photovoltaic Power Based on the Feature Extraction of PV Power and SVM Algorithm. Symmetry
**2020**, 12, 1777. [Google Scholar] [CrossRef] - Katoch, S.; Chauhan, S.S.; Kumar, V. A review on genetic algorithm: Past, present, and future. Multimed. Tools Appl.
**2021**, 80, 8091–8126. [Google Scholar] [CrossRef] - Wang, B.; Huang, H.; Dou, D.; Qiu, Z. Detection of coal content in gangue via image analysis and particle swarm optimization-support vector machine. Int. J. Coal Prep. Util.
**2021**, 42, 1915–1924. [Google Scholar] [CrossRef] - Mirjalili, S.; Mirjalili, S.M.; Lewis, A. Grey Wolf Optimizer. Adv. Eng. Softw.
**2014**, 69, 46–61. [Google Scholar] [CrossRef] [Green Version] - Dong, Z.; Zheng, J.; Huang, S.; Pan, H.; Liu, Q. Time-Shift Multi-Scale Weighted Permutation Entropy and GWO-SVM Based Fault Diagnosis Approach for Rolling Bearing. Entropy
**2019**, 21, 621. [Google Scholar] [CrossRef] [Green Version] - Hou, Y.; Gao, H.; Wang, Z.; Du, C. Improved Grey Wolf Optimization Algorithm and Application. Sensors
**2022**, 22, 3810. [Google Scholar] [CrossRef] [PubMed] - Gupta, S.; Deep, K. Enhanced leadership-inspired grey wolf optimizer for global optimization problems. Eng. Comput.
**2020**, 36, 1777–1800. [Google Scholar] [CrossRef]

**Figure 3.**The effect of the three filtering methods. (

**a**) Original image; (

**b**) 3 × 3 filtering; (

**c**) 5 × 5 filtering; (

**d**) 7 × 7 filtering.

**Figure 4.**HOG feature visualization of coal. (

**a**) Original image; (

**b**) HOG feature diagram; (

**c**) HOG feature histogram.

**Figure 10.**Grey wolf position update in GWO algorithm. Blue circle: α wolves; purple circle: β wolves; green circle: δ wolves; red circle: ω wolves or any other hunters; yellow circle: position of the prey.

**Figure 12.**(

**a**) Classification accuracy on the training set; (

**b**) classification accuracy on the test set. Red *: GWO-SVM; blue circles: PSO-SVM; green circles: GA-SVM; black *: SVM.

Number | Model | Parameter Setting |
---|---|---|

1 | SVM | The training function libsvmtrain is called here to train the SVM model, and the test set is tested and verified by the libsvmpredict function to obtain the identification classification accuracy. The experiment was run on MATLAB R2022a software. |

2 | GA-SVM | Genetic algorithm is used to optimize the support vector machine. The genetic algorithm is called MATLAB R2022a toolbox. The population size Np is 100, the cross-probability Pc is 0.7, the probability of variation Pm is 0.005, and the genetic maximum evolutionary algebra G is 200. |

3 | PSO-SVM | Particle swarm optimization is used to optimize the support vector machine. The experiment has the following related settings by calling the toolbox of “PSOt” in MATLAB: the number of particles N = 20, learning factor c1 and c2 are 1.5, the inertia weight w is 0.8, and the maximum number of iterations G is 200. |

4 | GWO-SVM | GWO algorithm was used to optimize the penalty factor C and kernel parameter g of SVM, where the population size of grey wolf M is 20 and the maximum number of iterations t_{max} is 200. |

Number | Classification Accuracy on Training Set | Classification Accuracy on Test Set | ||||||
---|---|---|---|---|---|---|---|---|

SVM | GA-SVM | PSOSVM | GWO-SVM | SVM | GA-SVM | PSO-SVM | GWO-SVM | |

1 | 90.00% | 91.12% | 94.45% | 100.00% | 87.78% | 90.00% | 93.34% | 96.67% |

2 | 88.89% | 92.23% | 91.12% | 96.67% | 85.56% | 91.12% | 92.23% | 95.56% |

3 | 90.00% | 90.00% | 92.23% | 95.56% | 86.67% | 88.89% | 90.00% | 94.45% |

4 | 91.12% | 90.00% | 92.23% | 96.67% | 86.67% | 90.00% | 91.12% | 95.56% |

5 | 88.89% | 88.89% | 91.12% | 94.45% | 84.45% | 88.89% | 88.89% | 93.34% |

6 | 87.78% | 92.23% | 91.12% | 94.45% | 86.67% | 87.78% | 90.00% | 95.56% |

7 | 88.89% | 92.23% | 94.45% | 95.56% | 87.78% | 91.12% | 90.00% | 94.45% |

8 | 86.67% | 90.00% | 93.34% | 96.67% | 85.56% | 90.00% | 92.23% | 95.56% |

9 | 88.89% | 90.00% | 94.45% | 95.56% | 85.56% | 88.89% | 90.00% | 94.45% |

10 | 90.00% | 91.12% | 92.23% | 97.78% | 85.56% | 87.78% | 91.12% | 94.45% |

11 | 90.00% | 91.12% | 93.34% | 100.00% | 88.89% | 90.00% | 88.89% | 96.67% |

12 | 88.89% | 92.23% | 92.23% | 96.67% | 88.89% | 88.89% | 90.00% | 95.56% |

13 | 88.89% | 93.34% | 94.45% | 95.56% | 86.67% | 90.00% | 90.00% | 94.45% |

14 | 88.89% | 90.00% | 93.34% | 96.67% | 87.78% | 90.00% | 91.12% | 93.34% |

15 | 91.12% | 91.12% | 92.23% | 95.56% | 85.56% | 88.89% | 91.12% | 94.45% |

16 | 90.00% | 90.00% | 92.23% | 94.45% | 86.67% | 88.89% | 88.89% | 93.34% |

17 | 90.00% | 92.23% | 91.12% | 96.67% | 85.56% | 91.12% | 90.00% | 94.45% |

18 | 91.12% | 92.23% | 94.45% | 96.67% | 86.67% | 88.89% | 92.23% | 94.45% |

19 | 91.12% | 93.34% | 93.34% | 95.56% | 87.78% | 90.00% | 92.23% | 94.45% |

20 | 88.89% | 92.23% | 94.45% | 97.78% | 86.67% | 90.00% | 91.12% | 95.56% |

21 | 88.89% | 92.23% | 93.34% | 97.78% | 86.67% | 88.89% | 91.12% | 94.45% |

22 | 88.89% | 91.12% | 93.34% | 96.67% | 87.78% | 90.00% | 91.12% | 96.67% |

23 | 90.00% | 92.23% | 93.34% | 96.67% | 87.78% | 90.00% | 90.00% | 95.56% |

24 | 90.00% | 92.23% | 92.23% | 96.67% | 87.78% | 88.89% | 90.00% | 95.56% |

25 | 91.12% | 93.34% | 92.23% | 95.56% | 85.56% | 91.12% | 91.12% | 93.34% |

26 | 88.89% | 92.23% | 93.34% | 97.78% | 86.67% | 91.12% | 92.23% | 93.34% |

27 | 90.00% | 92.23% | 91.12% | 95.56% | 86.67% | 90.00% | 91.12% | 94.45% |

28 | 90.00% | 91.12% | 92.23% | 95.56% | 87.78% | 90.00% | 91.12% | 94.45% |

29 | 91.12% | 91.12% | 92.23% | 96.67% | 87.78% | 88.89% | 90.00% | 95.56% |

30 | 90.00% | 92.23% | 93.34% | 96.67% | 86.67% | 90.00% | 91.12% | 94.45% |

Average accuracy | 89.63% | 91.52% | 92.82% | 96.49% | 86.82% | 89.67% | 90.78% | 94.82% |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Cheng, G.; Chen, J.; Wei, Y.; Chen, S.; Pan, Z.
A Coal Gangue Identification Method Based on HOG Combined with LBP Features and Improved Support Vector Machine. *Symmetry* **2023**, *15*, 202.
https://doi.org/10.3390/sym15010202

**AMA Style**

Cheng G, Chen J, Wei Y, Chen S, Pan Z.
A Coal Gangue Identification Method Based on HOG Combined with LBP Features and Improved Support Vector Machine. *Symmetry*. 2023; 15(1):202.
https://doi.org/10.3390/sym15010202

**Chicago/Turabian Style**

Cheng, Gang, Jie Chen, Yifan Wei, Sensen Chen, and Zeye Pan.
2023. "A Coal Gangue Identification Method Based on HOG Combined with LBP Features and Improved Support Vector Machine" *Symmetry* 15, no. 1: 202.
https://doi.org/10.3390/sym15010202