Abstract:When a gas leak occurs, it propagates through space in the form of diffusion, typically forming a gas plume with dynamically stable concentration near the leakage source, which appears as a quasi-static region in infrared images; this characteristic often causes reduced detection accuracy of conventional moving object detection algorithms in these regions and makes it difficult to obtain the spatial concentration distribution of the gas. To address this issue, a Vibe Gases adaptive threshold detection algorithm based on the background subtraction method was proposed, which introduces improvements in two critical phases of gas plume imaging. During the foreground extraction phase, a foreground difference matrix is first constructed through gas detection logic and subjected to two-dimensional frequency mapping. Subsequently, the optimal threshold for separating the foreground and background is calculated by fitting a difference distribution function using the least squares method. In the background updating phase, a signal matrix of the foreground gas is established and processed with two-dimensional frequency mapping. The primary signal range is then extracted through frequency-based high-pass filtering, followed by delayed updates for pixels located within both the gas region and this primary signal range. The experimental results of infrared detection imaging under stable gas leakage conditions demonstrated that at a distance of 20 meters, the detection accuracy for ethylene reached 91.0% with an Intersection over Union (IoU) metric of 89.4%, while at 5 meters, the accuracy for detecting small leaks of sulfur hexafluoride was 81.3% with an IoU of 80.7%. The algorithm significantly improved the imaging quality of gas plumes, enhanced adaptive detection capabilities across diverse gases and scenarios, and effectively extracted spatial concentration distributions of gases.