# A Fire Detection Algorithm Based on Tchebichef Moment Invariants and PSO-SVM
## 5 Experiments
### Results and Discussion
There were 10, 15, 20, and 25 fire images and 5, 10, 15, and 20 non-fire images randomly selected. As a result, there were four training sample sets formed, whose sizes were 15, 25, 35, and 45, respectively. Meanwhile, the rest of candidate images composed four corresponding testing sample sets. In the same way, the comparison of the algorithms based on HMIs, ZMIs, and TMIs was performed. The PSO-SVM model was implemented to predict the belonging labels of the testing sample sets. The result of the second experiment can be observed in Figure 6.  
Figure 5: The fitness curve of particle swarm optimization. Figure 6: Effect of training dataset size on recognition rate. When the size of the training sample set is small, the description of candidate images is not accurate enough that the detection rates all reach their respective lowest points. However, with the increase in the size of the training sample set, the description and the classification boundary become more and more accurate, which contributes to the increasing trend of the detection rates. Finally, all of the detection rates reach their respective maximums. According to Figure 6, we can see that when the size of the training sample set is 15, the detection rate of the algorithm based on HMIs is only 58.82%, and that of the algorithm based on ZMIs is also only 75.29%. In contrast, the detection rate of the proposed algorithm based on TMIs is 82.35% at this point. Furthermore, when the size increases from 15 to 45, the proposed algorithm has the highest detection rate and the smallest fluctuation in the detection rate throughout the different experiments. In conclusion, the results show that the proposed algorithm is more reliable, and can maintain the highest recognition rate even when the size of the training sample set is small. In the third experiment, the performance of the proposed method in the TRS sample set was illustrated. First, the images shown in Figure 4 were selected as the temporary sample set. Then, each image of the temporary sample set was translated with translation vectors [\(-70\), \(-50\)] and [\(50\), \(70\)], rotated by angles \(\pm 15^{\circ}\), and scaled with scaling factors of 0.8\(\sim\)1.2 with 0.2 increments. Finally, a TRS  
Figure 7: Images transformed by translation, rotation, and scaling (TRS). (**a**) Original image; (**b**) image translated with [\(-70\), \(-50\)]; (**c**) image translated with [\(50\), \(70\)]; (**d**) image rotated by \(15^{\circ}\); (**e**) image rotated by \(-15^{\circ}\); (**f**) image scaled with 0.8; (**g**) image scaled with 1.2.  
sample set was obtained, including 63 (9 \(\times\) 7) images. The images transformed by TRS of Figure 4a are shown in Figure 7.  
The training sample set consisted of nine fire images and 18 non-fire images, which were randomly selected from the TRS sample set. The remaining 36 images were considered as the testing sample set. The following table gives the values of Tchebichef moment invariants of images in Figure 7. It can be seen from Table 4 that the feature vector is invariant to translation, rotation, and scaling. Similarly, a comparison of the methods based on HMIs, ZMIs, and TMIs was also performed in the third experiment. The results are given in Table 5. Compared with the first experiment, there was some decline in all of the detection rates. As seen from the data for different moments, the detection rate of HMIs declined the most (8.53%), and the detection rate of TMIs experienced the least (0.96%). However, the method based on TMIs still achieved the highest recognition rate (97.22%) among the three methods, with only one false identification. In addition, only its detection rate exceeded 95%. Here, it is worth noting that the polynomial basis functions of Hu moments have the simplest expression form, but they are not orthogonal polynomials. Due to the redundant information, the feature extraction based on HMIs has a poor capability of describing the target, resulting in a low recognition rate.