# A Drone-Enabled Approach for Gas Leak Detection Using Optical Flow Analysis +
## 5 Results and Discussions
### Comparative Analysis between Stabilization Methods  
In this section, a comparative analysis between the candidate methods based on collected data from Experiment C explained in Section 4.3 is conducted to demonstrate their performance in the defined scenarios. The comparative study involves visual tests and quality assessment. The visual test is the visual examination of the results providing required insight into the behavior of the candidate methods. For quality assessment, few metrics are defined to evaluate the methods from different aspects. For the visual test, the x- and y-axis global trajectory is calculated; the global trajectory demonstrates the approximate camera motions before and after stabilization based on the reference frame (the first frame of the frame batch). The reference frame is considered since the main objective of stabilization here is to minimize the camera motions to be able to analyze the flow motions of gas emanation. Figure 7 demonstrates the video trajectory in the x and y-axis for the first, second, and third scenarios. In the first scenario, AVS mostly smoothened the camera motion but failed to minimize them; on the other hand, OPC, L1-OP, and PC-RF were mostly able to reduce the effect of camera motions. In addition, L1-OP showed a significant ability to remove small camera motions while not being effective enough for larger motions. PC-RF demonstrated the ability to minimize the motions significantly; however, the inaccurate frame registration in few cases especially during sudden movements needs further consideration. In the second scenario, OPC was not able to provide stable and significant results, but AVS, L1-OP, and PC-RF were able to effectively perform the stabilization. For this case, L1-OP and PC-RF presented significant results and minimized the camera motions which shows their ability to stabilize thermal footages. The third scenario involves a larger amount of shaking in the footage, as well as moving objects in the scene. In this scenario, PC-RF and OPC demonstrated a significant ability to remove the motions, but L1-OP was not able to provide referable results. Quality Assessment  
In this study, few metrics are defined to describe the performance of the stabilization methods from different aspects: (a) Processing Time (PT), (b) Interframe Transformation Fidelity (ITF), (c) Interframe Similarity Index (ISI), and (d) Average Speed (AvSpeed). The analysis produced by these metrics can provide insight into the algorithms' behavior based on the scope of this study's objectives. The processing time is one of the metrics considered in this paper. The required time for processing one frame can be an essential factor in a real-time process flow. Here, the processing time for stabilizing a frame is measured to analyze the real-time capability of the candidate methods. The results of this analysis are shown in Figure 8. Based on the results, PC-RF has the highest processing time while the processing time of AVS, L1-OP, and OPC is suitable for real-time applications. Figure 7: The figure shows the x and y global trajectory of the first, second, and third scenarios. The global trajectory demonstrates the ability of stabilization algorithm to remove the camera’s motions. The first and second scenario involves the camera’s motions and the third scenario involves the camera’s motion and moving objects in the background. In addition to processing time, other metrics are defined to assess the performance of the methods. The most common metric for evaluating the performance of video stabilization techniques is Interframe Transformation Fidelity (ITF) [36; 37] which is based on Peak Signal to Noise Ratio (PSNR) measurement. In this study, PSNR calculates the degree of deviation from the reference frame considered as optimal output by using Mean Squared Error (MSE). The higher PSNR value represents higher system performance. ITF and PSNR are shown respectively in Equations (3) and (4), where \(N\) and \(M\) are height and width of the image frames, \(N_{f}\) is the number of frames.