Method for detecting bubbles in transformer oil based on machine vision
Through machine vision combined with Gaussian hybrid model and convolutional neural network, the problem of bubble detection in transformer oil is solved, efficient identification and visualization of bubbles is achieved, and detection efficiency is improved.
Patent Information
- Application Number
- CN202411808077.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-04
AI Technical Summary
The prior art lacks effective methods to detect bubbles in transformer oil, affecting the safety of equipment operation.
Using a machine vision-based method, through video stream association and tracking, combined with Gaussian hybrid model and convolutional neural network, the identification and visual detection of bubbles in transformer oil is achieved.
Dynamic and static identification of bubbles in transformer oil is achieved, and detection efficiency and accuracy are improved.
Smart Images

Figure CN119762439A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of image data processing, in particular to a method for detecting bubbles in transformer oil based on machine vision. Background Art
[0002] Transformer oil plays many key roles in the power system. It mainly plays the role of insulation, heat dissipation, arc extinguishing, anti-oxidation and anti-corrosion for transformer equipment, ensuring the normal operation of transformer oil. The main components of transformer oil include compounds such as alkanes, cycloalkane saturated hydrocarbons and aromatic unsaturated hydrocarbons. However, under the action of long-term electricity or heat in transformer oil, some CH bonds and CC bonds can be broken, accompanied by the generation of a small amount of active hydrogen atoms and unstable hydrocarbon free radicals. These hydrogen atoms or free radicals quickly recombine through complex chemical reactions to form H2 and low molecular hydrocarbon gases, so that there may be a large number of bubbles in the transformer oil, which will seriously affect the safety of transformer oil equipment operation. At present, the main monitoring of transformer oil is oil chromatography, but this device mainly detects the type and volume of gas through chemical and physical methods, but there is still a lack of an effective method for detecting bubbles generated by gas in transformer oil.
[0003] In recent years, machine vision methods have been gradually applied in transformer equipment inspection as an advanced technical means due to their high efficiency and visualization. Through real-time visual inspection of equipment, real-time monitoring of equipment can be achieved to evaluate the health status and usage status of transformer equipment. It is necessary to provide a method for detecting bubbles in transformer oil, so that bubbles in both dynamic and static transformer oil can be identified and visualized. Summary of the invention
[0004] In view of the above-mentioned defects, the purpose of the present invention is to propose a method for detecting bubbles in transformer oil, which adopts the video stream method to associate and track each frame in the video to realize the detection of bubbles in transformer oil, so that bubbles in dynamic and static transformer oil can be identified and visualized.
[0005] To achieve this object, the present invention adopts the following technical solutions:
[0006] A method for detecting bubbles in transformer oil based on machine vision comprises the following steps:
[0007] Step S101, based on the collected video image information of transformer oil, initializing the Gaussian distribution model obtained from the video image features;
[0008] Step S102, based on the Gaussian mixture model, obtain the transformer oil video image video frame, perform matching and mixing judgment on the Gaussian mixture model to update the model in real time;
[0009] Step S103, adjusting the updated Gaussian mixture model, selecting a background distribution model, and performing image motion detection and judgment on the new transformer oil bubble video;
[0010] Step S104, combining with a convolutional neural network, the extracted bubble images are identified and intelligently classified to achieve detection and intelligent identification of bubbles in the oil.
[0011] Preferably, in step S101, the image information of the flow video of the transformer oil flowing through the acquisition position is counted, and the grayscale mean and variance of each pixel position in these images are calculated to initialize μ0 and variance matrix σ0 of each Gaussian distribution. 2 ;
[0012] The formula is as follows:
[0013]
[0014] Among them, μ k,0 represents the mean matrix of the kth Gaussian distribution; σ k,0 2 represents the variance matrix of the kth Gaussian distribution; N represents the selection of N consecutive frames of images; during parameter initialization, the video sequence I (i=1, 2, ..., N) is cumulatively sampled.
[0015] Preferably, the step S102 is specifically as follows:
[0016] Get the video frame at time t from the real-time video of transformer oil, and convert the gray value I obtained at the image pixel position (x, y) t (x, y) is matched with the current k mixed Gaussian models. If I t If (x, y) matches the kth model, it is marked as M k,t =1; if no match is obtained with the kth Gaussian model, mark M k,t =0; the formula is as follows:
[0017] |I t (x,y)-μ k,t-1 (x,y)|≤2.5σ k,t-1 (x,y)
[0018] After the matching is completed, the weight parameter ω of the k-th Gaussian model is adjusted according to the value of each mark M k,t (x, y) is updated as follows:
[0019] ω k,t (x,y)=(1-α)*ω k,t-1 (x,y)+M k,t *α
[0020] If there is a certain M k,t=1, then the mean and variance of the k-th Gaussian model corresponding to the pixel are updated as follows:
[0021] μ k,0 =(1-β)*μ t-1 (x,y)+β*I t (x,y)
[0022] (σ k,t (x,y) 2 =(1-β)*(σ k,t-1 (x,y) 2 +β*(I t (x,y)-μ k,t-1 (x,y) 2
[0023] If the pixel value I t If (x, y) does not match any model, use value I t (x, y) replaces the mean of the corresponding position of the last Gaussian model, and reassigns a larger variance and smaller weight to the (x, y) of the model;
[0024] Among them, α is the learning rate of the weight, α∈[0,1], β is the learning rate of the mean and variance, and β∈[0,1], thereby realizing the update of the GMM model parameters.
[0025] Furthermore, the step S103 is specifically as follows:
[0026] In the updated parameter mixed Gaussian model obtained in step S102, in order to obtain the background model at time t, all k Gaussian models that have completed parameter update at the current time t must be adjusted:
[0027] First, normalize the model weights at each pixel position using the following formula:
[0028]
[0029] Secondly, according to ω k,t (x, y) / (σ k,t(x,y) ) 2 Rearrange all Gaussian models from large to small, and select the first B that satisfy the following formula as the background distribution, where τ is the weight threshold;
[0030]
[0031] Finally, the pixel value I in the current transformer oil image is t (x, y) is matched with the B background models obtained from the above formula and the following formula is used for matching judgment:
[0032] |It (x,y)-μ k,t (x,y)|≤c*σ k,t (x, y)
[0033] If a model k is found that satisfies this formula, it is considered that the point at time t presents background information; otherwise, the point is judged to be a moving foreground, that is, an image of moving bubbles in transformer oil, thereby realizing the tracking and detection of bubbles in moving transformer oil.
[0034] Furthermore, the step S104 is specifically as follows:
[0035] The detected and tracked characteristic bubbles are combined with a convolutional neural network to identify and intelligently classify the extracted bubbles. The characteristic parameters such as the area, size, and size of the bubbles are combined to complete the statistics, analysis, and identification of the bubbles, thereby realizing the detection and intelligent identification of bubbles in transformer oil.
[0036] Further, the method uses a transformer oil bubble detection system, which includes a light source, an oil block, a collection unit, a camera, a processing unit, a host computer and a control unit;
[0037] The irradiation direction of the light source is toward the oil circuit block, and the collection direction of the collection unit is toward the oil circuit block;
[0038] The acquisition unit is connected to the camera and the control unit through a control line. The camera is also connected to the processing unit. The processing unit is also connected to the host computer. The control unit is also connected to the host computer.
[0039] One of the above technical solutions includes the following beneficial effects:
[0040] A machine vision-based transformer oil bubble detection method is applied. The video stream is used to associate and track each frame in the video. The GMM Gaussian mixture model is used to track and detect bubbles in the transformer oil. At the same time, the convolutional neural network is combined to further count and identify the shape and size of the bubbles, and the shape, position, trajectory, etc. of the detected bubbles are detected, thereby realizing the detection of bubbles in the transformer oil. Finally, the detection sensor and detection system are combined to effectively improve the detection efficiency.
[0041] A method for detecting bubbles in transformer oil based on machine vision is applied. The video stream is used to associate and track each frame in the video. The GMM Gaussian mixture model is applied to track and detect bubbles in transformer oil. At the same time, the convolutional neural network is combined to further count and identify the shape and size of the bubbles, and the shape, position, trajectory, etc. of the detected bubbles are detected, thereby realizing the detection of bubbles in transformer oil. Finally, the detection sensor and detection system are combined to effectively improve the detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram summarizing the overall process of an embodiment of the present invention;
[0043] Figure 2 It is a schematic diagram of a detection process of an embodiment of the present invention;
[0044] Figure 3 Schematic diagram of a system for detecting bubbles in transformer oil according to an embodiment of the present invention.
[0045] Among them: light source 1, oil circuit block 2, acquisition unit 3, camera 4, processing unit 5, host computer 6 and control unit 7. DETAILED DESCRIPTION
[0046] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0047] like Figure 1 and 2 As shown, a method for detecting bubbles in transformer oil based on machine vision comprises the following steps:
[0048] Step S101, based on the collected video image information of transformer oil, initializing the Gaussian distribution model obtained from the video image features;
[0049] Step S102, based on the Gaussian mixture model, obtain the transformer oil video image video frame, perform matching and mixing judgment on the Gaussian mixture model to update the model in real time;
[0050] Step S103, adjusting the updated Gaussian mixture model, selecting a background distribution model, and performing image motion detection and judgment on the new transformer oil bubble video;
[0051] Step S104, combining with a convolutional neural network, the extracted bubble images are identified and intelligently classified to achieve detection and intelligent identification of bubbles in the oil.
[0052] A machine vision-based transformer oil bubble detection method is applied. The video stream is used to associate and track each frame in the video. The GMM Gaussian mixture model is used to track and detect bubbles in the transformer oil. At the same time, the convolutional neural network is combined to further count and identify the shape and size of the bubbles, and the shape, position, trajectory, etc. of the detected bubbles are detected, thereby realizing the detection of bubbles in the transformer oil. Finally, the detection sensor and detection system are combined to effectively improve the detection efficiency.
[0053] In step S101, the image information of the flow video of the transformer oil flowing through the acquisition position is counted, and the grayscale mean and variance of each pixel position in these images are calculated to initialize μ0 and variance matrix σ0 of each Gaussian distribution. 2 ;
[0054] The formula is as follows:
[0055]
[0056] Among them, μ k,0 represents the mean matrix of the kth Gaussian distribution; σ k,0 2 represents the variance matrix of the kth Gaussian distribution; N represents the selection of N consecutive frames of images; during parameter initialization, the video sequence I (i=1, 2, ..., N) is cumulatively sampled.
[0057] The mean can describe the central tendency of the data set and affect the prediction bias of the model; the variance can describe the degree of dispersion of the data set and affect the prediction accuracy of the model. The mean and variance are used in data preprocessing and feature engineering to improve the performance of the Gaussian distribution model.
[0058] Wherein, the step S102 is specifically as follows:
[0059] Get the video frame at time t from the real-time video of transformer oil, and convert the gray value I obtained at the image pixel position (x, y) t (x, y) is matched with the current k mixed Gaussian models. If I t If (x, y) matches the kth model, it is marked as M k,t =1; if no match is obtained with the kth Gaussian model, mark M k,t =0; the formula is as follows:
[0060] |I t (x,y)-μ k,t-1 (x,y)|≤2.5σ k,t-1 (x,y)
[0061] After the matching is completed, the weight parameter ω of the k-th Gaussian model is adjusted according to the value of each mark M k,t (x, y) is updated as follows:
[0062] ω k,t (x,y)=(1-α)*ω k,t-1 (x,y)+M k,t *α
[0063] If there is a certain M k,t =1, then the mean and variance of the k-th Gaussian model corresponding to the pixel are updated as follows:
[0064] μ k,0 =(1-β)*μ t-1 (x,y)+β*I t (x, y)
[0065] (σ k,t (x,y) 2 =(1-β)*(σ k,t-1 (x,y) 2 +β*(I t (x,y)-μ k,t-1 (x,y) 2
[0066] If the pixel value I t If (x, y) does not match any model, use value I t (x, y) replaces the mean of the corresponding position of the last Gaussian model, and reassigns a larger variance and smaller weight to the (x, y) of the model;
[0067] Among them, α is the learning rate of the weight, α∈[0,1], β is the learning rate of the mean and variance, and β∈[0,1], thereby realizing the update of the GMM model parameters.
[0068] On the basis of the existing data model, when a new pixel data is added, if the grayscale value matches the existing data model, it is equivalent to adding a new data and becoming a new data set. Therefore, the existing data model must be updated to make the data model more accurate.
[0069] Wherein, the step S103 is specifically as follows:
[0070] In order to obtain the background model at time t in the updated parameter mixture Gaussian model obtained in step S102, all k Gaussian models that have completed parameter update at the current time t must be adjusted:
[0071] First, normalize the model weights at each pixel position using the following formula:
[0072]
[0073] Secondly, according to ω k,t (x, y) / (σ k,t(x,y) ) 2 Re-sort all Gaussian models from large to small, and select the first B that satisfy the following formula as the background distribution, where τ is the weight threshold;
[0074]
[0075] Finally, the pixel value I in the current transformer oil image is t (x, y) is matched with the B background models obtained from the above formula and judged by the following formula:
[0076] |I t (x,y)-μ k,t (x,y)|≤c*σ k,t (x,y)
[0077] If a model k is found that satisfies this formula, it is considered that the point at time t presents background information; otherwise, the point is judged to be a moving foreground, that is, an image of moving bubbles in transformer oil, thereby realizing the tracking and detection of bubbles in moving transformer oil.
[0078] When the background is a relatively fixed quantity, tracking and recognition are achieved through the dynamic quantity in the image. This method is a method of using relative static to set off dynamic. Compared with full-state video tracking and recognition, this method is simpler and easier to operate.
[0079] Wherein, the step S104 is specifically as follows:
[0080] The detected and tracked characteristic bubbles are combined with a convolutional neural network to identify and intelligently classify the extracted bubbles. The characteristic parameters such as the area, size, and size of the bubbles are combined to complete the statistics, analysis, and identification of the bubbles, thereby realizing the detection and intelligent identification of bubbles in transformer oil.
[0081] like Figure 3 As shown, the method adopts a transformer oil bubble detection system, which includes a light source 1, an oil block 2, a collection unit 3, a camera 4, a processing unit 5, a host computer 6 and a control unit 7;
[0082] The irradiation direction of the light source 1 is toward the oil circuit block 2, and the collection direction of the collection unit 3 is toward the oil circuit block 2;
[0083] The acquisition unit 3 is connected to the camera 4 and the control unit 7 via a control line. The camera 4 is also connected to the processing unit 5 . The processing unit 5 is also connected to the host computer 6 . The control unit 7 is also connected to the host computer 6 .
[0084] The technical principle of the present invention is described above in conjunction with specific embodiments. These descriptions are only for explaining the principle of the present invention and cannot be interpreted as limiting the scope of protection of the present invention in any way. Based on the explanations herein, those skilled in the art can associate other specific implementations of the present invention without paying creative labor, and these methods will fall within the scope of protection of the present invention.
Claims
1. A method for detecting bubbles in transformer oil based on machine vision, characterized in that: The steps include: Step S101, based on the collected video image information of transformer oil, initializing the Gaussian distribution model obtained from the video image features; Step S102, based on the Gaussian mixture model, obtain the transformer oil video image video frame, perform matching and mixing judgment on the Gaussian mixture model to update the model in real time; Step S103, adjusting the updated Gaussian mixture model, selecting a background distribution model, and performing image motion detection and judgment on the new transformer oil bubble video; Step S104, combining with a convolutional neural network, the extracted bubble images are identified and intelligently classified to achieve detection and intelligent identification of bubbles in the oil.
2. The method for detecting bubbles in transformer oil based on machine vision according to claim 1, characterized in that: In step S101, the image information of the flow video of the transformer oil flowing through the acquisition position is counted, and the grayscale mean and variance of each pixel position in these images are calculated to initialize μ0 and variance matrix σ0 of each Gaussian distribution. 2 ; The formula is as follows: Among them, μ k,0 represents the mean matrix of the kth Gaussian distribution; σ k,0 2 represents the variance matrix of the kth Gaussian distribution; N represents the selection of N consecutive frames of images; during parameter initialization, the video sequence I (i=1, 2, ..., N) is cumulatively sampled.
3. The method for detecting bubbles in transformer oil based on machine vision according to claim 2, characterized in that: The step S102 is specifically as follows: Get the video frame at time t from the real-time video of transformer oil, and convert the gray value I obtained at the image pixel position (x, y) t (x, y) is matched with the current k mixed Gaussian models. If I t If (x, y) matches the kth model, it is marked as M k,t =1; if no match is obtained with the kth Gaussian model, mark M k,t =0; the formula is as follows: |I t (x,y)-μ k,t-1 (x,y)|≤2.5σ k,t-1 (x,y) After the matching is completed, the weight parameter ω of the k-th Gaussian model is adjusted according to the value of each mark M k,t (x, y) is updated as follows: oh k,t (x,y)=(1-α)*ω k,t-1 (x,y)+M k,t *a If there is a certain M k,t =1, then the mean and variance of the k-th Gaussian model corresponding to the pixel are updated as follows: m k,0 =(1-β)*μ t-1 (x,y)+β*I t (x,y) (s k,t (x,y)) 2 =(1-β)*(σ k,t-1 (x,y)) 2 +β*(I t (x,y)-μ k,t-1 (x,y) 2 If the pixel value I t If (x, y) does not match any model, use value I t (x, y) replaces the mean of the corresponding position of the last Gaussian model, and reassigns a larger variance and smaller weight to the (x, y) of the model; Among them, α is the learning rate of the weight, α∈[0,1], β is the learning rate of the mean and variance, and β∈[0,1], thereby realizing the update of the GMM model parameters.
4. The method for detecting bubbles in transformer oil based on machine vision according to claim 3, characterized in that: The step S103 is specifically as follows: In order to obtain the background model at time t in the updated parameter mixture Gaussian model obtained in step S102, all k Gaussian models that have completed parameter update at the current time t must be adjusted: First, normalize the model weights at each pixel position using the following formula: Secondly, according to ω k,t (x, y) / (σ k,t(x,y) ) 2 Rearrange all Gaussian models from large to small, and select the first B that satisfy the following formula as the background distribution, where τ is the weight threshold; Finally, the pixel value I in the current transformer oil image is t (x, y) is matched with the B background models obtained from the above formula and judged by the following formula: |I t (x,y)-μ k,t (x,y)|≤c*σ k,t (x,y) If a model k is found that satisfies this formula, it is considered that the point at time t presents background information; Otherwise, the point is judged as a moving foreground, that is, an image of moving bubbles in transformer oil, thereby realizing the tracking and detection of bubbles in moving transformer oil.
5. The method for detecting bubbles in transformer oil based on machine vision according to claim 4, characterized in that: The step S104 is specifically as follows: The detected and tracked characteristic bubbles are combined with a convolutional neural network to identify and intelligently classify the extracted bubbles. The characteristic parameters such as the area, size, and size of the bubbles are combined to complete the statistics, analysis, and identification of the bubbles, thereby realizing the detection and intelligent identification of bubbles in transformer oil.
6. The method for detecting bubbles in transformer oil based on machine vision according to claim 5, characterized in that: The method adopts a transformer oil bubble detection system, which includes a light source, an oil block, a collection unit, a camera, a processing unit, a host computer and a control unit; The irradiation direction of the light source is toward the oil circuit block, and the collection direction of the collection unit is toward the oil circuit block; The acquisition unit is connected to the camera and the control unit through a control line. The camera is also connected to the processing unit. The processing unit is also connected to the host computer. The control unit is also connected to the host computer.
Citation Information
Patent Citations
Method, device and equipment for extracting moving target under dynamic background and storage medium
CN115830059A
Method for identifying flow pattern of gas-liquid two-phase transient flow
CN118781337A
Cited By
Honey quality detection method based on machine vision
CN120102475A