A method and system for detecting a leakage accident of an unmanned aerial vehicle system oil tank area based on a Bayesian model
By using a Bayesian model-based image fusion method, combined with TGV regularization and variational Bayesian methods, the problem of insufficient adaptability of image fusion and local optima in complex scenarios in existing technologies is solved, and efficient, accurate and automated detection of leaks in oil tank areas is achieved.
Patent Information
- Application Number
- CN202510215890.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2026-06-23
- Estimated Expiration
- 2045-02-26
AI Technical Summary
Existing infrared-visible image fusion algorithms are not adaptable enough to detect leaks in oil tank areas. TV regularization leads to the loss of edge information, and the EM algorithm is prone to getting stuck in local optima in complex scenes, affecting the quality of the fused image.
An image fusion method based on a Bayesian model is adopted. The fusion model is optimized by TGV regularization and variational Bayesian method. The likelihood function and prior distribution are constructed by combining the temperature features of infrared images and the gradient information of visible light images. The leakage area is automatically detected by using brightness segmentation and geometric feature extraction techniques.
It achieves high-quality fusion of infrared and visible light images, enabling rapid and automatic assessment of leaks, improving inspection efficiency and accuracy, adapting to different application scenarios, and enhancing the robustness and visualization capabilities of image fusion.
Smart Images

Figure CN120147905B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method and system for detecting leaks in oil tank areas, and more particularly to a method and system for detecting leaks in oil tank areas using an unmanned aerial vehicle (UAV) system based on a Bayesian model. Background Technology
[0002] With the development of infrared detection technology, infrared thermal imaging-based detection equipment in chemical industrial parks has become increasingly mature, and in conjunction with monitors, it has become a common solution for unified supervision by safety centers. The goal of infrared detection of equipment in oil tank areas is to observe for leaks, quickly locate the leak position, determine the situation at the leak site, and assess the scope of the accident's impact to guide subsequent protective measures. While conventional fixed or manual inspection methods can perform patrol work, they suffer from slow response times, difficulty in locating leaks, missed detections, and high risks. Due to the numerous pieces of equipment and complex environment within oil tank areas, failure to provide timely protection can lead to serious consequences. Therefore, using drones as mobile monitoring devices, equipped with visible light and infrared cameras, provides a new solution for leak detection in oil tank areas. Compared to other inspection methods, drone inspection offers advantages such as a wide working area coverage, high efficiency, and simple operation. Visible light images provide rich appearance information, while the corresponding infrared images often lack clear texture and detail information. In contrast, infrared images primarily reflect the thermal radiation emitted by objects and are less affected by changes in lighting or artifacts, overcoming the obstacle of nighttime target detection. Due to the different characteristics of the two images, fusing thermal radiation and texture detail information into the image and making full use of their complementary information can improve the human visual system's perception ability for target detection and recognition. This is beneficial for the automatic detection and accurate positioning of targets and has wide application value in fields such as daily inspection.
[0003] The Bayesian image fusion method proposed in the paper "Bayesian Fusion for Infrared and Visible Images" is based on a Bayesian model, modeling image fusion as a regression problem. It constructs a likelihood function to characterize the consistency between the fused image and the input image, and uses TV regularization to constrain the smoothness of the fused image. The optimization process employs the EM algorithm, achieving infrared-visible image fusion through iterative optimization. However, this algorithm suffers from the following drawbacks: insufficient adaptability to various application scenarios; TV regularization easily leads to the loss of edge information when smoothing images; and the EM algorithm is prone to getting trapped in local optima in complex scenes, affecting the quality of the fused image. Summary of the Invention
[0004] Purpose of the invention: The purpose of this invention is to provide a method and system for detecting oil tank leakage accidents using a drone system based on a Bayesian model. Through high-quality fusion of infrared and visible light images, the leakage situation can be quickly and automatically assessed and visualized.
[0005] Technical Solution: The present invention provides a method for detecting oil tank leakage accidents using an unmanned aerial vehicle (UAV) system based on a Bayesian model, comprising the following steps:
[0006] (1) Send a drone equipped with infrared and visible light cameras to the high altitude of the leak area to observe and use the cameras to photograph ground targets and collect environmental image information;
[0007] (2) The image data information is transmitted to the host computer through the image transmission device, and the host computer acquires the on-site images collected by the UAV;
[0008] (3) Preprocess the images and display the infrared and visible light images in the interactive interface respectively;
[0009] (4) Based on the temperature characteristics in the infrared image and the gradient information in the visible light image, a likelihood function is constructed. The geometric boundary continuity of the leakage area is described by TGV regularization. A dynamic prior distribution is constructed by combining the brightness distribution. The fusion model is optimized by using the variational Bayesian method.
[0010] (5) The fused image is processed using brightness segmentation and geometric feature extraction techniques to determine the specific leakage area, realize automatic detection and analysis of the leakage area, and mark the location and features of the accident area.
[0011] Preferably, step (1) specifically involves determining the leakage range of the oil tank area using fixed detection equipment with sensors and cameras, controlling a drone equipped with infrared and visible light cameras to observe the leakage range from a high altitude, using the cameras to photograph ground targets, and collecting environmental image information.
[0012] Preferably, the data information in step (2) is transmitted to the host computer through the image transmission device. The image transmission device establishes a fast and stable image transmission channel between the host computer and the UAV, so that the host computer can acquire the on-site images collected by the UAV.
[0013] Preferably, in step (3), the image is preprocessed, and the Bayesian model is used to fuse the on-site image information collected by the UAV in real time, and the infrared image and the visible light image are displayed in the interactive interface respectively.
[0014] Preferably, step (4) specifically includes the following steps:
[0015] (41) Physical rules are introduced into the Bayesian model, and the likelihood functions of infrared and visible light images are constructed respectively. Combined with the temperature distribution characteristics of the oil tank leakage area, the temperature distribution of the leakage area is modeled as a Gaussian distribution with continuous gradual change characteristics to reflect the continuity of temperature change.
[0016] (42) Introduce TGV regularization to constrain the image structure, reflecting the geometric characteristics of the leakage region;
[0017] (43) Incorporate a prior distribution based on temperature gradient changes to constrain the temperature distribution of the fused image;
[0018] (44) Use variational Bayesian inference to maximize the variational lower bound, optimize the variational distribution, and obtain the optimal fused image. The specific optimization steps are as follows:
[0019] (441) Set the initial fused image The weighted average of the input images is used:
[0020]
[0021] in, These are the weighting coefficients. For thermal infrared images, Visible light image;
[0022] (442) Calculate the current fused image first gradient and second gradient :
[0023]
[0024] Optimize the objective function for the fused image Find the gradient:
[0025]
[0026] in, This represents the sign function, used for TGV regularization of the gradient. These are the weighting parameters for the prior temperature gradient.
[0027] Update the fused image using gradient descent:
[0028]
[0029] in, To control the update pace for the learning rate;
[0030] Check convergence to determine if the current iteration meets the convergence condition:
[0031]
[0032] If the conditions are met, stop the iteration and output the final fused image. Otherwise, repeat the above steps and continue iterating.
[0033] (443) Set the maximum number of iterations This is to prevent the algorithm from failing to converge in certain situations. If the number of iterations exceeds... If the iteration stops, the current fused image is output as the result.
[0034] (45) Output the optimal image that integrates infrared and visible light information and display it in the interactive interface.
[0035] Preferably, step (5) specifically comprises:
[0036] (51) The fused image shows the leaking heat source and the area of light change, and threshold segmentation is performed based on the brightness feature information;
[0037] (52) Analyze the segmented regions and extract geometric features. The specific steps are as follows:
[0038] (521) Label the connected components of the segmented image;
[0039] (522) Connected component analysis is used to identify connected pixel regions in the image as independent modules, each module representing a leakage region or other structure;
[0040] (523) Extract a set of geometric features for each connected region to identify the leakage region;
[0041] (53) Further analyze the shape of the leakage area and use shape factor and area extensibility to determine the nature of the area;
[0042] (54) Combine the extracted geometric features with threshold rules, and make a comprehensive judgment on whether it is a real leakage area based on the judgment criteria, including area, centroid position, and shape analysis.
[0043] Preferably, the probability density function formula of the Gaussian distribution is:
[0044]
[0045] Where x is a random variable, μ is the expected value, and σ is the expected value. 2 The standard deviation;
[0046] The probability density likelihood function of a thermal infrared image is:
[0047]
[0048] The probability density likelihood function of a visible light image is:
[0049]
[0050] Thermal infrared images and visible light images In a given fused image Under the condition that they are independent, the joint likelihood function can be obtained as:
[0051]
[0052] in, For thermal infrared images, To merge images, Visible light image, The variance of the pixel values in the thermal infrared image. Let Variance be the gradient of the visible light image. Let Variance be the variance of the second-order gradient of the visible light image. Let Variance be the gradient of the thermal infrared image. For gradient operators, This represents the pixel position.
[0053] Preferably, the prior distribution is decomposed into the product of geometric prior and temperature gradient prior:
[0054]
[0055] in, As a prior distribution, As a geometric prior, The temperature gradient is a priori.
[0056] Preferably, each pixel value of the infrared image is directly determined by the temperature radiation value, exhibiting a certain gradient change in space. The temperature difference model uses thermal radiation information to highlight the significant features of the target area, and constructs a similarity function of the infrared image to quantify the physical consistency and boundary clarity of the target area.
[0057] Preferably, the visible light image uses gradient domain information combined with local feature descriptors to construct a similarity function for the visible light image. By analyzing pixel gradient distribution and edge intensity, significant features that highlight the scene's geometric structure are extracted while ensuring the clarity of texture details.
[0058] The present invention discloses a Bayesian model-based unmanned aerial vehicle (UAV) system for detecting oil tank leaks, comprising:
[0059] Acquisition module: Used to import image information acquired by the host computer into the system;
[0060] Image information preprocessing module: used to preprocess image information imported into the system;
[0061] Image fusion module: used to fuse infrared and visible light image information, represented as bright areas, and segmented based on brightness features combined with edge detection to identify leakage areas;
[0062] Interactive display module: Visualizes the collected infrared and visible light images, as well as the situation information of the identified leak area.
[0063] Beneficial Effects: Compared with existing technologies, this invention has the following significant advantages: Using drones to inspect leak areas, combined with multimodal image acquisition and observation, improves inspection efficiency, more quickly and accurately determines the leak location, and clarifies the leak situation; the Bayesian model, as a probability-based inference method, provides high efficiency and achieves good results with less training data, making it suitable for practical applications, flexibly integrating multimodal information, and addressing the advantages and disadvantages of different source images; the variational Bayesian method is used to optimize the fusion model, improving the algorithm's efficiency, robustness, and fusion effect; and the images are visualized to help inspection personnel quickly assess the leak situation. Attached Figure Description
[0064] Figure 1 This is a flowchart of the method described in this invention.
[0065] Figure 2 This is a diagram of the variational Bayesian image fusion structure described in this invention.
[0066] Figure 3 The detection image interface of the detection system described in this invention. Detailed Implementation
[0067] The technical solution of the present invention will be further described below with reference to the accompanying drawings.
[0068] like Figure 1 As shown, a method for detecting oil tank leaks using an unmanned aerial vehicle (UAV) system based on a Bayesian model includes the following steps:
[0069] (1) Send a drone equipped with infrared and visible light cameras to the high altitude of the leak area to observe and use the cameras to photograph ground targets and collect environmental image information;
[0070] (2) The image data information is transmitted to the host computer through the image transmission device, and the host computer acquires the on-site images collected by the UAV;
[0071] (3) Preprocess the images and display the infrared and visible light images in the interactive interface respectively;
[0072] (4) Based on the temperature characteristics in the infrared image and the gradient information in the visible light image, a likelihood function is constructed. The geometric boundary continuity of the leakage area is described by TGV regularization. A dynamic prior distribution is constructed by combining the brightness distribution. The fusion model is optimized by using the variational Bayesian method.
[0073] (5) The fused image is processed using brightness segmentation and geometric feature extraction techniques to determine the specific leakage area, realize automatic detection and analysis of the leakage area, and mark the location and features of the accident area.
[0074] Each step will be explained in detail below.
[0075] (1) Within the area where the oil tank leak occurred, the approximate leak range was determined by fixed detection equipment such as sensors and cameras. A drone equipped with infrared and visible light cameras was then controlled to fly over the leak area to observe it from a high altitude. The drone was used to photograph ground targets and collect environmental image information.
[0076] (2) Image data information is transmitted to the host computer through the image transmission device. The image transmission device establishes a fast and stable image transmission channel between the host computer and the UAV, so that the host computer can acquire the on-site images collected by the UAV and import them into the detection system.
[0077] (3) The detection system performs a noise reduction preprocessing step on the image, and then displays the infrared image and the visible light image on the interactive interface respectively.
[0078] (4) Improve the Bayesian-based fusion algorithm in image fusion, perform deep fusion of real-time image information, and generate high-quality fused images. Construct a likelihood function for specific application scenarios, optimize detail information using TGV regularization, design a prior distribution, and improve fusion efficiency and robustness using variational Bayesian inference, such as... Figure 2 As shown.
[0079] (41) Introducing physical rules, likelihood functions for infrared and visible light images are constructed respectively. The likelihood function is designed based on physical principles, taking into account the temperature distribution characteristics of the leaking area in the oil tank area. Each pixel value in the infrared image is directly determined by the temperature radiation. Due to the presence of heat sources, the temperature in the leaking area is usually higher than that in the non-leaking area, and it exhibits a certain gradient change in space, which has a significant expressive power for the target area. The temperature distribution of the leaking area is modeled as a Gaussian distribution with continuous gradient characteristics to reflect the continuity of temperature changes. The distribution characteristics of the target area in the infrared image are characterized by a temperature difference model. The temperature difference model uses thermal radiation information to highlight the significant features of the target area, and a similarity function of the infrared image is constructed to quantify the physical consistency and boundary clarity of the target area.
[0080] The probability density function of the Gaussian distribution is defined as:
[0081]
[0082] When thermal infrared images Each pixel value Independent of other pixels and conforming to the mean of the fused image. corresponding pixels The Gaussian distribution is:
[0083]
[0084] Furthermore, when the thermal infrared image gradient It also follows the mean of the fused image gradient. Gaussian distribution:
[0085]
[0086] Therefore, the likelihood function of the thermal infrared image is:
[0087]
[0088] Visible light images A similarity function for visible light images is constructed by combining gradient domain information with local feature descriptors. By analyzing pixel gradient distribution and edge intensity, salient features that highlight the scene's geometric structure are extracted while maintaining the clarity of texture details. Leakage boundaries are represented as high-gradient regions, and the generation mechanism of visible light images is described through the statistical properties of image gradients.
[0089] When the edge intensity of each pixel The image follows a Gaussian distribution with a mean of 1 / 2. gradient at corresponding position The variance is Similarly, a second-order gradient constraint is introduced to reflect the boundary expansion law, and the visible light likelihood function is constructed as follows:
[0090]
[0091] get:
[0092]
[0093] Thermal infrared images and visible light images In a given fused image Under the condition that they are independent, combined with the above likelihood modeling, the joint likelihood function is obtained as:
[0094] in, For thermal infrared images, To merge images, Visible light image, The variance of the pixel values in the thermal infrared image. Let Variance be the gradient of the visible light image. Let Variance be the variance of the second-order gradient of the visible light image. Let Variance be the gradient of the thermal infrared image. For gradient operators, For pixel position, I represents the gradient of the fused image. U is the gradient of the thermal infrared image. V is the visible light image gradient. I represents the second-order gradient of the fused image. U is the second-order gradient of the thermal infrared image. V is the second gradient of the visible light image;
[0095] (42) The prior distribution is modeled from two aspects: global smoothness and local edge preservation of the image using regularization method. TGV regularization and temperature gradient prior distribution are introduced respectively to fully constrain the geometric characteristics and temperature distribution of the fused image.
[0096] Prior distribution Describes the fusion of images in the absence of observational data. Prior knowledge, the prior distribution is decomposed into geometric priors. and temperature gradient prior The product of:
[0097]
[0098] TGV regularization is used to model the geometric properties of the image.
[0099]
[0100] in,
[0101]
[0102] and The TGV regularization parameters control the smoothness of the first and second gradients, respectively. The first derivative is mainly used to capture the edge and contour information of the image, while the second derivative further describes the smoothness and region consistency of the image. By adjusting these two parameters, the model can better adapt to the geometric characteristics of the leaky region. TGV regularization can penalize the first and second gradients of the image through the L1 norm, thereby encouraging the image to remain smooth in smooth regions, while maintaining the sparsity of gradients at edges, avoiding the loss of details caused by over-smoothing.
[0103] Based on a prior model of temperature gradient in the leak region, it is assumed that the temperature gradient of the fused image is... Approximate theoretical temperature gradient ,Right now:
[0104]
[0105] in,
[0106]
[0107] Combining the above geometric prior with the temperature gradient prior, we obtain the overall prior distribution formula:
[0108]
[0109] This prior distribution not only considers the global geometric structure of the image, but also incorporates the temperature gradient characteristics of the target region, which can effectively constrain the generation process of the fused image and improve the overall image quality and target recognition capability.
[0110] (43) Use variational Bayesian inference to maximize the variational lower bound (ELBO) and optimize the variational distribution to approximate the true posterior distribution and obtain the optimal fused image.
[0111] According to Bayes' theorem, the posterior probability Indicating in the observation data and Under the condition of image fusion probability distribution:
[0112]
[0113] Therefore, the logarithm of the posterior probability can be expressed as:
[0114]
[0115] The goal is to obtain the optimal fused image by maximizing the posterior probability, which is equivalent to maximizing the log-posterior probability. :
[0116]
[0117] The specific optimization objective function is obtained as follows:
[0118]
[0119] Further elaboration reveals that the objective function can be expressed as minimizing the negative log-posterior probability:
[0120]
[0121] in, Ensure fused images With thermal infrared images The temperature distribution is consistent; Ensure that the temperature gradient of the fused image is consistent with that of the thermal infrared image; Ensure the edges of the merged image match those of the visible light image. The edges are consistent; Ensure that the second-order gradient of the fused image is consistent with that of the visible light image; and They are used for TGV regularization, balancing global smoothness and local feature preservation of the image; This represents a priori temperature gradient, ensuring that the temperature gradient of the fused image conforms to the theoretical model. .
[0122] The variational Bayesian method is used for approximate inference. By solving the posterior probability distribution, a fusion result with global consistency and preservation of local details is obtained. The core idea of variational Bayes is to solve for complex posterior distributions. Approximates a simple variational distribution The inference is made by minimizing the KL divergence between them.
[0123] Posterior distribution Approximately a variational distribution , in the form of The goal is to minimize and KL divergence between:
[0124]
[0125] Equivalent to minimizing the KL divergence by maximizing the variational lower bound (ELBO):
[0126]
[0127] Through optimization parameters and This maximizes ELBO, which is equivalent to minimizing it. This leads to Approximating the true posterior distribution .
[0128] Assuming a Gaussian distribution, and combining variational Bayesian methods and gradient descent, iterative updates are performed. The goal is to maximize the ELBO until convergence. The specific optimization process is as follows:
[0129] Set the initial fused image The weighted average of the input images is used:
[0130]
[0131] in, These are the weighting coefficients.
[0132] In each iteration, the current fused image is calculated. first gradient and second gradient :
[0133]
[0134] in, This represents the number of iterations.
[0135] Optimize the objective function for the fused image Find the gradient:
[0136]
[0137] in, This represents the sign function, used for TGV regularization of the gradient. These are the weighting parameters for the prior temperature gradient.
[0138] Update the fused image using gradient descent:
[0139]
[0140] in, To control the learning rate, the update pace is controlled.
[0141] Check convergence to determine if the current iteration meets the convergence condition:
[0142]
[0143] If the conditions are met, stop the iteration and output the final fused image. Otherwise, repeat the above steps and continue iterating.
[0144] Set the maximum number of iterations. To prevent the algorithm from failing to converge in certain situations, typically, if the number of iterations exceeds [a certain threshold]... If the iteration stops, the current fused image is output as the result.
[0145] The system outputs an optimal image that integrates infrared and visible light information, which is then displayed on the detection system's interactive interface.
[0146] (5) The fused image is processed by the inspection system using brightness segmentation and geometric feature extraction techniques to determine the specific leakage area, realize the automatic detection and analysis of the leakage area, and mark the location and features of the accident area.
[0147] (51) The fused image shows the heat source of the leak and the area of light change. Based on the brightness feature information, including the gray value and thermal radiation intensity of the fused image, preliminary threshold segmentation is performed to identify potential leak areas.
[0148] (52) Analyze the segmented region and extract geometric features that help determine the leakage situation. Mark the segmented image as a connected region. Using connected region analysis, identify the connected pixel regions in the image as independent modules. Each module represents a leakage region or other structure. Extract a set of geometric features for each connected region, including area, bounding box, centroid, etc., to help identify the leakage region.
[0149] (53) Further analysis of the shape is conducted, and the shape factor and regional extensibility are used to determine the regional properties.
[0150] (54) The extracted geometric features are combined with threshold rules, and based on common judgment criteria, including area, centroid location, and shape analysis, a comprehensive judgment is made as to whether it is a real leak area. If the area of the area is greater than a certain threshold, the shape factor is low, and the centroid is close to the center of the tank area, the area can be identified as a leak area.
[0151] A Bayesian model-based unmanned aerial vehicle (UAV) system for detecting oil tank leaks includes:
[0152] Data Acquisition Module: The camera captures leak image information and imports it into the inspection system;
[0153] Image information preprocessing module: performs noise reduction processing on the acquired image information;
[0154] Image fusion module: It fuses infrared and visible light image information, which is represented as a bright area. Based on the brightness feature and edge detection, it performs segmentation to identify the leakage area.
[0155] Interactive display module: The acquired infrared and visible light images, as well as the information on the identified leak area, are all visualized.
[0156] This invention provides an embodiment that verifies the feasibility of an unmanned aerial vehicle (UAV) system in detecting oil tank leaks and the real-time performance of the algorithm using a Gazebo simulation environment.
[0157] Specifically, a 3D model of a chemical industrial park was constructed in the Gazebo environment. The model included storage tanks, pipelines, and the surrounding environment within the oil tank area, simulating the geometric layout and thermal radiation characteristics of the actual scenario. This simulation environment provided a good testing platform for the flight behavior of UAVs in actual missions, ensuring the accuracy and efficiency of the algorithm.
[0158] The ground station detection system planned inspection trajectory points for the UAV, ensuring that the UAV could cover all potential leak areas in the oil tank area during flight. Parameters of the flight trajectory points, such as flight altitude, speed, shooting angle, and hovering time, were dynamically adjusted according to the size of the storage tank and the safety distance. The UAV carried a simulated visible light camera to capture video streams of the storage tank surface and its surrounding area in real time, transmitting the video streams to the ground station. During the simulation, the images from the camera's current perspective were displayed in real time via a wireless communication module, verifying the real-time performance and accuracy of multimodal image acquisition and providing reliable data support for subsequent leak detection and analysis.
[0159] In this embodiment, the ground station's detection system is developed based on MATLAB and includes multiple functional modules such as data reception, image fusion, leakage analysis, and visualization output. Figure 3 As shown, users can choose to connect to a device to transmit images in real time or process existing image data. By clicking the "Video Fusion" or "Image Fusion" button, the software will automatically apply a multimodal image fusion algorithm to integrate visible light and infrared image information from different sensors to generate a more complete fused image.
[0160] Specifically, the detection system further analyzes the fused images, automatically identifying and marking potential leak areas. Through image processing algorithms, leak areas are typically highlighted by changes in brightness and geometric features. The system then selects these areas, helping personnel quickly pinpoint the exact location of the leak. This function improves the efficiency of tank farm inspections, especially in complex environments, enabling timely and accurate leak identification and providing strong support for on-site personnel.
Claims
1. A method for detecting oil tank leak accidents using an unmanned aerial vehicle (UAV) system based on a Bayesian model, characterized in that, Includes the following steps: (1) Send a drone equipped with infrared and visible light cameras to the high altitude of the leak area to observe and use the cameras to photograph ground targets and collect environmental image information; (2) The image data information is transmitted to the host computer through the image transmission device, and the host computer acquires the on-site images collected by the UAV; (3) Preprocess the images and display the infrared and visible light images in the interactive interface respectively; (4) Based on the Bayesian model, an improved Bayesian fusion model is constructed for fusing the infrared image and the visible light image. The improved Bayesian fusion model embeds the temperature features of the infrared image and the gradient information of the visible light image into its likelihood function, and constructs the likelihood functions of the infrared image and the visible light image respectively to obtain the joint likelihood function. The prior distribution of the improved Bayesian fusion model includes geometric prior and temperature gradient prior. The geometric prior and temperature gradient prior are multiplied to obtain the dynamic prior distribution. The geometric prior is modeled using TGV regularization. The posterior distribution of the improved Bayesian fusion model is optimized using the variational Bayesian method, ultimately yielding the improved Bayesian fusion model. (5) The fused image is processed using brightness segmentation and geometric feature extraction techniques to determine the specific leakage area, realize automatic detection and analysis of the leakage area, and mark the location and features of the accident area.
2. The method for detecting oil tank leakage accidents using an unmanned aerial vehicle system based on a Bayesian model according to claim 1, characterized in that, The specific step (1) involves determining the leakage range of the oil tank area using fixed detection equipment such as sensors and cameras, controlling a drone equipped with infrared and visible light cameras to observe the leakage range from a high altitude, using the cameras to photograph ground targets, and collecting environmental image information.
3. The method for detecting oil tank leak accidents using an unmanned aerial vehicle system based on a Bayesian model according to claim 1, characterized in that, In step (2), the data information is transmitted to the host computer through the image transmission device. The image transmission device establishes a fast and stable image transmission channel between the host computer and the UAV, enabling the host computer to acquire the on-site images collected by the UAV.
4. The method for detecting oil tank leak accidents in an unmanned aerial vehicle system based on a Bayesian model according to claim 1, characterized in that, Step (4) specifically includes the following steps: (41) Physical rules are introduced into the Bayesian model, and the likelihood functions of infrared and visible light images are constructed respectively. Combined with the temperature distribution characteristics of the oil tank leakage area, the temperature distribution of the leakage area is modeled as a Gaussian distribution with continuous gradual change characteristics to reflect the continuity of temperature change. (42) Introduce TGV regularization to constrain the image structure, reflecting the geometric characteristics of the leakage region; (43) Incorporate a prior distribution based on temperature gradient changes to constrain the temperature distribution of the fused image; (44) Using variational Bayesian inference to maximize the variational lower bound, optimize the variational distribution, and obtain the optimal fused image, specifically including: The variational Bayesian method is employed, specifically by converting the posterior distribution... Approximately a variational distribution , represented as The goal is to minimize and KL divergence between: ; Minimize the KL divergence by maximizing the variational lower bound: ; Through optimization parameters and This maximizes the variational lower bound, i.e. minimizes , making Approximately true posterior distribution ; Iterative update The goal is to maximize ELBO until convergence; the specific optimization process is as follows: (441) Set the initial fused image The weighted average of the input images is used: in, These are the weighting coefficients. For thermal infrared images, Visible light image; (442) Calculate the current fused image first gradient and second gradient : Optimize the objective function for the fused image Find the gradient: + + in, For thermal infrared images, To merge images, Visible light image, The variance of the pixel values in the thermal infrared image. Let Variance be the gradient of the visible light image. Let Variance be the variance of the second-order gradient of the visible light image. Let Variance be the gradient of the thermal infrared image. For gradient operators, I represents the gradient of the fused image. U is the gradient of the thermal infrared image. V is the visible light image gradient. I represents the second-order gradient of the fused image. U is the second-order gradient of the thermal infrared image. V is the second-order gradient of the visible light image. and For TGV regularization parameters, For the number of iterations, This represents the sign function, used for TGV regularization of the gradient. Here, G represents the weighting parameters of the prior temperature gradient, and G is the theoretical temperature gradient model. Update the fused image using gradient descent: in, To control the update pace for the learning rate; Check convergence to determine if the current iteration meets the convergence condition: If the conditions are met, stop the iteration and output the final fused image. Otherwise, repeat the above steps and continue iterating; (443) Set the maximum number of iterations To prevent the algorithm from failing to converge in certain situations, if the number of iterations exceeds [a certain threshold]. If the iteration stops, the current fused image is output as the result. (45) Output the optimal image that integrates infrared and visible light information and display it in the interactive interface.
5. The method for detecting oil tank leak accidents in an unmanned aerial vehicle system based on a Bayesian model according to claim 1, characterized in that, Step (5) specifically involves: (51) The fused image shows the leaking heat source and the area of light change, and threshold segmentation is performed based on the brightness feature information; (52) Analyze the segmented regions and extract geometric features. The specific steps are as follows: (521) Label the connected components of the segmented image; (522) Connected component analysis is used to identify connected pixel regions in the image as independent modules, and each module represents a leakage region; (523) Extract a set of geometric features for each connected region to identify the leakage region; (53) Further analyze the shape of the leakage area and use shape factor and area extensibility to determine the nature of the area; (54) Combine the extracted geometric features with threshold rules, and make a comprehensive judgment on whether it is a real leakage area based on the judgment criteria, including area, centroid position, and shape analysis.
6. The method for detecting oil tank leakage accidents in an unmanned aerial vehicle system based on a Bayesian model according to claim 4, characterized in that, The probability density function formula for the Gaussian distribution is: Where x is a random variable, μ is the expected value, and σ is the expected value. 2 The standard deviation; The probability density likelihood function of a thermal infrared image is: The probability density likelihood function of a visible light image is: Thermal infrared images and visible light images In a given fused image Under the condition that they are independent, the joint likelihood function can be obtained as: in, For thermal infrared images, To merge images, Visible light image, The variance of the pixel values in the thermal infrared image. Let Variance be the gradient of the visible light image. Let Variance be the variance of the second-order gradient of the visible light image. Let Variance be the gradient of the thermal infrared image. For gradient operators, This represents the pixel position.
7. The method for detecting oil tank leakage accidents in an unmanned aerial vehicle system based on a Bayesian model according to claim 4, characterized in that, The prior distribution is decomposed into the product of geometric prior and temperature gradient prior: in, As a prior distribution, As a geometric prior, The temperature gradient is a priori.
8. A Bayesian model-based unmanned aerial vehicle (UAV) system for detecting leaks in oil tank areas, characterized in that, include: Data Acquisition Module: A drone equipped with infrared and visible light cameras will be deployed to the high altitude of the leak area to observe and capture environmental images of ground targets. The images will then be transmitted to a host computer via an image transmission device, allowing the host computer to obtain the images collected by the drone. Image preprocessing module: preprocesses the image and displays the infrared image and visible light image respectively in the interactive interface; Image Fusion Module: Based on a Bayesian model, an improved Bayesian fusion model is constructed to fuse the infrared and visible light images. The likelihood function of the improved Bayesian fusion model embeds the temperature features of the infrared image and the gradient information of the visible light image, and the likelihood functions of the infrared image and the visible light image are constructed respectively to obtain a joint likelihood function. The prior distribution of the improved Bayesian fusion model includes geometric prior and temperature gradient prior. The geometric prior and the temperature gradient prior are multiplied to obtain a dynamic prior distribution. The geometric prior is modeled using TGV regularization. The posterior distribution of the improved Bayesian fusion model is optimized using the variational Bayesian method, finally obtaining the improved Bayesian fusion model. Image analysis and detection module: The fusion result is processed using brightness segmentation and geometric feature extraction techniques to determine the specific leakage area, realize automatic detection and analysis of the leakage area, and mark the location and features of the accident area.