Power transformer liquid level detection method, device, equipment and storage medium
Through the scale detection and feature recognition of the liquid level gauge image, combined with the deep neural network training model, the problem of high false detection rate and large consumption of manpower and material resources of the existing liquid level detection methods has been solved, and the efficient and accurate measurement of the power transformer liquid level gauge has been achieved. Accurate detection.
Patent Information
- Application Number
- CN202210367349.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-04-08
AI Technical Summary
The existing power transformer liquid level detection method has a high false detection rate, consumes a lot of manpower and material resources, and requires frequent template updates. The traditional physical method requires the installation of probes and regular detection, resulting in insufficient accuracy and efficiency in detection.
By acquiring the liquid level gauge image, a preset liquid level detection model is used for scale detection and feature recognition to generate a liquid level value. The model is combined with a deep neural network training model to improve detection accuracy and reduce interference with liquid color and illumination changes.
It improves the accuracy of liquid level detection, reduces the consumption of manpower and material resources, reduces the false detection rate, and achieves efficient detection of liquid level gauges of different shapes of power transformers.
Smart Images

Figure CN114862761B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for detecting liquid level of a power transformer. Background Art
[0002] In the power system, power transformer level gauges are widely used. In substations, the liquid level of power transformer level gauges needs to be monitored in real time to prevent accidents caused by liquid level values not falling within the threshold range. With the continuous development of the power industry, the requirements for detecting power transformer level gauges through computer vision are becoming increasingly higher.
[0003] At present, the liquid level detection method of the power transformer liquid level meter can be to calculate the maximum similarity through template matching to obtain the current reading of the power transformer liquid level meter, or to install a liquid level probe on the power transformer liquid level meter and detect the liquid level by transmitting and receiving ultrasonic signals through the liquid level probe.
[0004] However, since the liquid color and visual shape of the level meter will change with time and shooting angle, the template matching method requires manual updating of the selected template regularly. At the same time, the traditional physics method requires the installation of a level probe in the level meter and regular performance testing of the probe. These methods will result in a large amount of manpower and material resources consumption, as well as a high false detection rate of the liquid level detection. Summary of the invention
[0005] The invention provides a method, a device, a equipment and a storage medium for detecting the liquid level of a power transformer, which are used to improve the accuracy of liquid level detection.
[0006] A first aspect of the present invention provides a method for detecting the liquid level of a power transformer, comprising: obtaining a liquid level gauge image to be detected, wherein the liquid level gauge image includes a liquid level gauge of a power transformer; performing scale detection on the liquid level gauge image through a preset liquid level detection model to obtain a scale detection result; if the scale detection result is that there is no scale value in the liquid level gauge image, performing feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the liquid level gauge of the power transformer; and generating a liquid level value corresponding to the liquid level gauge of the power transformer according to the air window and / or the liquid window in the liquid level gauge feature image.
[0007] In a feasible implementation, the scale detection is performed on the liquid level meter image through a preset liquid level detection model to obtain a scale detection result, including: calling a preset liquid level detection model to grayscale and binarize the liquid level meter image to obtain a binary liquid level meter image; performing region of interest segmentation on the binary liquid level meter image to generate a corresponding region of interest image, and performing character recognition on the region of interest image to obtain a character recognition result; if the character recognition result is that the preset characters do not exist in the region of interest image, then determining that the scale detection result is that there is no scale value in the liquid level meter image; if the character recognition result is that the preset characters exist in the region of interest image, then determining that the scale detection result is that there is a scale value in the liquid level meter image.
[0008] In a feasible implementation, if the scale detection result is that there is no scale value in the liquid level meter image, then feature recognition is performed on the liquid level meter image to obtain a liquid level meter feature image, including: if the scale detection result is that there is no scale value in the liquid level meter image, then pixel segmentation is performed on the liquid level meter image to obtain multiple binary pixel points, each binary pixel point corresponds to a grayscale value; if the grayscale value of each of the multiple binary pixel points is equal to a first preset grayscale value, it is determined that the liquid level meter feature image includes an air window but does not include a liquid window; if the multiple If the grayscale value of each binary pixel point in the plurality of binary pixel points is equal to the second preset grayscale value, it is determined that the characteristic image of the liquid level meter includes a liquid window but does not include an air window; if the plurality of binary pixel points include a first pixel point set and a second pixel point set, it is determined that the characteristic image of the liquid level meter includes an air window and a liquid window, wherein the first pixel point set includes a plurality of binary pixel points whose grayscale values are equal to the first preset grayscale value, and the second pixel point set includes a plurality of binary pixel points whose grayscale values are equal to the second preset grayscale value, the first pixel point set corresponds to the air window, and the second pixel point set corresponds to the liquid window.
[0009] In a feasible implementation manner, the generating the liquid level value corresponding to the power transformer liquid level gauge according to the air window and / or the liquid window in the liquid level gauge characteristic image includes: if the liquid level gauge characteristic image includes an air window but does not include a liquid window, determining that the liquid level value corresponding to the power transformer liquid level gauge is zero; if the liquid level gauge characteristic image includes a liquid window but does not include an air window, obtaining a plurality of key point coordinates corresponding to the liquid window, and generating the area of the liquid window according to the plurality of key point coordinates, wherein the area of the liquid window is used to indicate the liquid level value corresponding to the power transformer liquid level gauge; if the liquid level gauge characteristic image includes an air window and a liquid window, obtaining a plurality of air window key point coordinates corresponding to the air window, and obtaining a plurality of liquid window key point coordinates corresponding to the liquid window; generating the corresponding liquid window area according to the plurality of liquid window key point coordinates; generating the area of the liquid level gauge display portion in the liquid level gauge characteristic image according to the plurality of air window key point coordinates and the plurality of liquid window key point coordinates; calculating the proportion of the liquid window area in the area of the liquid level gauge display portion to obtain the liquid level value corresponding to the power transformer liquid level gauge.
[0010] In a feasible implementation manner, after the scale detection is performed on the liquid level gauge image by using a preset liquid level detection model to obtain a scale detection result, the method further includes: if the scale detection result is that a scale value exists in the liquid level gauge image, the scale value is recognized on the liquid level gauge image to generate an upper scale threshold and a lower scale threshold corresponding to the power transformer liquid level gauge; feature recognition is performed on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge; if the liquid level gauge feature image includes an air window and / or a liquid window If the characteristic image of the power transformer includes an air window but not a liquid window, the lower threshold value of the scale is determined as the liquid level value corresponding to the power transformer liquid level gauge; if the characteristic image of the liquid level gauge includes a liquid window but not an air window, the upper threshold value of the scale is determined as the liquid level value corresponding to the power transformer liquid level gauge; if the characteristic image of the liquid level gauge includes an air window and a liquid window, edge detection is performed on the air window and the liquid window to generate corresponding air window frames and liquid window frames, and the liquid level value corresponding to the power transformer liquid level gauge is generated according to the air window frame, the liquid window frame, the upper threshold value of the scale and the lower threshold value of the scale.
[0011] In a feasible implementation manner, if the characteristic image of the liquid level meter includes an air window and a liquid window, edge detection is performed on the air window and the liquid window to generate corresponding air window frames and liquid window frames, and the liquid level value corresponding to the power transformer liquid level meter is generated according to the air window frame, the liquid window frame, the upper threshold value of the scale and the lower threshold value of the scale, including: if the characteristic image of the liquid level meter includes an air window and a liquid window, edge detection is performed on the air window and the liquid window to generate corresponding air window rectangular frames and liquid window rectangular frames, the air window frame, the liquid window frame, the upper threshold value of the scale and the lower threshold value of the scale The window rectangular frame includes an upper frame line of an air window and a lower frame line of an air window, and the liquid window rectangular frame includes an upper frame line of a liquid window and a lower frame line of a liquid window, and the air window rectangular frame and the liquid window rectangular frame have a common frame line; the distance between the common frame line and the lower frame line of the liquid window is calculated to obtain a first distance value; the distance between the upper frame line of the air window and the lower frame line of the liquid window is calculated to obtain a second distance value; according to the ratio of the first distance value to the second distance value and the difference between the upper threshold value of the scale and the lower threshold value of the scale, the liquid level value corresponding to the power transformer liquid level meter is obtained.
[0012] In a feasible implementation, before acquiring the liquid level gauge image to be detected, it also includes: acquiring multiple different liquid level gauge images, wherein the liquid level gauge image includes an electric transformer liquid level gauge; respectively marking the contours of the air window and / or liquid window corresponding to the electric transformer liquid level gauge in each liquid level gauge image to generate multiple contour-marked liquid level gauge images; and training a preset model through a deep neural network based on the multiple contour-marked liquid level gauge images to generate a liquid level detection model.
[0013] The second aspect of the present invention provides a power transformer liquid level detection device, comprising: an acquisition module, used to acquire a liquid level gauge image to be detected, wherein the liquid level gauge image includes a power transformer liquid level gauge; a detection module, used to perform scale detection on the liquid level gauge image through a preset liquid level detection model to obtain a scale detection result; a first feature recognition module, used to perform feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image if the scale detection result is that there is no scale value in the liquid level gauge image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge; a liquid level value generation module, used to generate a liquid level value corresponding to the power transformer liquid level gauge according to the air window and / or the liquid window in the liquid level gauge feature image.
[0014] In a feasible implementation, the detection module is specifically used to: call a preset liquid level detection model to grayscale and binarize the liquid level meter image to obtain a binarized liquid level meter image; perform region of interest segmentation on the binarized liquid level meter image to generate a corresponding region of interest image, and perform character recognition on the region of interest image to obtain a character recognition result; if the character recognition result is that the preset characters do not exist in the region of interest image, then determine that the scale detection result is that there is no scale value in the liquid level meter image; if the character recognition result is that the preset characters exist in the region of interest image, then determine that the scale detection result is that there is a scale value in the liquid level meter image.
[0015] In a feasible implementation manner, the first feature recognition module is specifically used for: if the scale detection result is that there is no scale value in the liquid level meter image, then pixel segmentation is performed on the liquid level meter image to obtain multiple binary pixel points, each binary pixel point corresponds to a grayscale value; if the grayscale value of each of the multiple binary pixel points is equal to the first preset grayscale value, then it is determined that the liquid level meter characteristic image includes an air window but does not include a liquid window; if the grayscale value of each of the multiple binary pixel points is equal to the second preset grayscale value, then it is determined that the liquid level meter characteristic image includes a liquid window but does not include an air window; if the multiple binary pixel points include a first pixel point set and a second pixel point set, then it is determined that the liquid level meter characteristic image includes an air window and a liquid window, wherein the first pixel point set includes multiple binary pixel points with grayscale values equal to the first preset grayscale value, the second pixel point set includes multiple binary pixel points with grayscale values equal to the second preset grayscale value, the first pixel point set corresponds to the air window, and the second pixel point set corresponds to the liquid window.
[0016] In a feasible implementation manner, the liquid level value generation module is specifically used for: if the liquid level gauge characteristic image includes an air window but does not include a liquid window, determining that the liquid level value corresponding to the power transformer liquid level gauge is zero; if the liquid level gauge characteristic image includes a liquid window but does not include an air window, obtaining a plurality of key point coordinates corresponding to the liquid window, and generating the area of the liquid window according to the plurality of key point coordinates, the area of the liquid window being used to indicate the liquid level value corresponding to the power transformer liquid level gauge; if the liquid level gauge characteristic image includes an air window and a liquid window, obtaining a plurality of air window key point coordinates corresponding to the air window, and obtaining a plurality of liquid window key point coordinates corresponding to the liquid window; generating a corresponding liquid window area according to the plurality of liquid window key point coordinates; generating the area of the liquid level gauge display portion in the liquid level gauge characteristic image according to the plurality of air window key point coordinates and the plurality of liquid window key point coordinates; calculating the proportion of the liquid window area in the area of the liquid level gauge display portion to obtain the liquid level value corresponding to the power transformer liquid level gauge.
[0017] In a feasible implementation manner, the power transformer liquid level detection device further includes: a scale value recognition module, which is used to perform scale value recognition on the liquid level gauge image if the scale detection result is that the scale value exists in the liquid level gauge image, and generate an upper scale threshold and a lower scale threshold corresponding to the power transformer liquid level gauge; a second feature recognition module, which is used to perform feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge; a first determination module, which is used to perform feature recognition on the liquid level gauge image if the liquid level gauge feature image includes an air window and does not include a liquid window. a body window, then the lower scale threshold is determined as the liquid level value corresponding to the power transformer liquid level gauge; a second determination module is used for, if the liquid level gauge characteristic image includes a liquid window but does not include an air window, then the upper scale threshold is determined as the liquid level value corresponding to the power transformer liquid level gauge; a detection generation module is used for, if the liquid level gauge characteristic image includes an air window and a liquid window, then edge detection is performed on the air window and the liquid window to generate corresponding air window frames and liquid window frames, and the liquid level value corresponding to the power transformer liquid level gauge is generated according to the air window frame, the liquid window frame, the upper scale threshold and the lower scale threshold.
[0018] In a feasible implementation manner, the detection generation module is specifically used for: if the characteristic image of the liquid level gauge includes an air window and a liquid window, performing edge detection on the air window and the liquid window to generate corresponding air window rectangular frames and liquid window rectangular frames, the air window rectangular frame includes an upper frame line of the air window and a lower frame line of the air window, the liquid window rectangular frame includes an upper frame line of the liquid window and a lower frame line of the liquid window, and the air window rectangular frame and the liquid window rectangular frame have a common frame line; calculating the distance between the common frame line and the lower frame line of the liquid window to obtain a first distance value; calculating the distance between the upper frame line of the air window and the lower frame line of the liquid window to obtain a second distance value; and obtaining the liquid level value corresponding to the power transformer liquid level gauge according to the ratio of the first distance value to the second distance value and the difference between the upper threshold value of the scale and the lower threshold value of the scale.
[0019] In a feasible implementation, the power transformer liquid level detection device also includes: a model generation module, used to obtain multiple different liquid level gauge images, wherein the liquid level gauge image includes a power transformer liquid level gauge; contour marking is performed on the air window and / or liquid window corresponding to the power transformer liquid level gauge in each liquid level gauge image to generate multiple contour-marked liquid level gauge images; based on the multiple contour-marked liquid level gauge images, a preset model is trained through a deep neural network to generate a liquid level detection model.
[0020] The third aspect of the present invention provides a power transformer liquid level detection device, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the power transformer liquid level detection device executes the above-mentioned power transformer liquid level detection method.
[0021] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned method for detecting the liquid level of a power transformer.
[0022] In the technical solution provided by the present invention, an image of a liquid level gauge to be detected is obtained, wherein the liquid level gauge image includes a power transformer liquid level gauge; scale detection is performed on the liquid level gauge image through a preset liquid level detection model to obtain a scale detection result; if the scale detection result is that there is no scale value in the liquid level gauge image, feature recognition is performed on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge; based on the air window and / or the liquid window in the liquid level gauge feature image, a liquid level value corresponding to the power transformer liquid level gauge is generated. In an embodiment of the present invention, an image of a liquid level gauge to be detected is obtained, and scale detection is performed using a liquid level detection model. If no scale value exists in the liquid level gauge image, feature recognition is performed on the liquid level gauge image to obtain air windows and / or liquid windows of power transformer liquid level gauges of different shapes. The liquid level value corresponding to the power transformer liquid level gauge is calculated based on the air window and / or liquid window, thereby realizing liquid level detection of power transformer liquid level gauges of different shapes through computer vision, reducing interference caused by liquid color, light changes, etc., and thus improving the accuracy of liquid level detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A schematic diagram of an embodiment of a method for detecting a liquid level of a power transformer in an embodiment of the present invention;
[0024] Figure 2 A schematic diagram of another embodiment of a method for detecting a liquid level of a power transformer according to an embodiment of the present invention;
[0025] Figure 3 Schematic diagram of a circular liquid level gauge in an embodiment of the present invention;
[0026] Figure 4 Schematic diagram of a rectangular liquid level gauge in an embodiment of the present invention;
[0027] Figure 5 A schematic diagram of another embodiment of a method for detecting a liquid level of a power transformer according to an embodiment of the present invention;
[0028] Figure 6A schematic diagram of an embodiment of a liquid level detection device for a power transformer in an embodiment of the present invention;
[0029] Figure 7 A schematic diagram of another embodiment of a liquid level detection device for a power transformer according to an embodiment of the present invention;
[0030] Figure 8 The figure is a schematic diagram of an embodiment of a liquid level detection device for a power transformer in an embodiment of the present invention. DETAILED DESCRIPTION
[0031] The invention provides a method, a device, a equipment and a storage medium for detecting the liquid level of a power transformer, which are used to improve the accuracy of liquid level detection.
[0032] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0034] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0035] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of the method for detecting the liquid level of a power transformer in an embodiment of the present invention includes:
[0036] 101. Acquire an image of a liquid level meter to be detected, wherein the image of the liquid level meter includes a liquid level meter of a power transformer;
[0037] It is understandable that the execution subject of the present invention may be a power transformer liquid level detection device or a terminal, which is not limited here. The embodiment of the present invention is described by taking the terminal as the execution subject as an example.
[0038] There are many types of liquid level gauges for power transformers, such as circular liquid level gauges without scale values, rectangular liquid level gauges without scale values, and rectangular liquid level gauges with scale values, etc. The image of the liquid level gauge can be acquired through a variety of image acquisition devices, such as mobile phones, cameras, and video cameras.
[0039] 102. Performing scale detection on the liquid level meter image through a preset liquid level detection model to obtain a scale detection result;
[0040] The liquid level detection model can perform scale detection on the liquid level gauge image based on optical character recognition (OCR), can perform scale detection on the liquid level gauge image based on the target detection network (Single Shot MultiBox Detector, SSD), and can also perform scale detection on the liquid level gauge image based on other detection networks.
[0041] For example, the process of the terminal using the liquid level detection model based on optical character recognition (OCR) to detect the scale of the liquid level meter image includes multiple steps, namely: grayscale, binarization, region of interest (ROI) cutting and character recognition. The process of the terminal using the liquid level detection model based on the target detection network (SSD) to detect the scale of the liquid level meter image includes multiple steps, namely: feature recognition, type detection and non-maximum suppression processing.
[0042] 103. If the scale detection result is that there is no scale value in the liquid level gauge image, feature recognition is performed on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge;
[0043] The terminal performs feature recognition on the liquid level gauge image by binarization. Each pixel in the binarized liquid level gauge image has only one of two preset grayscale values. For example, the terminal transforms the grayscale value corresponding to the pixel whose grayscale value is greater than or equal to the specified threshold into a first preset grayscale value (255) according to a specified threshold, and transforms the grayscale value corresponding to the pixel whose grayscale value is less than the specified threshold into a second preset grayscale value (0). The multiple pixel points corresponding to the first preset grayscale value (255) are used to indicate the air window of the power transformer liquid level gauge, and the multiple pixel points corresponding to the second preset grayscale value (0) are used to indicate the liquid window of the power transformer liquid level gauge.
[0044] 104. Generate a liquid level value corresponding to the power transformer liquid level gauge according to the air window and / or liquid window in the liquid level gauge characteristic image.
[0045] The terminal recognizes that the characteristic image of the liquid level gauge only includes the air window, and obtains that there is no liquid in the power transformer liquid level gauge; or the terminal recognizes that the characteristic image of the liquid level gauge only includes the liquid window, obtains the coordinates of different key points according to the shapes of different liquid windows, and calculates the area of the liquid window to obtain the proportion of liquid in the power transformer liquid level gauge, and the proportion of liquid is used to indicate the liquid level value; or the terminal recognizes that the characteristic image of the liquid level gauge includes the air window and the liquid window, and calculates the liquid window area and the area of the liquid level gauge display part according to the dividing line between the air window and the liquid window (that is, the position of the liquid surface), the shape and position coordinates of the air window and the liquid window, and obtains the liquid level value corresponding to the power transformer liquid level gauge according to the ratio of the liquid window area to the area of the liquid level gauge display part.
[0046] In a feasible implementation, feature recognition is first performed on the liquid level gauge image to obtain a liquid level gauge feature image, and then the liquid level value corresponding to the power transformer liquid level gauge is obtained based on the air window and / or liquid window in the liquid level gauge feature image. For the liquid level gauge with a scale, character recognition is then performed to obtain the upper and lower thresholds of the scale, and then the liquid level value corresponding to the power transformer liquid level gauge is obtained in combination with the liquid surface positions of the air window and the liquid window.
[0047] In an embodiment of the present invention, an image of a liquid level gauge to be detected is obtained, wherein the image of the liquid level gauge includes a liquid level gauge of an electric transformer; scale detection is performed on the image of the liquid level gauge using a preset liquid level detection model to obtain a scale detection result; if the scale detection result is that no scale value exists in the image of the liquid level gauge, feature recognition is performed on the image of the liquid level gauge to obtain a feature image of the liquid level gauge, wherein the feature image of the liquid level gauge includes an air window and / or a liquid window of the liquid level gauge of the electric transformer; a liquid level value corresponding to the liquid level gauge of the electric transformer is generated according to the air window and / or the liquid window in the feature image of the liquid level gauge, thereby improving the accuracy of the liquid level detection.
[0048] See also Figure 2Another embodiment of the method for detecting liquid level of a power transformer in the embodiment of the present invention includes:
[0049] 201. Acquire a plurality of different liquid level gauge images, and train a preset model based on the plurality of different liquid level gauge images to generate a liquid level detection model, wherein the liquid level gauge image includes a power transformer liquid level gauge;
[0050] Specifically, (1) the terminal obtains a plurality of different level gauge images, wherein the level gauge image includes a power transformer level gauge; (2) the terminal respectively marks the contours of the air window and / or liquid window corresponding to the power transformer level gauge in each level gauge image, and generates a plurality of level gauge images with contour marks; (3) the terminal trains a preset model through a deep neural network based on the plurality of level gauge images with contour marks, and generates a level detection model.
[0051] For example, the terminal obtains multiple different liquid level gauge images, wherein the liquid level gauge image includes a power transformer liquid level gauge, and the multiple different liquid level gauge images include a circular / rectangular liquid level gauge image with no scale value and only an air window, a circular / rectangular liquid level gauge image with no scale value and only a liquid window, a circular / rectangular liquid level gauge image with no scale value and including an air window and a liquid window, a rectangular liquid level gauge image with scale value and only an air window, a rectangular liquid level gauge image with scale value and only a liquid window, and a rectangular liquid level gauge image with scale value and including an air window and a liquid window.
[0052] The air window and / or liquid window corresponding to the power transformer liquid level gauge in each liquid level gauge image are respectively contour-marked to generate multiple liquid level gauge images with contour marks, wherein the air window is the area from the liquid surface to the top of the liquid level gauge container or the area from the bottom of the liquid level gauge container to the top of the liquid level gauge container when there is no liquid, and the liquid window is the area from the liquid surface to the bottom of the liquid level gauge container or the area from the bottom of the liquid level gauge container to the top of the liquid level gauge container when there is no air.
[0053] Based on multiple contour-marked level gauge images, a preset model is trained through a deep neural network (Mask Region-Convolutional Neural Networks, Mask R-CNN) to generate a level detection model. For example, the number of contour-marked level gauge images is 1, and the contour-marked level gauge image is input into the deep neural network Mask R-CNN for feature extraction to generate a level gauge feature map, and the level gauge feature map is segmented and masked to obtain multiple initial mask image blocks, and the multiple initial mask image blocks are subjected to type detection and prediction box regression to obtain multiple candidate mask image blocks, and the multiple candidate mask image blocks are superimposed with the air windows and / or liquid windows marked in the contour-marked level gauge image to generate a level gauge image containing the target mask area, and the multiple contour-marked level gauge images are input into the deep neural network Mask R-CNN for training to generate a level detection model, wherein the loss formula of Mask R-CNN is L=L cls +L box +L mask , L cls represents the classification loss of the prediction box, L box represents the regression loss of the prediction box, L mask Represents the loss of the mask Mask.
[0054] 202. Acquire an image of a liquid level meter to be detected, wherein the image of the liquid level meter includes a liquid level meter of a power transformer;
[0055] There are many types of liquid level gauges for power transformers, such as circular liquid level gauges without scale values, rectangular liquid level gauges without scale values, and rectangular liquid level gauges with scale values, etc. The image of the liquid level gauge can be acquired through a variety of image acquisition devices, such as mobile phones, cameras, and video cameras.
[0056] The terminal can perform position correction on the liquid level gauge image to be detected to obtain a position-corrected liquid level gauge image, and denoise the position-corrected liquid level gauge image to generate a denoised liquid level gauge image, wherein the position correction is used to correct the tilted liquid level gauge image, and the denoising is used to reduce the noise in the liquid level gauge image, thereby reducing the noise interference effect between the image acquisition device and the external environment.
[0057] 203. Performing scale detection on the liquid level meter image by using a preset liquid level detection model to obtain a scale detection result;
[0058] The liquid level detection model can perform scale detection on the liquid level gauge image based on optical character recognition (OCR), can perform scale detection on the liquid level gauge image based on the target detection network (SSD), or can perform scale detection on the liquid level gauge image based on other detection networks.
[0059] For example, the process of the terminal using the liquid level detection model based on optical character recognition (OCR) to detect the scale of the liquid level meter image includes multiple steps, namely: grayscale, binarization, region of interest cutting and character recognition. The process of the terminal using the liquid level detection model based on the target detection network (SSD) to detect the scale of the liquid level meter image includes multiple steps, namely: feature recognition, type detection and non-maximum suppression processing.
[0060] Specifically, (1) the terminal calls a preset liquid level detection model to grayscale and binarize the liquid level meter image to obtain a binary liquid level meter image; (2) the binary liquid level meter image is segmented into a region of interest to generate a corresponding region of interest image, and character recognition is performed on the region of interest image to obtain a character recognition result; (3) if the character recognition result is that the preset character does not exist in the region of interest image, then the scale detection result is determined to be that there is no scale value in the liquid level meter image; (4) if the character recognition result is that the preset character exists in the region of interest image, then the scale detection result is determined to be that there is a scale value in the liquid level meter image.
[0061] For example, the terminal calls a preset liquid level detection model to grayscale and binarize the liquid level meter image to obtain a binarized liquid level meter image; performs region of interest segmentation on the binarized liquid level meter image to generate a corresponding region of interest image, and performs character recognition on the region of interest image to obtain a character recognition result; if the character recognition result is that the preset character does not exist in the region of interest image, then the scale detection result is determined to be that there is no scale value in the liquid level meter image, where the preset character can be the number "25", or the letter "L" or "mL", or the number and letter "100L", and the preset character can be set according to the liquid level meter with a scale value, and the specific details are not limited here; if the character recognition result is that the preset character exists in the region of interest image, then the scale detection result is determined to be that there is a scale value in the liquid level meter image.
[0062] For another example, the terminal performs scale detection on the liquid level meter image through the liquid level detection model based on the target detection network SSD to obtain a scale detection result. Specifically, the liquid level detection model based on the target detection network SSD is called to perform feature extraction of different convolution scales on the liquid level meter image to obtain multiple convolution feature layers; type detection is performed on each of the multiple convolution feature layers to obtain the candidate type corresponding to each convolution feature layer; non-maximum suppression processing is performed on the candidate type corresponding to each convolution feature layer to obtain the target type in the liquid level meter image; if the target type does not match the preset scale value type, the scale detection result is determined to be that there is no scale value in the liquid level meter image; if the target type matches the preset scale value type, the scale detection result is determined to be that there is a scale value in the liquid level meter image.
[0063] 204. If the scale detection result is that there is no scale value in the liquid level gauge image, feature recognition is performed on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge;
[0064] The terminal performs feature recognition on the liquid level gauge image by binarization. Each pixel in the binarized liquid level gauge image has only one of two preset grayscale values. For example, the terminal transforms the grayscale value corresponding to the pixel whose grayscale value is greater than or equal to the specified threshold into a first preset grayscale value (255) according to a specified threshold, and transforms the grayscale value corresponding to the pixel whose grayscale value is less than the specified threshold into a second preset grayscale value (0). The multiple pixel points corresponding to the first preset grayscale value (255) are used to indicate the air window of the power transformer liquid level gauge, and the multiple pixel points corresponding to the second preset grayscale value (0) are used to indicate the liquid window of the power transformer liquid level gauge.
[0065] Specifically, (1) if the scale detection result is that there is no scale value in the liquid level meter image, the terminal performs pixel segmentation on the liquid level meter image to obtain multiple binary pixel points, each of which corresponds to a grayscale value; (2) if the grayscale value of each of the multiple binary pixel points is equal to the first preset grayscale value, the terminal determines that the liquid level meter characteristic image includes an air window but does not include a liquid window; (3) if the grayscale value of each of the multiple binary pixel points is equal to the second preset grayscale value, the terminal determines that the liquid level meter characteristic image includes a liquid window but does not include an air window; (4) if the multiple binary pixel points include a first pixel point set and a second pixel point set, the terminal determines that the liquid level meter characteristic image includes an air window and a liquid window, wherein the first pixel point set includes multiple binary pixel points whose grayscale values are equal to the first preset grayscale value, the second pixel point set includes multiple binary pixel points whose grayscale values are equal to the second preset grayscale value, the first pixel point set corresponds to the air window, and the second pixel point set corresponds to the liquid window.
[0066] For example, if the scale detection result is that there is no scale value in the liquid level meter image, the terminal performs pixel segmentation on the liquid level meter image to obtain multiple binary pixel points, each binary pixel point corresponds to a grayscale value, the grayscale value is 0 or 255, the first preset grayscale value is 255, and the second preset grayscale value is 0; if the grayscale value of each binary pixel point in the multiple binary pixel points is equal to 255, that is, the grayscale value of each binary pixel point is equal to the first preset grayscale value, then it is determined that the liquid level meter characteristic image includes an air window but does not include a liquid window; if the grayscale value of each binary pixel point in the multiple binary pixel points is equal to 255, that is, the grayscale value of each binary pixel point is equal to the first preset grayscale value, then it is determined that the liquid level meter characteristic image includes an air window but does not include a liquid window; If the values are all equal to 0, that is, the grayscale value of each binary pixel point is equal to the second preset grayscale value, the terminal determines that the characteristic image of the liquid level meter includes a liquid window but does not include an air window; if the multiple binary pixel points include a first pixel point set and a second pixel point set, the terminal determines that the characteristic image of the liquid level meter includes an air window and a liquid window, wherein the first pixel point set includes a plurality of binary pixel points whose grayscale values are equal to the first preset grayscale value (255), and the second pixel point set includes a plurality of binary pixel points whose grayscale values are equal to the second preset grayscale value (0), the first pixel point set corresponds to the air window, and the second pixel point set corresponds to the liquid window.
[0067] 205. Generate a liquid level value corresponding to the power transformer liquid level gauge according to the air window and / or liquid window in the liquid level gauge characteristic image.
[0068] The terminal recognizes that the characteristic image of the liquid level gauge only includes the air window, and obtains that there is no liquid in the power transformer liquid level gauge; or the terminal recognizes that the characteristic image of the liquid level gauge only includes the liquid window, obtains the coordinates of different key points according to the shapes of different liquid windows, and calculates the area of the liquid window to obtain the proportion of liquid in the power transformer liquid level gauge, and the proportion of liquid is used to indicate the liquid level value; or the terminal recognizes that the characteristic image of the liquid level gauge includes the air window and the liquid window, and calculates the liquid window area and the area of the liquid level gauge display part according to the dividing line between the air window and the liquid window (that is, the position of the liquid surface), the shape and position coordinates of the air window and the liquid window, and obtains the liquid level value corresponding to the power transformer liquid level gauge according to the ratio of the liquid window area to the area of the liquid level gauge display part.
[0069] Specifically, (1) if the characteristic image of the level gauge includes an air window but does not include a liquid window, the terminal determines that the liquid level value corresponding to the power transformer level gauge is zero; (2) if the characteristic image of the level gauge includes a liquid window but does not include an air window, the terminal obtains multiple key point coordinates corresponding to the liquid window, and generates the area of the liquid window based on the multiple key point coordinates, and the area of the liquid window is used to indicate the liquid level value corresponding to the power transformer level gauge; (3) if the characteristic image of the level gauge includes an air window and a liquid window, the terminal obtains multiple air window key point coordinates corresponding to the air window, and obtains multiple liquid window key point coordinates corresponding to the liquid window; (4) based on the multiple liquid window key point coordinates, the corresponding liquid window area is generated; (5) the terminal generates the area of the level gauge display part in the level gauge characteristic image based on the multiple air window key point coordinates and the multiple liquid window key point coordinates; (6) the terminal calculates the proportion of the liquid window area in the area of the level gauge display part to obtain the liquid level value corresponding to the power transformer level gauge.
[0070] For example, if the characteristic image of the liquid level meter includes an air window but does not include a liquid window, the terminal determines that the liquid level value corresponding to the power transformer liquid level meter is zero.
[0071] If the characteristic image of the level gauge includes the liquid window but not the air window, the level value needs to be calculated in different ways for level gauges of different shapes:
[0072] (1) For a circular liquid level gauge, the terminal obtains the coordinates of the highest point and the lowest point of the liquid window, obtains the coordinates of the center of the liquid window based on the coordinates of the highest point and the lowest point of the liquid window, and obtains the radius corresponding to the liquid window based on the coordinates of the center of the liquid window and the coordinates of the highest point. The area of the liquid window is generated according to the preset circular area formula and the radius corresponding to the liquid window. The area of the liquid window is used to indicate the liquid level value corresponding to the power transformer liquid level gauge, that is, the proportion of liquid in the circular liquid level gauge is 100%;
[0073] (2) For a rectangular liquid level gauge, the terminal obtains the coordinates of the three endpoints of the liquid window, obtains the height and width of the liquid window based on the three endpoint coordinates, and generates the area of the liquid window based on the preset rectangular area formula, the height and width of the liquid window. The area of the liquid window is used to indicate the corresponding liquid level value of the power transformer liquid level gauge, that is, the proportion of liquid in the rectangular liquid level gauge is 100%.
[0074] If the characteristic image of the level gauge includes the air window and the liquid window, for a circular level gauge with a liquid level higher than the center of the circle, Figure 3 , then obtain the coordinates of the center point E of the liquid surface line AB (x E ,y E ), the coordinate of the highest point C of the air window (x C ,y C ), the coordinate of the lowest point D of the liquid window (x D ,yD ), according to the highest point C of the air window and the lowest point D of the liquid window, the coordinates of the center point O of the circular level gauge (x O ,y O ), which is the radius Among them, the area occupied by the semi-arc ABC is the air window, the area occupied by the semi-arc ABD is the liquid window, and the central angle corresponding to the arc AB is ∠AOB. According to the arc area formula Arc area Air window area Liquid window area S ADB =π*R*RS ACB , that is, the power transformer level meter corresponds to For a circular level gauge with a liquid level lower than the center of the circle, the calculation method of the liquid level value is the same as above and will not be repeated here. Figure 4 , then obtain the coordinates of point A in the liquid surface line AB (x A ,y A )、Point B coordinates (x B ,y B ), the lower end point C coordinate of the left frame line of the liquid window (x C ,y C ) and the upper end point E coordinate of the left frame line of the air window (x E ,y E ), where the area occupied by rectangle ABFE is the air window, and the area occupied by rectangle ABDC is the liquid window. According to the preset rectangle area formula, the liquid window area S is obtained. ABDC =AB*AC, that is, the corresponding
[0075] In a feasible implementation manner, steps 204 and 205 may also be replaced by the following steps:
[0076] (1) If the scale detection result is that there is a scale value in the liquid level gauge image, the terminal performs scale value recognition on the liquid level gauge image and generates an upper scale threshold and a lower scale threshold corresponding to the power transformer liquid level gauge; (2) The terminal performs feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge; (3) If the liquid level gauge feature image includes an air window but does not include a liquid window, the terminal determines the lower scale threshold as the liquid level value corresponding to the power transformer liquid level gauge; (4) If the liquid level gauge feature image includes a liquid window but does not include an air window, the terminal determines the upper scale threshold as the liquid level value corresponding to the power transformer liquid level gauge; (5) If the liquid level gauge feature image includes an air window and a liquid window, the terminal performs edge detection on the air window and the liquid window, generates a corresponding air window frame and a liquid window frame, and generates a liquid level value corresponding to the power transformer liquid level gauge according to the air window frame, the liquid window frame, the upper scale threshold and the lower scale threshold.
[0077] Specifically, step (5), if the characteristic image of the liquid level gauge includes an air window and a liquid window, the terminal performs edge detection on the air window and the liquid window, generates corresponding air window frames and liquid window frames, and generates a liquid level value corresponding to the power transformer liquid level gauge according to the air window frame, the liquid window frame, the upper threshold value of the scale and the lower threshold value of the scale. Specifically, it includes: if the characteristic image of the liquid level gauge includes an air window and a liquid window, the terminal performs edge detection on the air window and the liquid window, generates corresponding air window rectangular frames and liquid window rectangular frames, the air window rectangular frame includes an upper frame line of the air window and a lower frame line of the air window, the liquid window rectangular frame includes an upper frame line of the liquid window and a lower frame line of the liquid window, and the air window rectangular frame and the liquid window rectangular frame have a common frame line; the terminal calculates the distance between the common frame line and the lower frame line of the liquid window to obtain a first distance value; the terminal calculates the distance between the upper frame line of the air window and the lower frame line of the liquid window to obtain a second distance value; the terminal obtains the liquid level value corresponding to the power transformer liquid level gauge according to the ratio of the first distance value to the second distance value and the difference between the upper threshold value of the scale and the lower threshold value of the scale.
[0078] For example, if the scale detection result is that there is a scale value in the level gauge image, that is, the level gauge is a rectangular level gauge, the terminal identifies the scale value of the level gauge image, and generates an upper scale threshold "2L" and a lower scale threshold "0L" corresponding to the power transformer level gauge; the terminal performs feature recognition on the level gauge image to obtain a feature image of the level gauge, wherein the feature image of the level gauge includes an air window and / or a liquid window of the power transformer level gauge; if the feature image of the level gauge includes an air window but does not include a liquid window, the terminal determines the lower scale threshold "0L" as the liquid level value corresponding to the power transformer level gauge; if the feature image of the level gauge includes a liquid window but does not include an air window, the terminal determines the upper scale threshold "2L" as the liquid level value corresponding to the power transformer level gauge; if the feature image of the level gauge includes an air window and a liquid window, the terminal performs edge detection on the air window and the liquid window to generate a The air window rectangular frame and the liquid window rectangular frame are formed into corresponding air window rectangular frames and liquid window rectangular frames, the air window rectangular frame includes an air window upper frame line and an air window lower frame line, the liquid window rectangular frame includes a liquid window upper frame line and a liquid window lower frame line, and there is a common frame line between the air window rectangular frame and the liquid window rectangular frame; the terminal obtains the left endpoint coordinates of the common frame line and the left endpoint coordinates of the liquid window lower frame line, and calculates the distance between the common frame line and the liquid window lower frame line according to the left endpoint coordinates of the common frame line and the left endpoint coordinates of the liquid window lower frame line, and obtains a first distance value d1; the terminal obtains the left endpoint coordinates of the air window upper frame line, and calculates the distance between the air window upper frame line and the liquid window lower frame line according to the left endpoint coordinates of the air window upper frame line and the left endpoint coordinates of the liquid window lower frame line, and obtains a second distance value d2; the terminal obtains a difference value of "2L" according to the upper threshold value "2L" of the scale and the lower threshold value "0L" of the scale, that is, the corresponding value of the power transformer liquid level meter
[0079] In an embodiment of the present invention, an image of a liquid level gauge to be detected is obtained, wherein the image of the liquid level gauge includes a liquid level gauge of an electric transformer; scale detection is performed on the image of the liquid level gauge using a preset liquid level detection model to obtain a scale detection result; if the scale detection result is that no scale value exists in the image of the liquid level gauge, feature recognition is performed on the image of the liquid level gauge to obtain a feature image of the liquid level gauge, wherein the feature image of the liquid level gauge includes an air window and / or a liquid window of the liquid level gauge of the electric transformer; a liquid level value corresponding to the liquid level gauge of the electric transformer is generated according to the air window and / or the liquid window in the feature image of the liquid level gauge, thereby improving the accuracy of the liquid level detection.
[0080] See also Figure 5 Another embodiment of the method for detecting liquid level of a power transformer in the embodiment of the present invention includes:
[0081] 501. Acquire a liquid level meter image to be detected, wherein the liquid level meter image includes a power transformer liquid level meter;
[0082] There are many types of liquid level gauges for power transformers, such as circular liquid level gauges without scale values, rectangular liquid level gauges without scale values, and rectangular liquid level gauges with scale values, etc. The image of the liquid level gauge can be acquired through a variety of image acquisition devices, such as mobile phones, cameras, and video cameras.
[0083] The terminal can perform position correction on the liquid level gauge image to be detected to obtain a position-corrected liquid level gauge image, and denoise the position-corrected liquid level gauge image to generate a denoised liquid level gauge image, wherein the position correction is used to correct the tilted liquid level gauge image, and the denoising is used to reduce the noise in the liquid level gauge image, thereby reducing the noise interference effect between the image acquisition device and the external environment.
[0084] 502. Performing scale detection on the liquid level meter image by using a preset liquid level detection model to obtain a scale detection result;
[0085] The liquid level detection model can perform scale detection on the liquid level gauge image based on optical character recognition (OCR), can perform scale detection on the liquid level gauge image based on the target detection network (SSD), or can perform scale detection on the liquid level gauge image based on other detection networks.
[0086] For example, the process of the terminal using the liquid level detection model based on optical character recognition (OCR) to detect the scale of the liquid level meter image includes multiple steps, namely: grayscale, binarization, region of interest cutting and character recognition. The process of the terminal using the liquid level detection model based on the target detection network (SSD) to detect the scale of the liquid level meter image includes multiple steps, namely: feature recognition, type detection and non-maximum suppression processing.
[0087] Specifically, (1) the terminal calls a preset liquid level detection model to grayscale and binarize the liquid level meter image to obtain a binarized liquid level meter image; (2) the terminal performs region of interest segmentation on the binarized liquid level meter image to generate a corresponding region of interest image, and performs character recognition on the region of interest image to obtain a character recognition result; (3) if the character recognition result is that the preset characters do not exist in the region of interest image, the terminal determines that the scale detection result is that there is no scale value in the liquid level meter image; (4) if the character recognition result is that the preset characters exist in the region of interest image, the terminal determines that the scale detection result is that there is a scale value in the liquid level meter image.
[0088] For example, the terminal calls a preset liquid level detection model to grayscale and binarize the liquid level gauge image to obtain a binarized liquid level gauge image; the terminal performs region of interest segmentation on the binarized liquid level gauge image to generate a corresponding region of interest image, and performs character recognition on the region of interest image to obtain a character recognition result; if the character recognition result is that the preset character does not exist in the region of interest image, the terminal determines that the scale detection result is that there is no scale value in the liquid level gauge image, where the preset character can be the number "25", or the letter "L" or "mL", or the number and letter "100L". The preset character can be set according to the liquid level gauge with a scale value, and the specific details are not limited here; if the character recognition result is that the preset character exists in the region of interest image, the terminal determines that the scale detection result is that there is a scale value in the liquid level gauge image.
[0089] For another example, the terminal performs scale detection on the liquid level meter image through the liquid level detection model based on the target detection network SSD to obtain the scale detection result. Specifically, the terminal calls the liquid level detection model based on the target detection network SSD to perform feature extraction of different convolution scales on the liquid level meter image to obtain multiple convolution feature layers; the terminal performs type detection on each of the multiple convolution feature layers to obtain the candidate type corresponding to each convolution feature layer; the terminal performs non-maximum suppression processing on the candidate type corresponding to each convolution feature layer to obtain the target type in the liquid level meter image; if the target type does not match the preset scale value type, the terminal determines that the scale detection result is that there is no scale value in the liquid level meter image; if the target type matches the preset scale value type, the scale detection result is determined to be that there is a scale value in the liquid level meter image.
[0090] 503. If the scale detection result is that there is a scale value in the liquid level gauge image, the scale value is identified on the liquid level gauge image to obtain the liquid level value corresponding to the power transformer liquid level gauge;
[0091] Specifically, (1) if the scale detection result is that there is a scale value in the liquid level gauge image, the terminal performs scale value recognition on the liquid level gauge image and generates an upper scale threshold and a lower scale threshold corresponding to the power transformer liquid level gauge; (2) the terminal performs feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge; (3) if the liquid level gauge feature image includes an air window but does not include a liquid window, the terminal determines the lower scale threshold as the liquid level value corresponding to the power transformer liquid level gauge; (4) if the liquid level gauge feature image includes a liquid window but does not include an air window, the terminal determines the upper scale threshold as the liquid level value corresponding to the power transformer liquid level gauge; (5) if the liquid level gauge feature image includes an air window and a liquid window, the terminal performs edge detection on the air window and the liquid window, generates a corresponding air window frame and a liquid window frame, and generates a liquid level value corresponding to the power transformer liquid level gauge according to the air window frame, the liquid window frame, the upper scale threshold and the lower scale threshold.
[0092] Specifically, step (5), if the characteristic image of the liquid level gauge includes an air window and a liquid window, the terminal performs edge detection on the air window and the liquid window, generates corresponding air window frames and liquid window frames, and generates a liquid level value corresponding to the power transformer liquid level gauge according to the air window frame, the liquid window frame, the upper threshold value of the scale and the lower threshold value of the scale. Specifically, it includes: if the characteristic image of the liquid level gauge includes an air window and a liquid window, the terminal performs edge detection on the air window and the liquid window, generates corresponding air window rectangular frames and liquid window rectangular frames, the air window rectangular frame includes an upper frame line of the air window and a lower frame line of the air window, the liquid window rectangular frame includes an upper frame line of the liquid window and a lower frame line of the liquid window, and the air window rectangular frame and the liquid window rectangular frame have a common frame line; the terminal calculates the distance between the common frame line and the lower frame line of the liquid window to obtain a first distance value; the terminal calculates the distance between the upper frame line of the air window and the lower frame line of the liquid window to obtain a second distance value; the terminal obtains the liquid level value corresponding to the power transformer liquid level gauge according to the ratio of the first distance value to the second distance value and the difference between the upper threshold value of the scale and the lower threshold value of the scale.
[0093] For example, if the scale detection result is that there is a scale value in the level gauge image, that is, the level gauge is a rectangular level gauge, the terminal identifies the scale value of the level gauge image, and generates an upper scale threshold "2L" and a lower scale threshold "0L" corresponding to the power transformer level gauge; the terminal performs feature recognition on the level gauge image to obtain a feature image of the level gauge, wherein the feature image of the level gauge includes an air window and / or a liquid window of the power transformer level gauge; if the feature image of the level gauge includes an air window but does not include a liquid window, the terminal determines the lower scale threshold "0L" as the liquid level value corresponding to the power transformer level gauge; if the feature image of the level gauge includes a liquid window but does not include an air window, the terminal determines the upper scale threshold "2L" as the liquid level value corresponding to the power transformer level gauge; if the feature image of the level gauge includes an air window and a liquid window, the terminal performs edge detection on the air window and the liquid window to generate The corresponding air window rectangular frame and liquid window rectangular frame, the air window rectangular frame includes an upper frame line of the air window and a lower frame line of the air window, the liquid window rectangular frame includes an upper frame line of the liquid window and a lower frame line of the liquid window, and the air window rectangular frame and the liquid window rectangular frame have a common frame line; the terminal obtains the left endpoint coordinates of the common frame line and the left endpoint coordinates of the lower frame line of the liquid window, and calculates the distance between the common frame line and the lower frame line of the liquid window according to the left endpoint coordinates of the common frame line and the left endpoint coordinates of the lower frame line of the liquid window, and obtains a first distance value d1; the terminal obtains the left endpoint coordinates of the upper frame line of the air window, and calculates the distance between the upper frame line of the air window and the lower frame line of the liquid window according to the left endpoint coordinates of the upper frame line of the air window and the left endpoint coordinates of the lower frame line of the liquid window, and obtains a second distance value d2; the terminal obtains the difference "2L" according to the upper threshold value "2L" of the scale and the lower threshold value "0L" of the scale, that is, the corresponding value of the power transformer liquid level meter
[0094] 504. Verify the liquid level value corresponding to the power transformer liquid level gauge to obtain the target liquid level value.
[0095] Specifically, (1) if the characteristic image of the liquid level gauge includes an air window but does not include a liquid window, the terminal identifies the scale value corresponding to the lower frame line of the air window, obtains a candidate scale value corresponding to the lower frame line of the air window, and if the candidate scale value is equal to the lower threshold value of the scale, determines that the target liquid level value is the candidate scale value corresponding to the lower frame line of the air window;
[0096] (2) If the characteristic image of the liquid level gauge includes the liquid window but does not include the air window, the terminal identifies the scale value corresponding to the upper frame line of the liquid window to obtain a candidate scale value corresponding to the upper frame line of the liquid window. If the candidate scale value is equal to the upper threshold value of the scale, the target liquid level value is determined to be the candidate scale value corresponding to the upper frame line of the liquid window.
[0097] (3) If the characteristic image of the liquid level meter includes an air window and a liquid window, the terminal identifies the scale value corresponding to the common frame line to obtain a candidate scale value corresponding to the common frame line. If the error between the candidate scale value and the initial liquid level value is less than or equal to a preset error, the target liquid level value is determined to be the candidate scale value corresponding to the common frame line, wherein the common frame line is used to indicate the liquid surface line between the air window and the liquid window, and the initial liquid level value is used to indicate the liquid level value obtained by the ratio of the first distance value to the second distance value, and the difference between the upper scale threshold and the lower scale threshold.
[0098] For example, if the characteristic image of the liquid level gauge includes an air window but does not include a liquid window, the terminal identifies the scale value corresponding to the lower frame line of the air window, and obtains a candidate scale value "0L" corresponding to the lower frame line of the air window. If the candidate scale value is equal to the lower scale threshold "0L", the target liquid level value is determined to be the candidate scale value "0L" corresponding to the lower frame line of the air window.
[0099] If the characteristic image of the liquid level gauge includes the liquid window but does not include the air window, the terminal identifies the scale value corresponding to the upper frame line of the liquid window, and obtains the candidate scale value "2L" corresponding to the upper frame line of the liquid window. If the candidate scale value is equal to the upper threshold value "2L", the target liquid level value is determined to be the candidate scale value "2L" corresponding to the upper frame line of the liquid window.
[0100] If the characteristic image of the liquid level gauge includes an air window and a liquid window, the terminal identifies the scale value corresponding to the common frame line and obtains the candidate scale value "1.5L" corresponding to the common frame line. If the candidate scale value "1.5L" is equal to the initial liquid level value If the error is less than or equal to the preset error of 5%, the target liquid level value is determined to be the candidate scale value "1.5L" corresponding to the common frame line, wherein the common frame line is used to indicate the liquid surface line between the air window and the liquid window, and the initial liquid level value is used to indicate the liquid level value obtained by the ratio of the first distance value to the second distance value, the difference between the upper scale threshold and the lower scale threshold. It should be noted that the candidate scale value here is the real scale value on the liquid level meter.
[0101] In a feasible implementation manner, steps 503 and 504 may also be replaced by the following steps:
[0102] (i) If the scale detection result is that there is no scale value in the liquid level gauge image, the terminal performs feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge;
[0103] Specifically, (1) if the scale detection result is that there is no scale value in the liquid level meter image, the terminal performs pixel segmentation on the liquid level meter image to obtain multiple binary pixel points, each of which corresponds to a grayscale value; (2) if the grayscale value of each of the multiple binary pixel points is equal to the first preset grayscale value, the terminal determines that the liquid level meter characteristic image includes an air window but does not include a liquid window; (3) if the grayscale value of each of the multiple binary pixel points is equal to the second preset grayscale value, the terminal determines that the liquid level meter characteristic image includes a liquid window but does not include an air window; (4) if the multiple binary pixel points include a first pixel point set and a second pixel point set, the terminal determines that the liquid level meter characteristic image includes an air window and a liquid window, wherein the first pixel point set includes multiple binary pixel points whose grayscale values are equal to the first preset grayscale value, the second pixel point set includes multiple binary pixel points whose grayscale values are equal to the second preset grayscale value, the first pixel point set corresponds to the air window, and the second pixel point set corresponds to the liquid window.
[0104] For example, if the scale detection result is that there is no scale value in the level meter image, the terminal performs pixel segmentation on the level meter image to obtain multiple binary pixel points, each binary pixel point corresponds to a grayscale value, the grayscale value is 0 or 255, the first preset grayscale value is 255, and the second preset grayscale value is 0; if the grayscale value of each binary pixel point in the multiple binary pixel points is equal to 255, that is, the grayscale value of each binary pixel point is equal to the first preset grayscale value, then the terminal determines that the level meter characteristic image includes an air window but does not include a liquid window; if the grayscale value of each binary pixel point in the multiple binary pixel points is equal to 255, that is, the grayscale value of each binary pixel point is equal to the first preset grayscale value, then the terminal determines that the level meter characteristic image includes an air window but does not include a liquid window; If the grayscale values of the binarized pixels are all equal to 0, that is, the grayscale value of each binary pixel is equal to the second preset grayscale value, the terminal determines that the characteristic image of the liquid level meter includes a liquid window but does not include an air window; if the multiple binary pixel points include a first pixel point set and a second pixel point set, the terminal determines that the characteristic image of the liquid level meter includes an air window and a liquid window, wherein the first pixel point set includes a plurality of binary pixel points whose grayscale values are equal to the first preset grayscale value (255), and the second pixel point set includes a plurality of binary pixel points whose grayscale values are equal to the second preset grayscale value (0), the first pixel point set corresponds to the air window, and the second pixel point set corresponds to the liquid window.
[0105] (ii) generating a liquid level value corresponding to the liquid level gauge of the power transformer according to the air window and / or liquid window in the characteristic image of the liquid level gauge;
[0106] Specifically, (1) if the characteristic image of the level gauge includes an air window but does not include a liquid window, the terminal determines that the liquid level value corresponding to the power transformer level gauge is zero; (2) if the characteristic image of the level gauge includes a liquid window but does not include an air window, the terminal obtains multiple key point coordinates corresponding to the liquid window, and generates the area of the liquid window based on the multiple key point coordinates, and the area of the liquid window is used to indicate the liquid level value corresponding to the power transformer level gauge; (3) if the characteristic image of the level gauge includes an air window and a liquid window, the terminal obtains multiple air window key point coordinates corresponding to the air window, and obtains multiple liquid window key point coordinates corresponding to the liquid window; (4) the terminal generates the corresponding liquid window area based on the multiple liquid window key point coordinates; (5) the terminal generates the area of the level gauge display part in the level gauge characteristic image based on the multiple air window key point coordinates and the multiple liquid window key point coordinates; (6) the terminal calculates the proportion of the liquid window area in the area of the level gauge display part, and obtains the liquid level value corresponding to the power transformer level gauge.
[0107] For example, if the characteristic image of the liquid level meter includes an air window but does not include a liquid window, the terminal determines that the liquid level value corresponding to the power transformer liquid level meter is zero.
[0108] If the characteristic image of the level gauge includes the liquid window but not the air window, the level value needs to be calculated in different ways for level gauges of different shapes:
[0109] (1) For a circular liquid level gauge, the terminal obtains the coordinates of the highest point and the lowest point of the liquid window, obtains the coordinates of the center of the liquid window based on the coordinates of the highest point and the lowest point of the liquid window, and obtains the radius corresponding to the liquid window based on the coordinates of the center of the liquid window and the coordinates of the highest point. The area of the liquid window is generated according to the preset circular area formula and the radius corresponding to the liquid window. The area of the liquid window is used to indicate the liquid level value corresponding to the power transformer liquid level gauge, that is, the proportion of liquid in the circular liquid level gauge is 100%;
[0110] (2) For a rectangular liquid level gauge, the terminal obtains the coordinates of the three endpoints of the liquid window, obtains the height and width of the liquid window based on the three endpoint coordinates, and generates the area of the liquid window based on the preset rectangular area formula, the height and width of the liquid window. The area of the liquid window is used to indicate the corresponding liquid level value of the power transformer liquid level gauge, that is, the proportion of liquid in the rectangular liquid level gauge is 100%.
[0111] If the characteristic image of the liquid level gauge includes an air window and a liquid window, for a circular liquid level gauge whose liquid level is higher than the center of the circle, the terminal obtains the coordinates (x E ,y E ), the coordinate of the highest point C of the air window (x C ,y C ), the coordinate of the lowest point D of the liquid window (x D ,y D), according to the highest point C of the air window and the lowest point D of the liquid window, the coordinates of the center point O of the circular level gauge (x O ,y O ), which is the radius Among them, the area occupied by the semi-arc ABC is the air window, the area occupied by the semi-arc ABD is the liquid window, and the central angle corresponding to the arc AB is ∠AOB. According to the arc area formula Arc area Air window area Liquid window area S ADB =π*R*RS ACB , that is, the power transformer level meter corresponds to For a circular level gauge whose liquid level is lower than the center of the circle, the calculation method of the liquid level value is the same as above and will not be repeated here. For a rectangular level gauge, the coordinates of point A in the liquid level line AB (x A ,y A )、Point B coordinates (x B ,y B ), the lower end point C coordinate of the left frame line of the liquid window (x C ,y C ) and the upper end point E coordinate of the left frame line of the air window (x E ,y E ), where the area occupied by rectangle ABFE is the air window, and the area occupied by rectangle ABDC is the liquid window. According to the preset rectangle area formula, the liquid window area S is obtained. ABDC =AB*AC, that is, the corresponding
[0112] (3) Verify the liquid level value corresponding to the power transformer liquid level gauge to obtain the target liquid level value.
[0113] In a feasible implementation manner, excluding the interference of factors such as light and time, the color of the liquid in the power transformer liquid level meter does not change.
[0114] Specifically, (1) if the characteristic image of the liquid level gauge includes an air window but not a liquid window, and the liquid level value corresponding to the power transformer liquid level gauge is zero, the terminal performs color recognition on the display part of the liquid level gauge. If the color corresponding to the display part of the liquid level gauge only matches the preset air window color, the target liquid level value is determined to be zero;
[0115] (2) If the characteristic image of the liquid level gauge includes a liquid window but does not include an air window, and the area of the liquid window is generated according to the coordinates of the multiple key points, the terminal performs color recognition on the display part of the liquid level gauge. If the color corresponding to the display part of the liquid level gauge only matches the preset liquid window color, the target liquid level value is determined to be the proportion corresponding to the liquid window area;
[0116] (3) If the characteristic image of the liquid level gauge includes an air window and a liquid window, and the liquid level value corresponding to the power transformer liquid level gauge is obtained according to the proportion of the liquid window area in the area of the liquid level gauge display part, the terminal performs color recognition on the liquid level gauge display part to obtain the corresponding air window color area and liquid window color area. If the liquid window and the liquid window color area are the same and the air window and the air window color area are the same, the target liquid level value is determined as the proportion of the liquid window area in the area of the liquid level gauge display part.
[0117] For example, if the characteristic image of the level gauge includes an air window but not a liquid window, and the liquid level value corresponding to the power transformer level gauge is zero, the terminal performs color recognition on the display part of the level gauge. If the color corresponding to the display part of the level gauge is colorless and the preset air window color is colorless, the color corresponding to the display part of the level gauge only conforms to the preset air window color, that is, the target liquid level value is determined to be zero;
[0118] If the characteristic image of the liquid level gauge includes a liquid window but does not include an air window, and the area of the liquid window is generated according to the coordinates of multiple key points, the terminal performs color recognition on the display part of the liquid level gauge. If the color corresponding to the display part of the liquid level gauge is yellow and the preset liquid window color is yellow, the color corresponding to the display part of the liquid level gauge only conforms to the preset liquid window color, that is, the target liquid level value is determined to be the proportion corresponding to the liquid window area;
[0119] If the characteristic image of the level gauge includes an air window and a liquid window, and the liquid level value corresponding to the power transformer level gauge is obtained based on the proportion of the liquid window area in the area of the level gauge display part, the terminal performs color recognition on the level gauge display part to obtain the corresponding colorless area of the air window and yellow area of the liquid window. If the liquid window is the same as the yellow area of the liquid window and the air window is the same as the colorless area of the air window, then the target liquid level value is determined as the proportion of the liquid window area in the area of the level gauge display part.
[0120] In an embodiment of the present invention, an image of a liquid level gauge to be detected is obtained, wherein the image of the liquid level gauge includes a liquid level gauge of an electric transformer; scale detection is performed on the image of the liquid level gauge using a preset liquid level detection model to obtain a scale detection result; if the scale detection result is that no scale value exists in the image of the liquid level gauge, feature recognition is performed on the image of the liquid level gauge to obtain a feature image of the liquid level gauge, wherein the feature image of the liquid level gauge includes an air window and / or a liquid window of the liquid level gauge of the electric transformer; a liquid level value corresponding to the liquid level gauge of the electric transformer is generated according to the air window and / or the liquid window in the feature image of the liquid level gauge, thereby improving the accuracy of the liquid level detection.
[0121] The above describes the liquid level detection method of the power transformer in the embodiment of the present invention. The following describes the liquid level detection device of the power transformer in the embodiment of the present invention. Figure 6 , an embodiment of the liquid level detection device of the power transformer in the embodiment of the present invention comprises:
[0122] An acquisition module 601 is used to acquire an image of a liquid level meter to be detected, wherein the liquid level meter image includes a liquid level meter of a power transformer;
[0123] The detection module 602 is used to perform scale detection on the liquid level meter image through a preset liquid level detection model to obtain a scale detection result;
[0124] A first feature recognition module 603 is used to perform feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image if the scale detection result is that there is no scale value in the liquid level gauge image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge;
[0125] The liquid level value generating module 604 is used to generate a liquid level value corresponding to the liquid level gauge of the power transformer according to the air window and / or liquid window in the characteristic image of the liquid level gauge.
[0126] In an embodiment of the present invention, an image of a liquid level gauge to be detected is obtained, wherein the image of the liquid level gauge includes a liquid level gauge of an electric transformer; scale detection is performed on the image of the liquid level gauge using a preset liquid level detection model to obtain a scale detection result; if the scale detection result is that no scale value exists in the image of the liquid level gauge, feature recognition is performed on the image of the liquid level gauge to obtain a feature image of the liquid level gauge, wherein the feature image of the liquid level gauge includes an air window and / or a liquid window of the liquid level gauge of the electric transformer; a liquid level value corresponding to the liquid level gauge of the electric transformer is generated according to the air window and / or the liquid window in the feature image of the liquid level gauge, thereby improving the accuracy of the liquid level detection.
[0127] See also Figure 7 Another embodiment of the liquid level detection device for a power transformer in the embodiment of the present invention includes:
[0128] An acquisition module 601 is used to acquire an image of a liquid level meter to be detected, wherein the liquid level meter image includes a liquid level meter of a power transformer;
[0129] The detection module 602 is used to perform scale detection on the liquid level meter image through a preset liquid level detection model to obtain a scale detection result;
[0130] A first feature recognition module 603 is used to perform feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image if the scale detection result is that there is no scale value in the liquid level gauge image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge;
[0131] The liquid level value generating module 604 is used to generate a liquid level value corresponding to the liquid level gauge of the power transformer according to the air window and / or liquid window in the characteristic image of the liquid level gauge.
[0132] Optionally, the detection module 602 is specifically used for:
[0133] Calling the preset liquid level detection model to grayscale and binarize the liquid level gauge image to obtain a binary liquid level gauge image;
[0134] Performing region of interest segmentation on the binary level gauge image to generate a corresponding region of interest image, and performing character recognition on the region of interest image to obtain a character recognition result;
[0135] If the character recognition result is that the preset character does not exist in the image of the region of interest, then the scale detection result is determined to be that the scale value does not exist in the image of the liquid level gauge;
[0136] If the character recognition result is that the preset character exists in the image of the region of interest, then the scale detection result is determined to be that the scale value exists in the image of the liquid level meter.
[0137] Optionally, the first feature recognition module 603 is specifically used for:
[0138] If the scale detection result is that there is no scale value in the level gauge image, the level gauge image is pixel segmented to obtain a plurality of binary pixel points, each of which corresponds to a gray value;
[0139] If the grayscale value of each of the plurality of binary pixel points is equal to the first preset grayscale value, it is determined that the characteristic image of the liquid level meter includes an air window but does not include a liquid window;
[0140] If the grayscale value of each of the plurality of binary pixel points is equal to the second preset grayscale value, it is determined that the characteristic image of the liquid level meter includes the liquid window but does not include the air window;
[0141] If the multiple binary pixel points include a first pixel point set and a second pixel point set, it is determined that the characteristic image of the liquid level meter includes an air window and a liquid window, wherein the first pixel point set includes a plurality of binary pixel points whose grayscale values are equal to a first preset grayscale value, and the second pixel point set includes a plurality of binary pixel points whose grayscale values are equal to a second preset grayscale value, the first pixel point set corresponds to the air window, and the second pixel point set corresponds to the liquid window.
[0142] Optionally, the liquid level value generating module 604 is specifically used for:
[0143] If the characteristic image of the liquid level gauge includes an air window but does not include a liquid window, it is determined that the liquid level value corresponding to the power transformer liquid level gauge is zero;
[0144] If the characteristic image of the liquid level gauge includes a liquid window but does not include an air window, then a plurality of key point coordinates corresponding to the liquid window are obtained, and the area of the liquid window is generated according to the plurality of key point coordinates, and the area of the liquid window is used to indicate the liquid level value corresponding to the power transformer liquid level gauge;
[0145] If the characteristic image of the liquid level gauge includes an air window and a liquid window, then obtaining the coordinates of a plurality of key points of the air window corresponding to the air window, and obtaining the coordinates of a plurality of key points of the liquid window corresponding to the liquid window;
[0146] Generate corresponding liquid window areas according to the coordinates of multiple liquid window key points;
[0147] Generate an area of a liquid level gauge display portion in a liquid level gauge feature image according to a plurality of air window key point coordinates and a plurality of liquid window key point coordinates;
[0148] The proportion of the liquid window area to the area of the liquid level gauge display part is calculated to obtain the corresponding liquid level value of the power transformer liquid level gauge.
[0149] Optionally, the power transformer liquid level detection device further includes:
[0150] The scale value recognition module 605 is used to perform scale value recognition on the liquid level gauge image if the scale detection result is that the scale value exists in the liquid level gauge image, and generate the scale upper threshold value and scale lower threshold value corresponding to the power transformer liquid level gauge;
[0151] A second feature recognition module 606 is used to perform feature recognition on the level gauge image to obtain a level gauge feature image, wherein the level gauge feature image includes an air window and / or a liquid window of the power transformer level gauge;
[0152] A first determination module 607, configured to determine the lower threshold as the liquid level value corresponding to the liquid level gauge of the power transformer if the characteristic image of the liquid level gauge includes an air window but does not include a liquid window;
[0153] A second determination module 608 is configured to determine the upper threshold as the liquid level value corresponding to the liquid level gauge of the power transformer if the characteristic image of the liquid level gauge includes a liquid window but does not include an air window;
[0154] The detection generation module 609 is used to perform edge detection on the air window and the liquid window if the characteristic image of the liquid level gauge includes an air window and a liquid window, generate corresponding air window frames and liquid window frames, and generate the corresponding liquid level value of the power transformer liquid level gauge according to the air window frame, the liquid window frame, the upper threshold value of the scale and the lower threshold value of the scale.
[0155] Optionally, the detection generation module 609 may also be specifically used for:
[0156] If the characteristic image of the liquid level gauge includes an air window and a liquid window, edge detection is performed on the air window and the liquid window to generate corresponding air window rectangular frames and liquid window rectangular frames, wherein the air window rectangular frame includes an air window upper frame line and an air window lower frame line, and the liquid window rectangular frame includes a liquid window upper frame line and a liquid window lower frame line, and the air window rectangular frame and the liquid window rectangular frame have common frame lines;
[0157] Calculate the distance between the common frame line and the lower frame line of the liquid window to obtain a first distance value;
[0158] Calculate the distance between the upper frame line of the air window and the lower frame line of the liquid window to obtain a second distance value;
[0159] According to the ratio of the first distance value to the second distance value and the difference between the upper threshold value and the lower threshold value, a liquid level value corresponding to the liquid level meter of the power transformer is obtained.
[0160] Optionally, the power transformer liquid level detection device further includes:
[0161] A model generation module 610 is used to obtain a plurality of different level gauge images, wherein the level gauge image includes a power transformer level gauge;
[0162] Marking the contours of the air window and / or the liquid window corresponding to the liquid level gauge of the power transformer in each liquid level gauge image, respectively, to generate a plurality of liquid level gauge images with contour markings;
[0163] Based on multiple contour-marked level gauge images, the preset model is trained through a deep neural network to generate a level detection model.
[0164] In an embodiment of the present invention, an image of a liquid level gauge to be detected is obtained, wherein the image of the liquid level gauge includes a liquid level gauge of an electric transformer; scale detection is performed on the image of the liquid level gauge using a preset liquid level detection model to obtain a scale detection result; if the scale detection result is that no scale value exists in the image of the liquid level gauge, feature recognition is performed on the image of the liquid level gauge to obtain a feature image of the liquid level gauge, wherein the feature image of the liquid level gauge includes an air window and / or a liquid window of the liquid level gauge of the electric transformer; a liquid level value corresponding to the liquid level gauge of the electric transformer is generated according to the air window and / or the liquid window in the feature image of the liquid level gauge, thereby improving the accuracy of the liquid level detection.
[0165] above Figure 6 and Figure 7 The power transformer liquid level detection device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The power transformer liquid level detection device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0166] Figure 81 is a schematic diagram of the structure of a power transformer liquid level detection device provided by an embodiment of the present invention. The power transformer liquid level detection device 800 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 810 (for example, one or more processors) and a memory 820, and one or more storage media 830 (for example, one or more mass storage devices) storing application programs 833 or data 832. Among them, the memory 820 and the storage medium 830 can be short-term storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the power transformer liquid level detection device 800. Furthermore, the processor 810 can be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the power transformer liquid level detection device 800.
[0167] The power transformer liquid level detection device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input and output interfaces 860, and / or one or more operating systems 831, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 8 The structure of the power transformer liquid level detection device shown does not constitute a limitation on the power transformer liquid level detection device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0168] The present invention also provides a power transformer liquid level detection device, the computer device includes a memory and a processor, the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the processor executes the steps of the power transformer liquid level detection method in the above-mentioned embodiments.
[0169] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the power transformer liquid level detection method.
[0170] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0171] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0172] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting liquid level of a power transformer, characterized in that: The power transformer liquid level detection method comprises: Acquire a liquid level meter image to be detected, wherein the liquid level meter image includes a power transformer liquid level meter; Performing scale detection on the liquid level meter image through a preset liquid level detection model to obtain a scale detection result; If the scale detection result is that there is no scale value in the liquid level gauge image, feature recognition is performed on the liquid level gauge image by binarization to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge, the air window is indicated by a plurality of binary pixel points corresponding to a first preset gray value, and the liquid window is indicated by a plurality of binary pixel points corresponding to a second preset gray value; Generating a liquid level value corresponding to the power transformer liquid level gauge according to the air window and / or the liquid window in the liquid level gauge characteristic image; The step of generating a liquid level value corresponding to the power transformer liquid level gauge according to the air window and / or the liquid window in the liquid level gauge characteristic image comprises: If the characteristic image of the liquid level gauge includes an air window but does not include a liquid window, determining that the liquid level value corresponding to the power transformer liquid level gauge is zero; If the characteristic image of the liquid level gauge includes a liquid window but does not include an air window, determining the liquid level value corresponding to the power transformer liquid level gauge according to the area corresponding to the liquid window; If the characteristic image of the liquid level gauge includes an air window and a liquid window, the liquid level value corresponding to the power transformer liquid level gauge is obtained according to the ratio of the area of the liquid window to the area of the display part of the liquid level gauge.
2. The method for detecting liquid level of a power transformer according to claim 1, characterized in that: The step of performing scale detection on the liquid level meter image by using a preset liquid level detection model to obtain a scale detection result includes: Calling a preset liquid level detection model to grayscale and binarize the liquid level gauge image to obtain a binarized liquid level gauge image; Performing region of interest segmentation on the binary level gauge image to generate a corresponding region of interest image, and performing character recognition on the region of interest image to obtain a character recognition result; If the character recognition result is that the preset character does not exist in the image of the region of interest, determining the scale detection result is that the scale value does not exist in the liquid level meter image; If the character recognition result is that a preset character exists in the image of the region of interest, then the scale detection result is determined to be that a scale value exists in the liquid level meter image.
3. The method for detecting liquid level of a power transformer according to claim 1, characterized in that: If the scale detection result is that there is no scale value in the liquid level meter image, then feature recognition is performed on the liquid level meter image in a binarization manner to obtain a liquid level meter feature image, including: If the scale detection result is that there is no scale value in the liquid level meter image, pixel segmentation is performed on the liquid level meter image to obtain a plurality of binary pixel points, each of which corresponds to a grayscale value; If the grayscale value of each of the plurality of binary pixel points is equal to the first preset grayscale value, it is determined that the characteristic image of the liquid level meter includes an air window but does not include a liquid window; If the grayscale value of each of the plurality of binary pixel points is equal to the second preset grayscale value, it is determined that the characteristic image of the liquid level meter includes a liquid window but does not include an air window; If the multiple binary pixel points include a first pixel point set and a second pixel point set, it is determined that the characteristic image of the liquid level meter includes an air window and a liquid window, wherein the first pixel point set includes a plurality of binary pixel points whose grayscale values are equal to a first preset grayscale value, and the second pixel point set includes a plurality of binary pixel points whose grayscale values are equal to a second preset grayscale value, the first pixel point set corresponds to the air window, and the second pixel point set corresponds to the liquid window.
4. The method for detecting liquid level of a power transformer according to claim 1, characterized in that: If the characteristic image of the liquid level gauge includes an air window and a liquid window, then according to the ratio of the area of the liquid window to the area of the display part of the liquid level gauge, the liquid level value corresponding to the power transformer liquid level gauge is obtained, including: If the characteristic image of the liquid level gauge includes an air window and a liquid window, then obtaining a plurality of air window key point coordinates corresponding to the air window, and obtaining a plurality of liquid window key point coordinates corresponding to the liquid window; Generate corresponding liquid window areas according to the multiple liquid window key point coordinates; Generate an area of a liquid level gauge display portion in the liquid level gauge feature image according to the plurality of air window key point coordinates and the plurality of liquid window key point coordinates; The proportion of the liquid window area in the area of the display portion of the liquid level gauge is calculated to obtain the liquid level value corresponding to the power transformer liquid level gauge.
5. The method for detecting liquid level of a power transformer according to claim 1, characterized in that: After the scale detection is performed on the liquid level meter image by using the preset liquid level detection model to obtain the scale detection result, the method further includes: If the scale detection result is that there is a scale value in the liquid level gauge image, the scale value is identified on the liquid level gauge image to generate an upper scale threshold and a lower scale threshold corresponding to the power transformer liquid level gauge; Performing feature recognition on the liquid level gauge image to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge; If the characteristic image of the liquid level gauge includes an air window but does not include a liquid window, determining the lower threshold value of the scale as the liquid level value corresponding to the liquid level gauge of the power transformer; If the characteristic image of the liquid level gauge includes a liquid window but does not include an air window, determining the upper threshold value of the scale as the liquid level value corresponding to the liquid level gauge of the power transformer; If the characteristic image of the liquid level gauge includes an air window and a liquid window, edge detection is performed on the air window and the liquid window to generate corresponding air window frames and liquid window frames, and the corresponding liquid level value of the power transformer liquid level gauge is generated based on the air window frame, the liquid window frame, the upper threshold value of the scale and the lower threshold value of the scale.
6. The method for detecting liquid level of a power transformer according to claim 5, characterized in that: If the characteristic image of the liquid level gauge includes an air window and a liquid window, edge detection is performed on the air window and the liquid window to generate corresponding air window frames and liquid window frames, and a liquid level value corresponding to the power transformer liquid level gauge is generated according to the air window frame, the liquid window frame, the upper scale threshold, and the lower scale threshold, including: If the characteristic image of the liquid level gauge includes an air window and a liquid window, edge detection is performed on the air window and the liquid window to generate corresponding air window rectangular frames and liquid window rectangular frames, wherein the air window rectangular frame includes an air window upper frame line and an air window lower frame line, and the liquid window rectangular frame includes a liquid window upper frame line and a liquid window lower frame line, and the air window rectangular frame and the liquid window rectangular frame have common frame lines; Calculating the distance between the common frame line and the lower frame line of the liquid window to obtain a first distance value; Calculating the distance between the upper frame line of the air window and the lower frame line of the liquid window to obtain a second distance value; The liquid level value corresponding to the power transformer liquid level meter is obtained according to the ratio of the first distance value to the second distance value and the difference between the upper threshold value and the lower threshold value.
7. The method for detecting liquid level of a power transformer according to any one of claims 1 to 6, characterized in that: Before acquiring the image of the liquid level meter to be detected, the method further includes: Acquire a plurality of different liquid level gauge images, wherein the liquid level gauge images include a power transformer liquid level gauge; Marking the contours of the air window and / or the liquid window corresponding to the liquid level gauge of the power transformer in each liquid level gauge image, respectively, to generate a plurality of liquid level gauge images with contour markings; Based on the multiple liquid level gauge images with contour marks, a preset model is trained through a deep neural network to generate a liquid level detection model.
8. A liquid level detection device for a power transformer, characterized in that: The power transformer liquid level detection device comprises: An acquisition module, used for acquiring an image of a liquid level meter to be detected, wherein the image of the liquid level meter includes a liquid level meter of a power transformer; A detection module, used to perform scale detection on the liquid level meter image through a preset liquid level detection model to obtain a scale detection result; A first feature recognition module is used for, if the scale detection result is that there is no scale value in the liquid level gauge image, to perform feature recognition on the liquid level gauge image by a binarization method to obtain a liquid level gauge feature image, wherein the liquid level gauge feature image includes an air window and / or a liquid window of the power transformer liquid level gauge, the air window is indicated by a plurality of binarized pixel points corresponding to a first preset gray value, and the liquid window is indicated by a plurality of binarized pixel points corresponding to a second preset gray value; A liquid level value generating module, used for generating a liquid level value corresponding to the power transformer liquid level gauge according to the air window and / or the liquid window in the liquid level gauge characteristic image; The liquid level value generating module is specifically used to determine that the liquid level value corresponding to the power transformer liquid level gauge is zero if the liquid level gauge characteristic image includes an air window but does not include a liquid window; If the characteristic image of the liquid level gauge includes a liquid window but does not include an air window, determining the liquid level value corresponding to the power transformer liquid level gauge according to the area corresponding to the liquid window; If the characteristic image of the liquid level gauge includes an air window and a liquid window, the liquid level value corresponding to the power transformer liquid level gauge is obtained according to the ratio of the area of the liquid window to the area of the display part of the liquid level gauge.
9. A liquid level detection device for a power transformer, characterized in that: The power transformer liquid level detection device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the power transformer liquid level detection device to execute the power transformer liquid level detection method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the power transformer liquid level detection method as described in any one of claims 1 to 7 is implemented.
