Research on Coal and Rock Image Recognition Based on 2DPCA Algorithm

The PCA algorithm in coal and rock recognition had some fundamental flaws such as large computation and low efficiency. In this paper, a coal and rock image recognition method based on 2DPCA algorithm was proposed. The experimental results showed that this method could not only reduce the dimension of the original feature, but also reduce the complicated calculation and improve the recognition accuracy effectively.


Introduction
In recent years, with the deepening of coal and rock analysis, a variety of identification methods, such as natural gamma ray method, vibration analysis method based on coal seam, radar detection, infrared temperature of coal seam interface recognition and sound detection etc., are applied for coal and rock vitrinitem recognition. These methods have certain application value, but there are also some limitations, such as gamma ray method can only apply to rock and coal containing low content of radioactive elements, while sound test exists a large difference to the coal and rock medium.
PCA (principal component analysis) is one of the commonly used methods in research. It can effectively reduce the dimension of the original matrix and the interference of other components. However, when PCA is applied to coal and rock analysis, it is necessary to transform the twodimensional image matrix, the dimension of the image increases greatly and the feature extraction is difficult subsequently. In order to solve the above problems, according to the calculation principle of PCA, this paper adopts a 2DPCA method for identification. The method is simpler and the recognition rate is better than PCA.

Principle of 2DPCA algorithm
If X represented the m dimensional unitary column vectors, the idea of 2DPCA is to project the image m×n matrix A onto X by linear transformation Y =A T X. So the n-dimensional column vector Y called the projection eigenvector of image A is acquired.
Assuming that there are M training images A1, A2, … AM as m×n matrix, and the total dispersion matrix G of the training mode is is the mean matrix of the training mode population, and it is simple to prove that G is a nonnegative definite matrix of m×m. Define criterion function: . . In order to maximize the dispersion of the image matrix eigenvectorrs obtained after the projection on X, the unit vector of the criterion function is maximized and called the optimal projection vector.Correspondingly, the optimal projection vector is in accordance with the unit eigenvector of the maximum eigenvalue of G. Generally speaking, a single optimal projection direction is not enough in the case of a large number of samples. We need to find a set of optimal projection vectors X1, X2, … Xd that satisfied the orthonormal condition and maximum the criterion function.

Training
Assuming that there are N coal rock images in the training library represented by matrix, where the range of i is (1, N). The training steps of coal rock images are as follows: Step1: the average of all coal rock images in the training library are calculated as: Step 2: the difference between the mean image and the coal image in the training library is acquired, and the standardized image is calculated as ， (3) Step 3: the total dispersion matrix of the training pattern is calculated (4) Step 4: the eigenvalues and eigenvectors of G are calculated, and the optimal projection matrix P is obtained.
Step 5: the feature matrix B of the image sample is constructed. According to the above formula, the characteristic matrix B of the license plate image in the training library is calculated

Identify
The distance between and is defined as: Here the represents the Euclidean distance between two principal component vectors and . The characteristic matrix of training samples are expressed as , and the ( )  represented as B, if d(B, Bt)=min d(B,Bt), j=1,2,…M, so the test result is .

Experimental results and analysis
The collected pictures were divided into training samples and test samples.50 typical single coal and rock images of 128 ×128 size were taken as test charts. In the experiment, each image was firstly divided into a processing window of 9 ×9. After pretreatment to remove the binder and triviality, the recognition results were shown in As can be seen from the experimental data in table 1, when the number of feature vectors is certain, the reliability of coal rock image recognition is related to the number of training samples. In another words, the more training samples, the higher the recognition accuracy.
At the same time, the time-consuming of PCA and 2DPCA under different training sample is measured and shown in table 2. It is clear that the time consumption of 2DPCA method is obviously less in the feature extraction process, and the time difference between two methods is increased with the increasing number of training samples.

Conclusion
The 2DPCA algorithm is applied to coal and rock image recognition , and through experimental comparison, it can be found that: 1) Compared with PCA algorithm, the matrix singular value decomposition and tedious calculation used in image feature extraction can be avoided based on 2DPCA algorithm.
2) The correct recognition rate of 2DPCA algorithm is related to the selection of training samples and test samples. The performance of 2DPCA algorithm is better than that of PCA algorithm under the same conditions.
The experimental results show that the 2DPCA algorithm has a better recognition rate and can be applied to coal and rock image recognition. In further research, the 2DPCA algorithm combined with other coal and rock recognition methods should be considered for improving the recognition rate further .