During the process of pellet production, rotary kiln is the key equipment. There is a very vital relationship between the temperature of the kiln and the quality of sintering. However the state of the flames in the rotary kiln has been observed by the man who depends on personal experience. It can make the workers so tired that it leads to accidents.
Zhou Huaichun  obtained flame monochromatic image by the installation of monochromatic filter in front of the CCD. The radiation energy of a monochromatic image can be compared with that of a reference point to obtain the temperature field distribution. But the location of the reference point is not easy to be determined. You Jia, Wang Shaochun  judged the blowing final point of top-blowing BOF based on flame texture features by the method of template matching. But the flame is only divided into two categories, namely, it is the image of the terminal point of blowing or it is not the terminal point of blowing. He Min  proposed a qualitative analysis method of clinker sintering state based on texture analysis. The flame is classified as “over burning”, “under burning” and “being burned”. But the calculation is large; the method is complex, and the temperature of the flame cannot be monitored in real time.
In this paper, we used the gray level co-occurrence matrix to describe the texture characteristics, and study the relationship between temperature and the texture characteristics including energy, entropy, contrast, correlation in each channel of RGB. Texture-temperature model is made. The method can monitor the real-time temperature status in different parts of the flame, and the error is small.
2. Texture Feature Analysis Based on Gray Level Co-Occurrence Matrix
Texture is a kind of visual feature to reflect gray-level in the neighborhood, which does not depend on the color or brightness variation  .
Texture, as a kind of regional feature, is a description of the spatial distribution of each pixel in the image. There are many methods to extract texture, such as the local statistical characteristics, characteristics of the random field model, and the characteristics of spatial frequency. Among them, the most widely used method is based on the gray level co-occurrence matrix  .
Gray level co-occurrence matrix is a matrix function of distance and angle of pixels. By calculating the correlation between the two points of a certain distance and a certain direction in the image, it can reflect the comprehensive information of the direction, distance, amplitude and speed of the image.
In order to describe the texture state more intuitively by the co-occurrence matrix, some parameters which reflect the matrix condition are derived from the gray level co-occurrence matrix.
It provides the sum of squared elements in the gray-level co-occurrence matrix (GLCM), also known as uniformity or the angular second moment. The mathematical definition of energy is as follows:
When the distribution of value is more concentrated, the energy is larger; when the distribution of value is more dispersed, the energy is smaller.
Correlation is the similarity degree of the elements in line or column direction. Therefore, the relevant value reflects the local gray correlation. When the matrix element value is similar, the correlation value is big. On the contrary, if the pixel value of the matrix is much different, then the correlation value is small. The mathematical definition of correlation is as follows.
where, , , , is respectively mean value and standard deviation of mx and my.
Entropy is a measure of the information in the image. The texture information also belongs to the image information. It represents the degree of heterogeneity or complexity of the texture in the image. The mathematical expression of entropy is as follows.
If the distribution of is more uniform, the entropy is larger; on the contrary, when the value distribution is relatively concentrated, the entropy is small.
The contrast reflects the clarity of the image and depth of texture. The deeper the texture is, the greater the contrast is. The results are better. On the contrary, if the contrast is small, they are shallow grooves, the effect is fuzzy. The greater the gray level difference is, the greater the contrast is  .
3. Data Processing
(1) Image denoising
In order to study the temperature of flame, the flame stratification is used, as shown in Figure 1. In the process of the image collection, there is a variety of random noise. In this paper, the median filtering method is used for image denoising, which can effectively improve the image quality and get the purpose of smoothing, as shown in Figure 2.
(a) (b) (c) (d)
Figure 1. Hierarchical image. (a) Original flame image; (b) Flame image in R channel; (c) Flame image in G channel (d) Flame image in B channel.
(a) (b) (c)
Figure 2. Flame image after median filtering. (a) Filtered image in R channel; (b) Filtered image in G channel; (c) Filtered image in B channel.
(2) Image segmentation
In the process of flame segmentation, threshold segmentation method is used, and the threshold value is set according to the actual demand. In order to study the relationship between texture and temperature more accurately, the image is divided more detailedly, as shown in Figure 3.
4. Feature Extraction
Texture is used to study the characteristics of a region. It is not meaningful to study the texture of a single point separately. We use threshold segmentation method to divide an image into some grades according to every 10 gray levels. The average temperature within a certain range is calculated, and the values of the texture features of the RGB in this gray range are also calculated. The table is shown in Table 1.
At different temperatures, there is a certain difference in the characteristics of flame texture. The gray mean value of the RGB three channels in different parts of the flame is calculated, and the 4 directions of the gray level co-occurrence matrix are 0˚, 45˚, 90˚, 135˚. Texture feature parameters of energy, entropy, correlation, contrast calculation are calculated, interval distance is 1. Data show that the image texture is not obvious direction, so we take to analyze the texture parameters.
Figure 3. Flame image’s threshold segmentation.
Table 1. Average temperature of equal interval gray scale.
The gray level series of the image is 256 grades, when the series is large; the amount of computation of the gray level co-occurrence matrix is increased. In general, the image gray series is compressed to 8 or 16 grades. In this paper, the gray series is compressed to 16 grades. Now we study the relationship between the characteristic parameters and temperature of the flame texture at .
The original image data is used directly to fit the texture-temperature curve, the error is larger, so it is decomposed into RGB three channels. Then we calculate the characteristic parameters of the gray level image co-occurrence matrix of each channel of RGB: energy, entropy, contrast, correlation, shown in Figures 4-7.
By the corresponding relationship between the temperature and the characteristic parameters of the texture, the curves of energy, entropy, contrast, correlation and temperature were used to fit the function of three elements respectively.
where, are the coefficients that need to be determined.
Figure 4. The curves of energy and temperature.
Figure 5. The curves of entropy and temperature.
Figure 6. The curves of contrast and temperature.
Figure 7. The curves of correlation and temperature.
Linear regression equations for predicting temperature were obtained by using linear regression function in MATLAB.
Re, Ge, Be are the energy values of RGB channels, respectively.
Re, Ge, Be are the entropy values of RGB channels, respectively.
Re, Ge, Be are the contrast values of RGB channels, respectively.
Re, Ge, Be are the correlation values of RGB channels, respectively.
Now, the fitted function is evaluated, the result is shown in Table 2. It can be seen that the fitting residual error between the correlation and the temperature is the smallest, and the fitting is the best. Therefore this paper establishes the model of the correlation and temperature, as shown in the expression (12).
The temperature of the certain point can be calculated by calculating the correlation value of the flame RGB.
The larger the correlation coefficient is, and the more close to 1 it is, the more significant the regression equation is. The smaller the residual error is, the more close to the predicted temperature.
5. The Application of the Algorithm in the Candle Flame
In order to test the universality of the algorithm, candle flame temperature is detected. In the laboratory, a thermocouple is used to get the candle flame. The candle temperatures of the outer flame, middle flame and inner flame were collected respectively, as shown in Figure 8.
With the same method, candle flame is treated into RGB channels, the relationship of temperature and gray is established. Taking advantage of the linear regression function in MATLAB, the regression equation of the temperature prediction is:
where, , , are the correlation values of RGB channels, respectively.
We measured some other points in the candle flame, calculated values were obtained by Expression (13), shown in Table 3. We can see the maximum error percentage is less than 3%.
Figure 8. Original image of the outer flame, middle flame and inner flame.
Table 2. Statistic table based on fitting function.
Table 3. Comparison of error between the measured flame temperature and calculated values of the candle flame temperature.
The largest error of the measured values and calculated values of the candle flame temperature is less than 3%. This shows that the algorithm is universal.
In this paper, the color image of flame in rotary kiln is decomposed into three gray images of RGB. The curves of energy, entropy, contrast, correlation and temperature of each channel’s texture parameters are compared. In these texture feature parameters, the relationship between the correlation and the temperature is the most obvious. In this paper, the relationship between texture and temperature is used to establish the model of flame temperature monitoring, effectively monitor the flame image, and calculate the corresponding temperature value. It is simple and easy to implement. The algorithm is also universal.