Method, device, equipment and medium for determining liquid level gauge status

Through smart glasses, the level frame and safety mark frame in the level meter image are identified, and the image is converted into a binary image using the HSV value range, and the level meter status is automatically judged, which solves the problem that the level meter state judgment depends on manual experience, and achieves the improvement of accuracy and convenience.

CN114494919BActive Publication Date: 2025-08-26PETROCHINA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011268243.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-13
Publication Date
2025-08-26
Estimated Expiration
2040-11-13

AI Technical Summary

Technical Problem

In the prior art, the judgment of liquid level gauge status depends on manual experience, which can easily lead to misjudgment.

Method used

Through smart glasses, the liquid level frame and safety mark border in the level meter image are identified, and the liquid level meter status is automatically judged. The image is converted into a binary image using the HSV value range to determine the relationship between the liquid level frame and the safety mark border, and automatic alarm is achieved.

Benefits of technology

Automatic judgment of the liquid level gauge status is realized, misjudgment caused by insufficient experience of technicians, and improved the accuracy of judgment and the convenience of production operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494919B_ABST
    Figure CN114494919B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for determining the state of a liquid level gauge, and relates to the field of image recognition. The method includes: obtaining an image to be measured of the liquid level gauge; identifying a liquid level border and a safety mark border in the image to be measured, wherein the liquid level border is a circumscribed rectangle of the liquid level area, and the safety mark border is a circumscribed rectangle of the safety mark area; when the liquid level border and the safety mark border coincide, obtaining the highest point of the liquid level border and the highest point of the safety mark border; when the highest point of the liquid level border is lower than the highest point of the safety mark border, the state of the liquid level gauge is normal. The method of the present application relies on computer equipment to recognize the image of the liquid level gauge to determine whether the current state of the liquid level gauge is normal. It does not require manual reading of the liquid level gauge, and eliminates misjudgments caused by technicians due to unfamiliarity or lack of experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition, and in particular to a method, device, equipment and medium for determining the state of a liquid level gauge. Background Art

[0002] In industries like petroleum and chemical engineering, level gauges are used to measure the liquid level of various media in various containers. Technicians use the level gauge readings to determine whether the liquid level in the container is normal.

[0003] In the related art, manual inspection is relied upon, and technicians identify whether the level meter reading is within the normal range.

[0004] However, relevant technologies rely on the experience of technicians, but the experience of technicians varies, which can easily lead to misjudgment. Summary of the Invention

[0005] The present invention provides a method, device, apparatus, and medium for determining the status of a liquid level gauge. This method relies on smart glasses to recognize an image of the liquid level gauge to determine whether the current status of the liquid level gauge is normal. No manual reading of the liquid level gauge is required. The smart glasses confirm the status of the liquid level gauge and automatically alarm when any problems are found, eliminating misjudgments caused by technicians' unfamiliarity or lack of experience. The technical solution is as follows:

[0006] According to one aspect of the present application, a method for determining a state of a liquid level gauge is provided, the method comprising:

[0007] Acquire the image of the liquid level gauge to be measured;

[0008] Identify the liquid level border and the safety mark border in the image to be tested, where the liquid level border is the circumscribed rectangle of the liquid level area, and the safety mark border is the circumscribed rectangle of the safety mark area;

[0009] When the liquid level frame and the safety mark frame coincide, the highest point of the liquid level frame and the highest point of the safety mark frame are obtained;

[0010] When the highest point of the liquid level frame is lower than the highest point of the safety mark frame, the level gauge is in normal condition.

[0011] According to another aspect of the present application, a device for determining a state of a liquid level gauge is provided, the device comprising:

[0012] An acquisition module, used for acquiring the image to be measured of the liquid level meter;

[0013] A recognition module is used to recognize the liquid level border and the safety mark border in the image to be tested, where the liquid level border is the circumscribed rectangle of the liquid level area and the safety mark border is the circumscribed rectangle of the safety mark area;

[0014] A judgment module, configured to obtain the highest point of the liquid level frame and the highest point of the safety mark frame when the liquid level frame and the safety mark frame overlap;

[0015] The judgment module is also used to determine that the liquid level meter is in a normal state when the highest point of the liquid level frame is lower than the highest point of the safety mark frame.

[0016] Optionally, the recognition module is also used to convert the image to be measured of the liquid level meter into a liquid level binary image according to a first HSV value range, where the first HSV value range is a first preset value range of hue, saturation and brightness of the image to be measured; and determine the liquid level border based on the circumscribed rectangle of the largest contour in the liquid level binary image.

[0017] Optionally, the recognition module is also used to convert the image to be tested of the liquid level meter into a binary image of the safety mark according to a second HSV value range, where the second HSV value range is a second preset value range of hue, saturation and brightness of the image to be tested; and determine the safety mark border based on the circumscribed rectangle of the largest contour in the binary image of the safety mark.

[0018] Optionally, the recognition module is further used to obtain the circumscribed rectangle of the largest contour in the safety mark binary image; extend the width of the circumscribed rectangle of the largest contour in the safety mark binary image to a preset length; and determine the extended circumscribed rectangle as the liquid level border.

[0019] Optionally, the device further comprises:

[0020] A pre-extraction module is used to obtain a sample image group of the liquid level meter; obtain the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the safety mark area in the sample image group and the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the liquid level area in the sample image group; determine a first HSV value range based on the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the safety mark area in the sample image group; and determine a second HSV value range based on the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the liquid level area in the sample image group.

[0021] Optionally, the judgment module is further configured to determine that the state of the liquid level meter is abnormal when the liquid level frame and the safety mark frame do not overlap.

[0022] Optionally, the judgment module is further configured to determine that the state of the liquid level meter is abnormal when the liquid level frame and the safety mark frame overlap and the highest point of the liquid level frame is higher than the highest point of the safety mark frame.

[0023] According to another aspect of the present application, a computer device is provided, which includes: a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the method for determining the state of the liquid level meter as described above.

[0024] According to another aspect of the present application, a computer storage medium is provided, in which at least one program code is stored. The program code is loaded and executed by a processor to implement the method for determining the state of a liquid level meter as described above.

[0025] According to another aspect of the present application, a computer program product or computer program is provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for determining the state of a liquid level gauge as described above.

[0026] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:

[0027] After obtaining the image to be tested of the liquid level gauge, the relationship between the liquid level frame and the safety mark frame in the image to be tested is used to determine whether the liquid level gauge is in normal condition. This allows for automatic determination of the liquid level gauge status without relying on the technicians' experience, eliminating misjudgments due to unfamiliarity or lack of experience, and enabling convenient, fast, and safe production operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0029] Figure 1 is a structural diagram of a computer system provided by an exemplary embodiment of the present application;

[0030] Figure 2 is a schematic diagram of a liquid level meter provided by an exemplary embodiment of the present application;

[0031] Figure 3 is a schematic diagram of a liquid level meter provided by an exemplary embodiment of the present application;

[0032] Figure 4is a flow chart of a method for determining a liquid level gauge state provided by an exemplary embodiment of the present application;

[0033] Figure 5 is a schematic diagram of a method for determining a highest point provided by an exemplary embodiment of the present application;

[0034] Figure 6 is a flow chart of a method for determining a liquid level gauge state provided by an exemplary embodiment of the present application;

[0035] Figure 7 This is a schematic diagram of an interface for determining a liquid level frame provided by an exemplary embodiment of the present application;

[0036] Figure 8 This is a schematic diagram of an interface for determining a security identification border provided by an exemplary embodiment of the present application;

[0037] Figure 9 This is a schematic diagram of an interface for determining a security identification border provided by an exemplary embodiment of the present application;

[0038] Figure 10 is a flowchart for determining a first HSV value range and a second HSV value range provided by an exemplary embodiment of the present application;

[0039] Figure 11 is a structural diagram of a liquid level state determination device provided by an exemplary embodiment of the present application;

[0040] Figure 12 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0041] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0042] In this embodiment, the “length”, “width”, “top” and “bottom” involved are all based on the length, width, top and bottom shown in the accompanying drawings.

[0043] First, the nouns involved in the embodiments of this application are introduced:

[0044] Liquid level gauges (also known as magnetic flap level gauges) are developed based on the principles of buoyancy and magnetic coupling. For example, the indicator's flap turns from white to red as the measured liquid level rises, and from red to white as the measured liquid level falls. The intersection of the red and white indicator indicates the actual height of the liquid inside the container, providing clear indication of the liquid level.

[0045] Binary Image: An image in which each pixel has only two possible values ​​or grayscale levels. For example, a binary image is represented by a black and white image, where the grayscale value of each pixel in the image is either 0 or 255, representing black and white, respectively.

[0046] HSV (Hue Saturation Value) value: HSV refers to a color model whose parameters are hue (Hue, H), saturation (Saturation, S) and value (Value, V). HSV value refers to the values ​​of hue, saturation and value. Among them, hue represents color information, that is, the position of the color in the spectrum, expressed as an angle value, for example, red is 0°, green is 120°, and blue is 240°; saturation indicates the degree to which the color is close to the spectral color. The closer to the spectral color, the higher the saturation of the color, the deeper and brighter the color, and it is expressed as a percentage; value is used to indicate the brightness of the color, expressed as a percentage.

[0047] Figure 1 The following is a schematic diagram of a computer system according to an exemplary embodiment of the present application. The computer device 100 includes smart glasses 101 and a mobile terminal 102. The mobile terminal 102 is optional. The smart glasses 101 and the mobile terminal 102 are connected via a wired or wireless network. Figure 1 Take the computer system including smart glasses 101 and mobile terminal 102 as an example.

[0048] The smart glasses 101 install and run an application program and hardware devices with image acquisition functions. The smart glasses 101 are used by a first user.

[0049] The mobile terminal 102 has an image processing and image recognition application installed and running. The mobile terminal 102 can be used by the first user or other users, and this application does not limit this. Optionally, the smart glasses 101 performs primary computing tasks, and the mobile terminal 102 performs secondary computing tasks; or the smart glasses 101 and the mobile terminal 102 use a distributed computing architecture for collaborative computing; or the mobile terminal 102 performs primary computing tasks, and the smart glasses 101 performs secondary computing tasks. The mobile terminal 102 includes at least one of a smartphone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, and a laptop computer. Those skilled in the art will appreciate that the number of mobile terminals 102 can be greater or lesser. For example, no mobile terminal 102 may be provided, or there may be only one mobile terminal 102, or there may be dozens, hundreds, or even more mobile terminals 102. The embodiments of this application do not limit the number of mobile terminals 102.

[0050] When the computer system 100 only includes the smart glasses 101 ( Figure 1 (not shown), the smart glasses 101 will execute all or part of the functions of the mobile terminal 102.

[0051] Figure 2 and Figure 3 A schematic diagram of a liquid level gauge provided by an exemplary embodiment of the present application is shown, and the schematic diagram includes: a liquid level frame 201 , a safety mark frame 202 and a safety mark frame 203 .

[0052] Liquid level border 201 is the circumscribed rectangle of the liquid level area in the liquid level gauge. The liquid level area refers to the area corresponding to the liquid column in the liquid level gauge image. The liquid level area changes with the changes in the liquid column. The length of liquid level border 201 is the same as the height of the liquid column. This application does not specifically limit the width of liquid level border 201.

[0053] The safety identification border 202 is the circumscribed rectangle of the safety identification area in the liquid level gauge. The safety identification area refers to the area corresponding to the safety identification in the liquid level gauge image. The color of the safety identification area is different from the colors of other areas on the liquid level gauge. The safety identification area is used to assist in judging whether the status of the liquid level gauge is normal. When the highest point of the liquid column is within the safety identification area, the liquid level gauge is in normal condition; conversely, when the highest point of the liquid column is not within the safety identification area, the liquid level gauge is in abnormal condition. The safety identification border 202 is the circumscribed rectangle of the safety identification area. The length of the safety identification border 202 is the same as the length of the safety identification area. This application does not specifically limit the width of the safety identification border 202.

[0054] The safety identification border 203 is used to determine whether the liquid level of the liquid level gauge is in a normal state. The safety identification border 203 is obtained by extending the width of the safety identification border 202. Moreover, after extending the length of the liquid level border 201, the liquid level border 201 and the safety identification border 203 overlap, and the overlap can be partial or complete. The highest point of the safety identification border 203 is the same as the highest point of the safety identification border 202, and the lowest point of the safety identification border 203 is the same as the lowest point of the safety identification border 202.

[0055] Figure 4 A flow chart showing a method for determining the state of a liquid level gauge provided by an exemplary embodiment of the present application is shown. The method can be applied to Figure 1 In the computer system 100 shown, the method includes the following steps:

[0056] Step 401: Acquire an image of the liquid level meter to be measured.

[0057] The computer device acquires the image to be measured of the liquid level meter.

[0058] The image to be tested can be a real-time image or a historical image.

[0059] The method for obtaining the image to be tested can be that the computer device takes a real-time liquid level meter image, or obtains a local historical liquid level meter image by the computer device, or obtains a liquid level meter image on the network by the computer device, or the liquid level meter image is sent to the computer device by other computer devices.

[0060] Step 402 : Identify the liquid level frame and the safety mark frame in the image to be measured. The liquid level frame is the circumscribed rectangle of the liquid level area, and the safety mark frame is the circumscribed rectangle of the safety mark area.

[0061] The computer device recognizes the liquid level border and the safety mark border in the image to be measured.

[0062] The liquid level frame is the circumscribed rectangle of the liquid level area in the level gauge. The liquid level area refers to the area corresponding to the liquid column in the level gauge image. The liquid level area changes with the changes in the liquid column. The length of the liquid level frame is the same as the height of the liquid column. This application does not specifically limit the width of the liquid level frame.

[0063] The safety indicator border is used to determine whether the liquid level of the liquid level gauge is normal. The safety indicator border is obtained by extending the width of the safety indicator border. Furthermore, after extending the length of the liquid level border, the liquid level border and the safety indicator border overlap. This overlap can be partial or complete. The highest point of the safety indicator border is the same as the highest point of the safety indicator border, and the lowest point of the safety indicator border is the same as the lowest point of the safety indicator border.

[0064] Step 403: When the liquid level frame and the safety mark frame overlap, obtain the highest point of the liquid level frame and the highest point of the safety mark frame.

[0065] When the liquid level frame and the safety identification frame coincide with each other, the computer device obtains the highest point of the liquid level frame and the highest point of the safety identification frame.

[0066] The liquid level border and the safety mark border may be partially overlapped or completely overlapped.

[0067] For example, a method for obtaining the highest point of the liquid level frame and the highest point of the safety mark frame is given. Figure 5 As shown, Figure 5 A schematic diagram of a method for determining the highest point provided by an exemplary embodiment of the present application is shown. A y-axis is established on the image to be measured of the liquid level gauge, and the width of the upper side of the safety identification border 203 is extended to the y-axis to obtain intersection A. The coordinates of intersection A on the y-axis are obtained, which are the coordinates of the highest point of the safety identification border; the width of the upper side of the liquid level border 201 is extended until an intersection with the y-axis is generated. The intersection locates intersection B, and the coordinates of intersection B on the y-axis are obtained, which are the coordinates of the highest point of the liquid level border.

[0068] Step 404: When the highest point of the liquid level frame is lower than the highest point of the safety mark frame, the liquid level gauge is in normal state.

[0069] When the highest point of the liquid level frame is lower than the highest point of the safety identification frame, the computer equipment confirms that the status of the liquid level meter is normal.

[0070] When the highest point of the liquid level frame is not lower than the highest point of the safety mark frame, the level gauge is in an abnormal state.

[0071] For example, Figure 5 As shown, after obtaining the coordinates of intersection point A on the y-axis and intersection point B on the y-axis, the coordinates of the two are compared. When the coordinate value of intersection point A is greater than the coordinate value of intersection point B, the level gauge is in normal condition.

[0072] The normal status of the liquid level gauge means that the reading of the liquid level gauge is within the normal range, that is, the liquid column of the liquid level gauge is within the safety identification area.

[0073] To sum up, after obtaining the image to be tested of the liquid level gauge, this embodiment determines whether the status of the liquid level gauge is normal based on the relationship between the liquid level border and the safety mark border in the image to be tested. This can realize automatic judgment of the status of the liquid level gauge without relying on the experience of technical personnel, eliminates misjudgment caused by technical personnel's unfamiliarity or lack of experience, and realizes convenient, fast and safe production operation.

[0074] In the previous embodiment, a method is described to determine whether the liquid level meter is in a normal state by using the image to be tested of the liquid level meter. Figure 6 A flow chart of a method for determining a liquid level gauge state provided by an exemplary embodiment of the present application is shown. Figure 1 The computer system 100 shown in FIG. 1 is executed, and the method includes the following steps:

[0075] Step 601: Acquire an image of the liquid level meter to be measured.

[0076] The computer device acquires the image to be measured of the liquid level meter.

[0077] The image to be tested can be a real-time image or a historical image.

[0078] The image to be measured can be obtained by taking a real-time liquid level meter image by a computer device, or by obtaining a local historical liquid level meter image by the computer device, or by obtaining a liquid level meter image on the network by the computer device, or by a liquid level meter image sent to the computer device by other computer devices.

[0079] Step 602 : converting the image to be measured of the liquid level meter into a liquid level binary image according to the first HSV value range.

[0080] The computer device converts the image to be measured of the liquid level meter into a liquid level binary image according to the first HSV value range.

[0081] A binary liquid level image displays the liquid level area in one color and other areas in another color. This image is used to determine the liquid level border.

[0082] The first HSV value range is the HSV value range of the liquid level area.

[0083] When a pixel point of the image to be tested belongs to the first HSV value range, the grayscale of the pixel point is set to the first grayscale value; conversely, when the pixel point of the image to be tested does not belong to the first HSV value range, the grayscale of the pixel point is set to the second grayscale value. The values ​​of the first grayscale value and the second grayscale value are different. The first HSV value range can be divided into a hue value range, a saturation value range and a brightness value range. When the hue of the pixel point of the image to be tested belongs to the aforementioned hue value range and the saturation of the pixel point belongs to the aforementioned saturation value range and the brightness of the pixel point belongs to the aforementioned brightness value range, the grayscale of the pixel point is set to the first grayscale value; otherwise, the grayscale of the pixel point is set to the second grayscale value. In this application, the specific values ​​of the first grayscale value and the second grayscale value are not limited.

[0084] For example, when the liquid level area is red, the first HSV value range can be decomposed into a hue range of 0° to 10°, a saturation range of 0% to 10%, and a lightness range of 90% to 100%. When a pixel has a hue of 5°, a saturation of 5%, and a lightness of 93%, the grayscale of that pixel is set to a first grayscale value of 255. When another pixel has a hue of 15°, a saturation of 9%, and a lightness of 91%, the grayscale of that pixel is set to a second grayscale value of 0.

[0085] Figure 7 The following is a schematic diagram of an interface for determining a liquid level frame provided by an exemplary embodiment of the present application (the black box outside the image to be measured in the figure is used to highlight the image content, and there is no black box in actual operation). Figure 7 In the embodiment, the image to be measured 701 is converted into a liquid level binary image 702 . In the liquid level binary image 702 , the maximum contour 703 can be considered as the liquid level area.

[0086] Step 603: Determine the liquid level border based on the circumscribed rectangle of the largest contour in the liquid level binary image.

[0087] exist Figure 7In the figure, the maximum contour 703 can be considered as the liquid level area. After determining the maximum contour 703, a circumscribed rectangle of the maximum contour 703 is drawn, and the circumscribed rectangle is used as the liquid level border 704. The circumscribed rectangle of the maximum contour 703 is the minimum area circumscribed rectangle. It is worth noting that after extending the width of the aforementioned minimum circumscribed rectangle by a certain length, the resulting rectangle can also be used as the liquid level border 704. That is, this application does not specifically limit the width of the liquid level border 704.

[0088] Step 604 : Convert the image to be measured of the liquid level gauge into a binary image of the safety mark according to the second HSV value range.

[0089] The computer device converts the image to be measured of the liquid level meter into a binary image of the safety mark according to the second HSV value range.

[0090] A binary safety mark image displays the safety mark area in one color and the rest of the area in another color. The binary liquid level image is used to define the mark border. The color of the safety mark area is determined by the liquid level gauge's safety mark area. Typically, the safety mark area is green. This application does not specify the color of the safety mark area.

[0091] The second HSV value range is the HSV value range of the security identification area.

[0092] When a pixel point of the image to be tested belongs to the second HSV value range, the grayscale of the pixel point is set to the third grayscale value; conversely, when the pixel point of the image to be tested does not belong to the second HSV value range, the grayscale of the pixel point is set to the fourth grayscale value. The values ​​of the third grayscale value and the fourth grayscale value are different. The second HSV value range can be divided into a hue value range, a saturation value range and a brightness value range. When the hue of the pixel point of the image to be tested belongs to the aforementioned hue value range and the saturation of the pixel point belongs to the aforementioned saturation value range and the brightness of the pixel point belongs to the aforementioned brightness value range, the grayscale of the pixel point is set to the third grayscale value; otherwise, the grayscale of the pixel point is set to the fourth grayscale value. The specific values ​​of the third grayscale value and the fourth grayscale value are not limited in this application.

[0093] For example, when the safety mark area is green, the second HSV value range can be decomposed into a hue value range of 110° to 130°, a saturation value range of 0% to 9%, and a lightness value range of 95% to 100%. When the hue of a pixel is 112°, the saturation is 5%, and the lightness is 98%, the grayscale of the pixel is set to the first grayscale value of 255; when the hue of another pixel is 113°, the saturation is 11%, and the lightness is 97%, the grayscale of the pixel is set to the second grayscale value of 0.

[0094] Figure 8 The following is a schematic diagram of an interface for determining a safety mark frame provided by an exemplary embodiment of the present application (the black box outside the image to be tested in the figure is used to highlight the image content, and there is no black box in actual operation). Figure 8 In the embodiment, the image to be tested 801 is converted into a binary image 802 of a safety mark. In the binary image 802 of the safety mark, the largest contour 803 can be considered as the safety mark area.

[0095] Step 605: Obtain the bounding rectangle of the largest outline in the binary image of the security mark.

[0096] The computer device obtains the bounding rectangle of the largest contour in the binary image of the security mark. The bounding rectangle here refers to the minimum area bounding rectangle of the largest contour in the binary image of the security mark.

[0097] Step 606: Extend the width of the circumscribed rectangle of the largest outline in the binary image of the security mark to a preset length.

[0098] The computer device extends the width of the circumscribed rectangle of the largest contour in the binary image of the security mark to a preset length.

[0099] The preset length is set by the technician. For example, the preset length can be twice the width of the safety mark area, or three times the width of the safety mark area.

[0100] Please refer to the attached Figure 8 ,exist Figure 8 In the example, the maximum outline 803 can be considered as the safety mark area. After determining the maximum outline 803, a circumscribed rectangle of the maximum outline 803 is drawn, and the width of the circumscribed rectangle is extended to a predetermined length to obtain a safety mark frame 804. The circumscribed rectangle of the maximum outline 803 is the minimum area circumscribed rectangle.

[0101] It is worth noting that in step 605 to step 606, the safety mark border 804 is obtained by extending the width of the circumscribed rectangle of the largest contour in the safety mark binary image. The safety mark border 804 must meet the following conditions: in the same detection image, the length of the liquid level border is extended to both sides, and there is an overlap between the extended liquid level border and the safety mark border. The overlap can be partial or complete. Please refer to Figure 9 , Figure 8 A schematic diagram of an interface for determining a security identification border provided by an exemplary embodiment of the present application is shown. Figure 9 In the figure, the extended liquid level border 902 has an overlapping portion with the safety identification border 901, so the safety identification border 901 is a safety identification border that meets the requirements; and the extended liquid level border 904 has no overlapping portion with the safety identification border 903, so the safety identification border 904 is a safety identification border that does not meet the requirements.

[0102] Step 607: Determine the extended circumscribed rectangle as the liquid level border.

[0103] The computer device determines the extended circumscribed rectangle as the liquid level border.

[0104] Step 608: Determine whether the liquid level border overlaps with the safety mark border.

[0105] If the liquid level frame and the safety mark frame overlap, step 609 is executed; if the liquid level frame and the safety mark frame do not overlap, step 611 is executed.

[0106] Step 609 , determining whether the highest point of the liquid level frame is lower than the highest point of the safety mark frame.

[0107] If the highest point of the liquid level frame is lower than the highest point of the safety mark frame, execute step 610;

[0108] If the highest point of the liquid level frame is not lower than the highest point of the safety mark frame, step 611 is executed.

[0109] The computer device determines whether the highest point of the liquid level frame is lower than the highest point of the safety mark frame.

[0110] The judgment here can refer to step 403 to step 404, which will not be repeated here.

[0111] Step 610: The liquid level meter is in normal state.

[0112] The computer device determines that the liquid level meter is in a normal state. At this point, the computer system continues to operate without issuing an alarm. In another specific embodiment, the computer system will issue a message indicating that the liquid level meter is in a normal state, for example, by emitting a "normal" sound effect or a "normal" text message.

[0113] Step 611: The liquid level meter is in an abnormal state and an alarm is issued.

[0114] The computer device determines that the liquid level gauge is abnormal and issues an alarm. The alarm can be issued by the first mobile device 101 or the second mobile device 102 in the computer system 100. The alarm can be in the form of at least one of sound, text, and image, and this application does not specifically limit the alarm form.

[0115] In summary, after acquiring an image of the liquid level gauge to be tested, this embodiment determines whether the liquid level gauge is in a normal state based on the relationship between the liquid level border and the safety mark border in the image to be tested. This allows for automatic determination of the liquid level gauge's state without relying on the technician's experience, eliminating misjudgments due to unfamiliarity or lack of experience, and enabling convenient, fast, and safe production operations. Furthermore, this embodiment uses binary images to acquire the liquid level border and safety mark border, resulting in more accurate liquid level borders and safety mark borders, improving the accuracy of the results.

[0116] The previous embodiment introduces a method for determining whether the liquid level meter is in a normal state by using the image to be tested of the liquid level meter. Next, the process of obtaining the first HSV value range and the second HSV value range is introduced. Figure 10 A flowchart of determining a first HSV value range and a second HSV value range provided by an exemplary embodiment of the present application is shown. The method is as follows: Figure 1 The computer system 100 shown in FIG. 1 is executed, and the method includes the following steps:

[0117] Step 1001: Acquire a sample image group of a liquid level meter.

[0118] The computer device obtains a sample image group of the liquid level gauge.

[0119] The sample image group includes multiple images of liquid level gauges.

[0120] The liquid level gauge image in the sample image group may be a real-time image or a historical image.

[0121] The method for obtaining the liquid level gauge image in the sample image group can be that the computer device takes a real-time liquid level gauge image, or the computer device obtains a local historical liquid level gauge image, or the computer device obtains a liquid level gauge image on the network, or the liquid level gauge image is sent to the computer device by other computer devices.

[0122] Step 1002 : Obtain the maximum average threshold and minimum average threshold of hue, saturation, and brightness of the safety mark area in the sample image group and the maximum average threshold and minimum average threshold of hue, saturation, and brightness of the liquid level area in the sample image group.

[0123] The computer device obtains the maximum average threshold and the minimum average threshold of the hue, saturation and brightness of the safety mark area in the sample image group and the maximum average threshold and the minimum average threshold of the hue, saturation and brightness of the liquid level area in the sample image group.

[0124] Obtain the maximum and minimum thresholds for the hue, saturation, and brightness of the safety marking area in each level gauge image in the sample image set. Take the average of the maximum thresholds and the average of the minimum thresholds for hue, saturation, and brightness. Taking hue as an example, the hues of the safety marking area in all level gauge images in the sample image set are [120°, 125°], [122°, 126°], [121°, 125°], [120°, 125°], [121°, 126°]. Therefore, the minimum threshold is {120°, 122°, 121°, 120°, 121°}, and the maximum threshold is {125°, 126°, 125°, 125°, 126°}. Taking the average of the minimum thresholds yields a minimum average threshold of 120.8°, and taking the average of the maximum thresholds yields a maximum average threshold of 125.4°.

[0125] Obtain the maximum and minimum thresholds for the hue, saturation, and lightness of the liquid level region in each liquid level gauge image in the sample image set. Take the average of the maximum thresholds and the average of the minimum thresholds for hue, saturation, and lightness. Taking hue as an example, the hues of the liquid level region in all liquid level gauge images in the sample image set are [0°, 5°], [2°, 6°], [1°, 5°], [0°, 5°], [1°, 6°]. Therefore, the minimum threshold is {0°, 2°, 1°, 0°, 1°}, and the maximum threshold is {5°, 6°, 5°, 5°, 6°}. Taking the average of the minimum thresholds yields a minimum average threshold of 0.8°, and taking the average of the maximum thresholds yields a maximum average threshold of 5.4°.

[0126] Step 1003 : determining a first HSV value range based on the maximum average threshold and the minimum average threshold of the hue, saturation, and brightness of the security mark area in the sample image group.

[0127] The computer device determines a first HSV value range according to a maximum average threshold and a minimum average threshold of hue, saturation, and brightness of the security mark area in the sample image group.

[0128] For example, the maximum average threshold of the hue of the safety mark area is 125.9°, and the minimum average threshold is 116.8°; the maximum average threshold of the saturation of the safety mark area is 12.6%, and the minimum average threshold is 1.4%; the maximum average threshold of the brightness of the safety mark area is 99.5%, and the minimum average threshold is 83.6%. Then the first HSV value range can be set to {(116.8°, 125.9°), (1.4%, 12.6%), (83.6%, 99.5%)} This application does not limit the form of the first HSV value range.

[0129] Step 1004 : determining a second HSV value range based on the maximum average threshold and the minimum average threshold of the hue, saturation, and brightness of the liquid level region in the sample image group.

[0130] The computer device determines a second HSV value range according to a maximum average threshold and a minimum average threshold of hue, saturation, and brightness of the liquid level area in the sample image group.

[0131] For example, the maximum average threshold of the hue of the liquid level area is 5.4°, and the minimum average threshold is 0.3°; the maximum average threshold of the saturation of the liquid level area is 14.6%, and the minimum average threshold is 1.2%; the maximum average threshold of the brightness of the liquid level area is 98.8%, and the minimum average threshold is 93.6%. Then the second HSV value range can be set to {(0.3°, 5.4°), (1.2%, 14.6%), (93.6%, 98.8%)}. This application does not limit the form of the first HSV value range.

[0132] In summary, this embodiment obtains the first HSV value range and the second HSV value range through the sample image group. Since the sample image group is used, the result is more consistent with the actual situation, and the first HSV value range and the second HSV value that fit the actual situation can be obtained.

[0133] The following is an embodiment of the device of the present application. For details not described in detail in the embodiment of the device, reference can be made to the corresponding records in the above method embodiment, and no further details will be given herein.

[0134] Figure 11 A schematic diagram of a liquid level state determination device provided by an exemplary embodiment of the present application is shown. The device can be implemented as all or part of a computer device through software, hardware, or a combination of both. The device 1100 includes:

[0135] An acquisition module 1101 is used to acquire an image to be measured of the liquid level gauge;

[0136] Identification module 1102, used to identify the liquid level frame and the safety mark frame in the image to be measured, where the liquid level frame is the circumscribed rectangle of the liquid level area, and the safety mark frame is the circumscribed rectangle of the safety mark area;

[0137] The judgment module 1103 is used to obtain the highest point of the liquid level frame and the highest point of the safety mark frame when the liquid level frame and the safety mark frame overlap;

[0138] The judgment module 1103 is further configured to determine that the liquid level gauge is in a normal state when the highest point of the liquid level frame is lower than the highest point of the safety mark frame.

[0139] Optionally, the recognition module 1102 is also used to convert the image to be measured of the liquid level meter into a liquid level binary image according to a first HSV value range, where the first HSV value range is a first preset value range of hue, saturation and brightness of the image to be measured; and determine the liquid level border based on the circumscribed rectangle of the maximum contour in the liquid level binary image.

[0140] Optionally, the recognition module 1102 is also used to convert the image to be measured of the liquid level meter into a binary image of the safety mark according to a second HSV value range, where the second HSV value range is a second preset value range of hue, saturation and brightness of the image to be measured; and determine the safety mark border based on the circumscribed rectangle of the largest contour in the binary image of the safety mark.

[0141] Optionally, the recognition module 1102 is further configured to obtain a circumscribed rectangle of the largest contour in the binary image of the safety mark; extend the width of the circumscribed rectangle of the largest contour in the binary image of the safety mark to a preset length; and determine the extended circumscribed rectangle as the liquid level border.

[0142] Optionally, the apparatus 1100 further includes:

[0143] The pre-extraction module 1104 is used to obtain a sample image group of the liquid level meter; obtain the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the safety mark area in the sample image group and the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the liquid level area in the sample image group; determine a first HSV value range based on the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the safety mark area in the sample image group; determine a second HSV value range based on the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the liquid level area in the sample image group.

[0144] Optionally, the judgment module 1103 is further configured to determine that the state of the liquid level meter is abnormal when the liquid level frame and the safety mark frame do not overlap.

[0145] Optionally, the judgment module 1103 is further configured to determine that the liquid level gauge is in an abnormal state when the liquid level frame and the safety mark frame overlap and the highest point of the liquid level frame is higher than the highest point of the safety mark frame.

[0146] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:

[0147] After obtaining the image to be tested of the liquid level gauge, the relationship between the liquid level frame and the safety mark frame in the image to be tested is used to determine whether the liquid level gauge is in normal condition. This allows for automatic determination of the liquid level gauge status without relying on the technicians' experience, eliminating misjudgments due to unfamiliarity or lack of experience, and enabling convenient, fast, and safe production operations.

[0148] Figure 12 1 is a schematic diagram of the structure of a computer device provided by one embodiment of the present application. Specifically, the computer device 1200 includes a central processing unit (CPU) 1201, a system memory 1204 including a random access memory (RAM) 1202 and a read-only memory (ROM) 1203, and a system bus 1205 connecting the system memory 1204 and the CPU 1201. The computer device 1200 also includes a basic input / output system (I / O system) 1206 that helps transfer information between various components within the computer, and a mass storage device 1207 for storing an operating system 1213, application programs 1214, and other program modules 1215.

[0149] The basic input / output system 1206 includes a display 1208 for displaying information and an input device 1209, such as a mouse and keyboard, for user input. Both the display 1208 and the input device 1209 are connected to the central processing unit 1201 via an input / output controller 1210 connected to the system bus 1205. The basic input / output system 1206 may also include an input / output controller 1210 for receiving and processing input from a variety of other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1210 also provides output to a display screen, printer, or other types of output devices.

[0150] The mass storage device 1207 is connected to the central processing unit 1201 via a mass storage controller (not shown) connected to the system bus 1205. The mass storage device 1207 and its associated computer-readable media provide non-volatile storage for the computer device 1200. In other words, the mass storage device 1207 may include computer-readable media (not shown) such as a hard disk or a CD-ROM drive.

[0151] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, tape cassettes, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above-mentioned types. The above-mentioned system memory 1204 and mass storage device 1207 can be collectively referred to as memory.

[0152] According to various embodiments of the present application, the computer device 1200 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1200 may be connected to the network 1212 via the network interface unit 1211 connected to the system bus 1205, or the network interface unit 1211 may be used to connect to other types of networks or remote computer systems (not shown).

[0153] According to another aspect of the present application, a computer storage medium is provided. The computer-readable storage medium stores at least one program code. The program code is loaded and executed by a processor to implement the method for determining the state of the liquid level meter as described above.

[0154] According to another aspect of the present application, a computer program product or computer program is provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the method for determining the state of a liquid level gauge as described above.

[0155] It should be understood that the term "plurality" used herein refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0156] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0157] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for determining the state of a liquid level gauge, characterized in that: The method comprises: Acquire the image of the liquid level gauge to be measured; Identify a liquid level border and a safety mark border in the image to be tested, where the liquid level border is a circumscribed rectangle of the liquid level area, and the safety mark border is a circumscribed rectangle of the safety mark area; wherein the safety mark border satisfies the following conditions: in the same test image, when the length of the liquid level border is extended in both directions, there is an overlapping portion between the extended liquid level border and the safety mark border, and the overlapping portion is either partially or completely overlapping; When the liquid level frame and the safety mark frame overlap, obtaining the highest point of the liquid level frame and the highest point of the safety mark frame; When the highest point of the liquid level frame is lower than the highest point of the safety mark frame, the liquid level gauge is in normal condition; when the liquid level frame and the safety mark frame overlap and the highest point of the liquid level frame is higher than the highest point of the safety mark frame, the liquid level gauge is in abnormal condition; when the liquid level frame and the safety mark frame do not overlap, the liquid level gauge is in abnormal condition and issues an alarm; The identifying of the safety mark border in the image to be tested includes: converting the image to be tested of the liquid level gauge into a safety mark binary image according to a second HSV value range, wherein the second HSV value range is a second preset value range of hue, saturation, and lightness of the image to be tested, and the second HSV value range is a value range of HSV values ​​of the safety mark area; obtaining a circumscribed rectangle of the maximum contour in the safety mark binary image; and extending the width of the circumscribed rectangle of the maximum contour in the safety mark binary image to a preset length to obtain the safety mark border; The identifying of the liquid level border in the image to be measured includes: converting the image to be measured of the liquid level gauge into a liquid level binary image according to a first HSV value range, and determining the liquid level border according to a circumscribed rectangle of a maximum contour in the liquid level binary image; the first HSV value range being a first preset value range of hue, saturation, and lightness of the image to be measured; The first HSV value range and the second HSV value range are obtained by the following method: obtaining a sample image group of the liquid level meter; obtaining the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the safety mark area in the sample image group and the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the liquid level area in the sample image group; determining the first HSV value range based on the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the safety mark area in the sample image group; determining the second HSV value range based on the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the liquid level area in the sample image group.

2. A device for determining whether a level gauge reading is normal, characterized in that: The device is applied to the method according to claim 1, and the device comprises: An acquisition module, used for acquiring the image to be measured of the liquid level meter; an identification module, configured to identify a liquid level border and a safety mark border in the image to be tested, wherein the liquid level border is a circumscribed rectangle of the liquid level area, and the safety mark border is a circumscribed rectangle of the safety mark area; wherein the safety mark border satisfies the following conditions: in the same test image, when the length of the liquid level border is extended in both directions, there is an overlapping portion between the extended liquid level border and the safety mark border, and the overlapping portion is either partially or completely overlapping; A judgment module, configured to obtain the highest point of the liquid level frame and the highest point of the safety mark frame when the liquid level frame and the safety mark frame overlap; The judgment module is further configured to determine that the liquid level gauge is in a normal state when the highest point of the liquid level frame is lower than the highest point of the safety mark frame; The recognition module is configured to convert the image to be measured of the liquid level gauge into a binary image of the safety mark according to a second HSV value range, where the second HSV value range is a second preset value range of hue, saturation, and lightness of the image to be measured, and the second HSV value range is a value range of HSV values ​​of the safety mark area; and according to a circumscribed rectangle of the maximum contour in the binary image of the safety mark, extend the width of the circumscribed rectangle of the maximum contour in the binary image of the safety mark to a preset length to obtain the safety mark frame; The recognition module is configured to convert the image to be measured of the liquid level gauge into a liquid level binary image according to a first HSV value range, and determine the liquid level frame according to a circumscribed rectangle of the largest contour in the liquid level binary image; the first HSV value range being a first preset value range of hue, saturation, and lightness of the image to be measured; The first HSV value range and the second HSV value range are obtained by the following method: obtaining a sample image group of the liquid level meter; obtaining the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the safety mark area in the sample image group and the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the liquid level area in the sample image group; determining the first HSV value range based on the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the safety mark area in the sample image group; determining the second HSV value range based on the maximum average threshold and minimum average threshold of the hue, saturation, and brightness of the liquid level area in the sample image group.

3. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the method for determining the state of the liquid level gauge as described in claim 1.

4. The computer device according to claim 3, wherein: The computer device includes smart glasses and a mobile terminal, and the smart glasses and the mobile terminal are connected via a wired data cable or a wireless network; or, The computer device includes the smart glasses.

5. A computer-readable storage medium, characterized in that At least one program code is stored in the computer-readable storage medium, and the program code is loaded and executed by the processor to implement the method for determining the state of the liquid level meter according to claim 1.

Citation Information

Patent Citations

  • Dust removing fan and water system control method used for dust removing fan

    CN102606188A

  • Steam drum liquid level anomaly identification method and system based on image identification

    CN111311580A