1. Introduction
Various kinds of natural disasters and man-made disasters pose serious threats to human lives and property, among which fire is one of the most serious hazards. Rapid flame recognition and early warning can greatly reduce the damage to people’s health and property safety, hence they have drawn worldwide attention. On the other hand, fire plays an important role in energy, power, chemical, metallurgical and other basic industries, contributing to developing human’s civilization and improving product quality. Meanwhile, the unsteady combustion state can decrease thermal efficiency, increase emissions, cause flame extinction and even explosion. Consequently, there is no doubt that a reliable and effective method for the combustion state recognition of flame images is needed.
In regards to traditional recognition technologies, the most frequently used methods are smoke sensors, temperature sensors and gas sensors, which recognize the flame through its physical characteristics, such as solid particles, temperature and the release of CO and CO
2 [
1,
2,
3]. However, these methods all require the sensors to keep a certain distance from the flame. Optical sensors, such as photosensitive sensors and infrared sensors, have the advantages of quick response and long recognition distance. However, they are sometimes difficult to deploy such as outdoor locations and large open facilities.
With the continuous development of image processing technology, video-based flame recognition (VFR) has attracted much attention, depending on its obvious advantages. Compared with traditional methods, VFR can recognize the flame itself directly through extracting the features of flame images, such as motion, edge blurring, color and spatial difference. Rosario et al. [
4] used YUV color space to select the suspected flame region. Then according to the diffusion characteristics of flame, the effective detection of flame region was achieved based on the displacement vector variation of SIFT feature points. Zhang et al. [
5] introduced probability analysis into the flame detection, the flame region was decided by calculating the RGB distribution in the specified grid. The final flame detection was realized by the change of suspicious region in the two continuous images. Duong et al. [
6] proposed a method based on the changes of the statistical features in the flame region between different frames. The final result was obtained by Bayes classifier and defined as fire-alarm rate for each frame. Shao et al. [
7] developed a method for flame region detection, which was achieved by introducing the Codebook background model into the YUV color space and extracting the dynamic and static multi-features. A method based on the edge information of flame was proposed in Reference [
8], indicating whether the potential area was a flame region or not. Wang et al. [
9] proposed a fire smoke detection algorithm based on optical flow method and texture feature, which could be used for early fire alarm. Several researchers also have theoretically investigated that the local binary pattern (LBP) [
10,
11], Wald-Wolfowitz random test algorithm [
12], and convolutional neural network [
13] were suitable for flame image detection. Unfortunately, just like the above, most of the existing methods only aim to indicate whether a frame contains flame or not, rather than the combustion state of flame. Although the location, size, color, shape and other features of the flame can reflect the combustion state, it is difficult to describe the combustion state with an exact mathematical model. Therefore, these methods of flame recognition may not be directly used for combustion state recognition.
There are also several studies on combustion state recognition. Lin et al. [
14] presented a simple on-line method for the flame image-based burning state recognition, through comparing the structural similarity (SSIM) indexes between the measured image and reference images. However, the main drawback of SSIM is that it is highly sensitive to rotation, translation and scaling of images, which are typically brought about by the movement of the video cameras. Cheng et al. [
15] put forward a method using complex wavelet structural similarity (CW-SSIM) to recognize the burning state of rotary kiln. Although the CW-SSIM is robust to small rotation, translation and scaling of images, it still cannot solve the practical problem completely.
In terms of combustion state recognition, artificial intelligence (AI) technologies have been widely used for flame image recognition [
16,
17,
18,
19]. Owing to the non-parametric characteristic, AI technologies have a major advantage of requiring no priori concept for the relationships between the input variables and output data [
20]. Support vector machine (SVM) was first proposed by Vapnik [
21], in accordance with the foundation of statistical theory and the principle of structural risk minimization. Among the existing AI technologies, SVM has been proved to have superior performance over previously developed methodologies, such as decision tree, artificial neural network and other conventional statistical models [
22,
23,
24,
25].
Although effective in recognition, the SVM model has a weakness that its performance greatly depends on the parameter selection, which is troublesome and time-consuming for manual operation. To improve the performance and work efficiency, various optimizing algorithms have been introduced into the SVM model, such as genetic algorithm (GA) [
26,
27] and particle swarm optimization (PSO) [
28,
29]. Recently, another intelligent optimization method, fire algorithm (FA) proposed by Yang [
30] has become a promise in optimization problems. To our best knowledge, there are few studies applying FA to obtain the optimal parameters of SVM. However, the traditional FA often suffers from being trapped into local optimum, which causes a premature problem.
This paper aims to realize the combustion state of flame images coupling radial Chebyshev moment invariants (RCMIs) and improved firefly algorithm-wavelet support vector machine (IFA-WSVM) model. Firstly, the potential flame pixels are segmented from candidate images in the YCbCr color space, and the potential flame contour is extracted by the Canny edge detector. Then, the proposed rotation, translation and scaling (RTS) invariants of radial Chebyshev moments are derived. Next, the RCMIs are calculated to extract the local and global multi-features of candidate images, forming feature vectors. In order to enhance the performance of combustion state recognition, the FA is applied to search the best penalty factor and dilation parameter of SVM model with a Morlet wavelet kernel. Due to the defect of the traditional FA, an improved FA algorithm is proposed to increase the convergence rate and adjust the searching step dynamically. Afterwards, the IFA-WSVM model is utilized to recognize the combustion state of the testing set. To illustrate the performance of proposed method, the comparison with the methods based on HMIs and ZMIs is performed. In addition, a comparison of IFA with traditional FA, GA and PSO is also performed, observing its quality of solution. Finally, the results for case studies demonstrate that the proposed method can increase the recognition rate and achieve the highest rate of 99.07%. The methods combining region moment invariants and contour moment invariants outperform those based on region moment invariants, improving the accuracy of feature extraction. They can also recognize the combustion state in real time, consuming less computational resources. Besides this, the developed IFA can enhance potential solution of optimization, which is superior to other benchmark algorithms. For the images transformed by RTS and small training sets, the proposed method maintains the best recognition performance, proving its validity and stability.
3. Improved Firefly Algorithm-Wavelet Support Vector Machine
3.1. Wavelet Support Vector Machine (WSVM)
SVM is a supervised machine learning approach which has been used in forecasting, classification and pattern recognition. Depending on the principle of structural risk minimization and solid statistical theoretical foundation, the SVM can achieve satisfactory classification accuracies under a limited number of training samples. When dealing with nonlinear classification, its basic idea is tantamount to map the input vectors into a very high-dimension feature space, and make classification by maximizing the hyper-plane margin.
Given a set of training samples
,
, where
is the input feature vector of an image,
is the dimension of feature space,
is the corresponding output of
, indicating which class the training sample belongs to, and
is the total account of the training samples. In term of nonlinear classification, the hyper-plane is expressed as:
where
is the weight vector;
is the nonlinear mapping function and
is the offset coefficient.
Based on Equation (16), the margin between different classes can be derived as
. It is quite evident that maximizing
is equivalent to minimizing
. Considering the training samples cannot always be perfectly separable, the SVM optimization problem is defined as:
where
is the penalty factor for the trade-off between maximal margin and tolerable classification errors;
is the slack variable which allows samples to fall off the margin, and
.
To solve the convex quadratic programming problem, Lagrange multipliers are introduced in the above equation. As a result, Equation (17) can be rewritten in a dual formulation:
where
is the Lagrange multiplier of every training sample, and
;
is the kernel function, and
. As a straightforward computation technology, the kernel function is employed to simplify the mapping process. This method enables to calculate the inner product in the feature space which acts as a function to the original input vectors. The results obtained from high-dimension feature space correspond to the outcomes of the original input space.
Assume that the solution of the above equation is
, the corresponding classification function is represented as:
where
. The output of function
is the result of combustion state recognition.
From Equations (18) and (19), it is quite clear that the key technology of SVM is the kernel function, which has a direct effect on the generalization ability and learning ability of the model. In theory, any asymmetric kernel function satisfying Mercer’s condition can be introduced. Generally, the common kernel functions are linear, polynomial, sigmoid and radial basis functions.
Wavelet technology has unique advantages for classification and approximation of non-stationary signals. The model combing wavelet technology with the SVM is superior to the traditional SVM in terms of generalization ability and accuracy in classification [
38,
39]. In wavelet analysis, a function or signal is approximated or expressed by a family of functions generated by dilations and translations of a function called the mother wavelet. The principle of wavelet support vector machine is to replace the kernel function of SVM with the mother wavelet function.
As a kind of multidimensional wavelet function, the wavelet kernel can be expressed as the product of one-dimensional function. In this paper, the Morlet wavelet function is selected as the mother wavelet. Then, the wavelet kernel function of SVM is denoted by:
From the above contents, it becomes obvious that the effectiveness of WSVM model is highly dependent on its kernel parameters, including the penalty factor and the dilation parameter . Different kernel parameters will produce different recognition results for the same problem. The excessively small values of them will result in under-fitting, whereas the disproportionately large values will lead to over-fitting phenomenon. Therefore, the firefly algorithm is implemented to obtain the optimal parameters of WSVM in the following subsection.
3.2. Firefly Algorithm
Firefly algorithm is a biological-inspired metaheuristic optimization algorithm using the flashing characteristic of fireflies, developed by Xin-She Yang. In nature, each firefly searches for prey, communicates and finds mates with the help of luminance produced by other fireflies. Accordingly, the concept of luminance production is provided to solve optimization problems.
To ensure the implementation of algorithm, some idealized rules are used as follows: (1) each firefly attracts other fireflies regardless of their sex, making exploring the search space more efficient; (2) attractiveness of a firefly is directly proportional to the brightness. The entire swarm of fireflies move towards the brightest one, which moves randomly in the space; (3) the brightness of a firefly is determined by a fitness function.
In the firefly algorithm, the two critical issues are the variation of brightness and formulation of the attractiveness. For minimum optimization problems, brightness at the particular location
should increase as the fitness function value decreases. In addition, brightness of one to another firefly is relative to the distance between the firefly and beholder, decreasing with the distance from the source. Consequently, the brightness can be represented by:
where
is the value of fitness function;
is the original brightness;
is the coefficient of light absorption in the range of
;
is the Cartesian distance between any two fireflies
and
, which is denoted by:
where
is the location of firefly
in the
-dimension future space.
Similarly, due to that attractiveness is proportional to the brightness seen by adjacent fireflies, it can be defined by:
where
is the maximum attractiveness, presenting the attractiveness at
.
Finally, the movement of a firefly
towards to another firefly
with a higher brightness is determined by:
where
is the number of iterations;
is the randomization parameter;
is a pseudo-random number uniformly distributed in
.
3.3. Improved Firefly Algorithm
As mentioned above, the optimization of the firefly algorithm is achieved through mutual attraction between fireflies. With an increase in iterations, the entire swarm of fireflies will gather around the optimal solution. By this time, the distance between individual and optimal solution has been extremely small. In the traditional FA, the randomization parameter is a constant. Therefore, in the process of approaching the optimal solution, it is possible to appear that the displacement of a firefly is greater than the distance from the optimal solution. As a result, the firefly may skip the optimal solution when updating its location with Equation (25). If this happens multiple time in a row, it will have an effect on the searching ability and the convergence rate.
In order to overcome the drawback and provide an effective solution, the randomization parameter
should decrease gradually as the optimal solution is approaching. For this reason, it is modified as:
where
is the final randomization parameter while
is the initial value;
is the maximum number of iterations.
Additionally, it is worth pointing out that there is an extreme case when
for the FA. If
, the attractiveness
decreases sharply and almost becomes zero in the sight of other fireflies. In this case, the fireflies roam in a completely random way. Hence, the traditional FA corresponds to a completely random search method. To reduce the impact of
on
, the improved attractiveness is designed as:
where
is the basic attractiveness free from impact of light absorption.
On the basis of the equations above, the firefly location update method is rewritten as:
3.4. WSVM Parameter Optimization Based on Improved Firefly Algorithm
The fitness function is a particular type of objective function that is used to evaluate the individual performance in the IFA. In this paper, error rate of recognition is adopted as the fitness function, which is inversely proportional to the performance of individual, namely brightness. The formulation of the function is described by the following expression:
where
is the amount of the correctly recognized images of class
;
is the amount of the images of sample set.
The procedure of IFA-WSVM model construction is illustrated in the flow diagram shown in
Figure 1. Equally important, the process of optimizing WSVM parameters with IFA is also described as follows:
- Step 1.
Initialize the improved firefly algorithm, and set up the parameters, including the number of fireflies , initial and final randomization parameters and , maximum iterations , attractiveness , basic attractiveness and light absorption coefficient .
- Step 2.
Generate the initial locations of fireflies at random as , every firefly is composed of the WSVM parameters and .
- Step 3.
Calculate the fitness value of every firefly to determine or update its brightness.
- Step 4.
Rank the fireflies by their brightness and regard the firefly with minimum brightness as the global-best point.
- Step 5.
Evaluate the brightness of every current firefly and compare the brightness of any two fireflies and . If , calculate the distance to obtain the improved attractiveness . Then, move firefly towards in all dimensions using Equation (28). The randomization parameter is updated by Equation (26).
- Step 6.
Check termination condition. If the maximum iteration limit is reached, stop the optimization process and output the values of optimal parameters and . Otherwise, return to Step 3.