## 3 Methods
### Feature Extraction  
Inspired by the way that the petrologists examine photomicrographs, we extracted three types of features for maceral identification. Table 2 lists 172 features utilized in this study, such as reflectance contrasts, shape, morphology and size, which can be categorized into geometric, grayscale and texture features [23]. The detailed descriptions of these features can refer to the papers on image pattern recognition [24; 25].  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Geometric Features (x1\(\rightarrow\)x16)** & **Grayscale Features (x17\(\rightarrow\)x90)** & **Texture Features (691\(\rightarrow\)x172)** \\ \hline x1: Area & x17: Mean gray value & x91\(\rightarrow\)x92: Mean and standard deviation of energy \\ x2: Perimeter & x18: Standard deviation of gray value & x93\(\rightarrow\)x94: Mean and standard deviation of entropy \\ x3: Rectangle degree & x19: Max gray value & x95\(\rightarrow\)x96: Mean and standard deviation of inertial moment \\ x4: Aspect ratio & x20: Min gray value & x97\(\rightarrow\)x98: Mean and standard deviation of correlative \\ x5: Length of long axis & x21: Gray scale median & x39\(\rightarrow\)x100: Small and large gradient advantage \\ x6: Length of short axis & x22: Gray scale mode & x101\(\rightarrow\)x102: Inhomogeneity of grayscale and gradient distribution \\ x7: Eccentricity & x23: Average contrast & x103\(\rightarrow\) energy \\ x8: Solidity & x24: Smoothing Degree & x104\(\rightarrow\)x105: Mean value of grayscale and gradient \\ x9: Extent & x25: Third-order Moment & x106\(\rightarrow\)x107: Mean variance of grayscale and gradient \\ x10\(\rightarrow\)x16: Hu\({}^{\prime}\) seven invariant moments & x26\(\rightarrow\)x90: Grayscale probability & x108\(\rightarrow\)x11: Grayscale entropy; gradient entropy, mixed entropy \\  & & x112\(\rightarrow\) inertia \\  & & x113\(\rightarrow\) Deficit moment \\  & & x114\(\rightarrow\)x172: Fifty-nine local binary pattern features \\ \hline \hline \end{tabular}
\end{table}
Table 2: Feature space utilized in this study.  
For instance, we employ the image moment as the shape descriptor. The moment invariants have been extensively exploited to characterize image patterns. Among various image moments, Hu's 7 invariant moments have been widely applied in a variety of applications for its invariant features on image translation, scaling and rotation [26]. They are defined as follows:  
\[M_{1} =\eta_{20}+\eta_{02}\] \[M_{2} =(\eta_{20}-\eta_{02})^{2}+4\eta_{11}\] \[M_{3} =(\eta_{30}-3\eta_{12})^{2}+(3\eta_{21}-\eta_{03})^{2}\] \[M_{4} =(\eta_{30}+\eta_{12})^{2}+(\eta_{21}+\eta_{03})^{2}\] \[M_{5} =(\eta_{03}-3\eta_{12})(\eta_{30}+\eta_{12})[(\eta_{30}+3\eta_{1 2})^{2}-3(\eta_{21}+\eta_{03})^{2}]+ \tag{3}\] \[(3\eta_{21}-\eta_{03})(\eta_{21}+\eta_{03})[3(\eta_{30}+\eta_{12 })^{2}-(\eta_{21}+\eta_{03})^{2}]\] \[M_{6} =(\eta_{20}-\eta_{02})[(\eta_{30}+\eta_{12})^{2}-(\eta_{21}+\eta _{03})^{2}]+4\eta_{11}(\eta_{30}+\eta_{12})(\eta_{21}+\eta_{03})\] \[M_{7} =(3\eta_{21}-\eta_{03})(\eta_{30}+\eta_{12})[(\eta_{30}+\eta_{12 })^{2}-3(\eta_{21}+\eta_{03})^{2}]+\] \[(3\eta_{21}-\eta_{30})(\eta_{21}+\eta_{03})[3(\eta_{30}+\eta_{12 })^{2}-(\eta_{21}+\eta_{03})^{2}]\]  
\[\eta_{ab}=\frac{\mu_{ab}}{\mu_{00}^{\rho}},\rho=\frac{a+b}{2}+1 \tag{4}\]  
where \(\mu_{ab}\) represents the central moment and \(\eta_{ab}\) stands for the normalized central moments.  
The features x17-x90 are the statistical characters related to the gray scale values of the region of interest; x91-x99 are statistics for examining texture features based on the spatial relationship of pixels [27]; x99-x113 are the gray gradient features [28]; and the remaining features x114-x172 correspond to local binary patterns encoding the texture information [29].