CN115100654A - Water level identification method and device based on computer vision algorithm - Google Patents

Water level identification method and device based on computer vision algorithm Download PDF

Info

Publication number
CN115100654A
CN115100654A CN202210710152.5A CN202210710152A CN115100654A CN 115100654 A CN115100654 A CN 115100654A CN 202210710152 A CN202210710152 A CN 202210710152A CN 115100654 A CN115100654 A CN 115100654A
Authority
CN
China
Prior art keywords
water level
water
scale reading
water gauge
ordinate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210710152.5A
Other languages
Chinese (zh)
Inventor
梁辉
刘志
龚大立
常浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingying Digital Technology Co Ltd
Original Assignee
Jingying Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingying Digital Technology Co Ltd filed Critical Jingying Digital Technology Co Ltd
Priority to CN202210710152.5A priority Critical patent/CN115100654A/en
Publication of CN115100654A publication Critical patent/CN115100654A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/1444Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
    • G06V30/1448Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields based on markings or identifiers characterising the document or the area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/02Recognising information on displays, dials, clocks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Measurement Of Levels Of Liquids Or Fluent Solid Materials (AREA)

Abstract

The invention relates to a water level identification method and a water level identification device based on a computer vision algorithm. According to the scheme provided by the invention, the image of the water gauge region of the reservoir is acquired through the existing camera, the key information characteristic of the water gauge, namely the water gauge scale is extracted through a target recognition algorithm, and an algorithm aiming at the current water level actual value is set by combining the geometric position relation between the water gauge scale and the water surface, so that real-time and efficient judgment is realized. Compared with common manual monitoring, a large amount of manpower is saved, and real-time monitoring is guaranteed. And the algorithm only needs to install a camera on the spot and deploy a server. The method has the advantages of reducing management complexity, having certain pertinence in judging water, liquid or irregular and fluid objects, high identification accuracy, strong generalization capability and the like.

Description

Water level identification method and device based on computer vision algorithm
Technical Field
The invention relates to the technical field of computer vision, in particular to a water level identification method and device based on a computer vision algorithm.
Background
The reservoir water level changes at any time under the influence of factors such as climate and environment, and the water level exceeds the maximum upper limit at a certain moment possibly.
The current water level identification mode is generally more traditional, such as manual observation or detection by using a sensor, but the mode is too large in consumption of manpower and financial resources and often interfered by various factors, so that the current water level cannot be accurately judged, and because the water level is changed in real time, the state is reduced due to long-time repeated work in the manual monitoring process, and the problem cannot be found in time.
Disclosure of Invention
In order to overcome the problems in the related art, the invention provides a water level identification method and a water level identification device based on a computer vision algorithm, which can detect the height of the current water level in real time.
According to a first aspect of the embodiments of the present invention, there is provided a water level identification method based on a computer vision algorithm, including:
collecting an image of a reservoir water gauge area;
extracting the scale of the water gauge in the image by using a target recognition algorithm;
and obtaining the water level according to the position relation between the water gauge scale and the water surface.
Further, the extracting of the water gauge scale in the image by using the target recognition algorithm specifically includes:
extracting a first identification frame of the whole water gauge, a second identification frame of a main scale of the water gauge, a third identification frame of a secondary scale of the water gauge and numbers in the image by using a target identification algorithm;
extracting the number in the first recognition box;
obtaining a main scale reading of the water gauge according to the numbers in the range of the second identification frame;
and obtaining the secondary scale reading of the water gauge according to the numbers in the range of the third identification frame.
Further, according to the position relation of water gauge scale and the surface of water, obtain the water level, specifically include:
selecting the main scale reading with the minimum vertical coordinate as a reference main scale reading m;
selecting the secondary scale reading with the minimum ordinate as a reference secondary scale reading n;
if the ordinate of the reference secondary scale reading is smaller than the reference main scale reading, the height of the water level is m-1+ n/10;
and if the ordinate of the reference secondary scale reading is greater than or equal to the reference main scale reading, the height of the water level is m + n/10.
Further, according to the position relation of water gauge scale and surface of water, obtain the water level, specifically still include:
extracting all contours in the range of the abscissa of the first recognition frame, and selecting the lowest contour as a horizontal plane;
obtaining a correction distance according to the pixel distance between the lower edge ordinate of the third identification frame with the smallest ordinate and the ordinate of the horizontal plane and the ratio of the pixel distance to the actual distance;
and subtracting the correction distance from the water level height to obtain the actual water level height.
According to a second aspect of an embodiment of the present invention, there is provided a water level identification apparatus based on computer vision algorithm, comprising:
the image acquisition module is used for acquiring an image of a reservoir water gauge area;
the scale extraction module is used for extracting the scale of the water gauge in the image by using a target recognition algorithm;
and the water level judging module is used for obtaining the water level according to the position relation between the water gauge scale and the water surface.
Further, the scale extraction module specifically includes:
the target identification unit is used for extracting a first identification frame of the whole water gauge, a second identification frame of the main scale of the water gauge, a third identification frame of the secondary scale of the water gauge and numbers in the image by using a target identification algorithm;
a number extraction unit for extracting the number in the first recognition frame;
the main scale reading extraction unit is used for obtaining the main scale reading of the water gauge according to the numbers in the range of the second identification frame;
and the secondary scale reading extraction unit is used for obtaining the secondary scale reading of the water gauge according to the number in the range of the third identification frame.
Further, the water level determination module specifically includes:
the reference main scale reading determining unit is used for selecting the main scale reading with the minimum vertical coordinate as a reference main scale reading m;
the reference secondary scale reading determining unit is used for selecting the secondary scale reading with the minimum vertical coordinate as a reference secondary scale reading n;
the water level height judging unit is used for judging that the height of the water level is m-1+ n/10 if the vertical coordinate of the reference secondary scale reading is smaller than the reference main scale reading; and
and if the ordinate of the reference secondary scale reading is greater than or equal to the reference main scale reading, the height of the water level is m + n/10.
Further, the water level determination module specifically further includes:
a horizontal plane determining unit, configured to extract all contours within the range of the abscissa of the first recognition frame, and select a lowest contour among the contours as a horizontal plane;
the correction distance calculation unit is used for obtaining a correction distance according to the pixel distance between the lower edge ordinate of the third identification frame with the smallest ordinate and the ordinate of the horizontal plane and the ratio of the pixel distance to the actual distance;
and the actual water level calculating unit is used for subtracting the correction distance from the water level height to obtain the actual water level height.
According to a third aspect of the embodiments of the present invention, there is provided a terminal device, including:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method as described above.
According to a fourth aspect of embodiments of the present invention, there is provided a non-transitory machine-readable storage medium having stored thereon executable code, which when executed by a processor of an electronic device, causes the processor to perform the method as described above.
The technical scheme provided by the embodiment of the invention can have the following beneficial effects:
the method comprises the steps of collecting an image of a reservoir water gauge region through an existing camera, extracting key information features of the water gauge, namely water gauge scales through a target recognition algorithm, setting an algorithm aiming at a current water level actual value by combining the geometric position relation between the water gauge scales and a water surface, and achieving real-time and efficient judgment. Compared with common manual monitoring, a large amount of manpower is saved, and real-time monitoring is guaranteed. And the algorithm only needs to install a camera on the spot and deploy a server. The method has the advantages of reducing management complexity, having certain pertinence in judging water, liquid or irregular and fluid objects, high identification accuracy, strong generalization capability and the like.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing in more detail exemplary embodiments thereof with reference to the attached drawings, in which like reference numerals generally represent like parts throughout.
FIG. 1 is a schematic flow diagram illustrating a computer vision algorithm based water level identification method according to an exemplary embodiment of the present invention;
FIG. 2 is the framework of the yolov3 algorithm;
FIG. 3 is a schematic illustration of the identification of a water gauge scale using the yolov3 algorithm;
FIG. 4 is a block diagram illustrating a structure of a water level recognition apparatus based on a computer vision algorithm according to an exemplary embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating the structure of a computing device in accordance with an exemplary embodiment of the present invention.
Detailed Description
Preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. While the preferred embodiments of the present invention have been illustrated in the accompanying drawings, it is to be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that, although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present invention. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The hardware equipment related to the invention comprises a camera, a GPU server and the like, wherein the camera can select the existing network camera in the mine to be responsible for image acquisition. And the GPU service completes algorithm reasoning and is placed in a field machine room. The technical solutions of the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a water level recognition method based on a computer vision algorithm according to an exemplary embodiment of the present invention.
Referring to fig. 1, the method includes:
110. collecting an image of a reservoir water gauge area;
specifically, the camera is installed opposite the water gauge to guarantee to see the boundary of the surface of water on the water gauge, can guarantee to detect in whole journey when the water level rises or descends.
120. Extracting water gauge scales in the image by using a target recognition algorithm;
specifically, the target recognition algorithm can be implemented by using an existing algorithm, in this embodiment, taking yolov3 as an example, a frame structure of the algorithm is as shown in fig. 2, and based on a trained yolov3 model, the category, the number, the spatial position, and the size of the target in the video image can be acquired.
In this embodiment, the water gauge scale in the image can be extracted by using a target recognition algorithm, as shown in fig. 3, the water gauge scale on the water gauge includes a left secondary scale and a right primary scale, and in this step, a reading of the secondary scale and a reading of the primary scale in the water gauge scale need to be extracted respectively.
Optionally, in this embodiment, step 120 specifically includes:
1201. extracting a first identification frame of the whole water gauge, a second identification frame of a main scale of the water gauge, a third identification frame of a secondary scale of the water gauge and numbers in the image by using a target identification algorithm;
1202. extracting the number in the first recognition box;
specifically, according to the coordinate range of the first recognition box, the numbers of all the coordinates in the range can be obtained, and in addition, all the information with the confidence degree lower than a certain threshold (for example, 60%) can be filtered.
1203. Obtaining a main scale reading of the water gauge according to the numbers in the range of the second identification frame;
specifically, if the main scale comprises more than two digits, the digits in the second identification frame range of the main scale area of the water gauge are arranged according to the once increasing of the abscissa, so that the reading of the main scale of the water gauge is obtained.
In addition, in order to avoid error identification, parameters of upper and lower limits of the water level can be manually set, and if the identified main scale reading is not within the range of the upper and lower limits of the water level, filtering is performed.
1204. And obtaining the secondary scale reading of the water gauge according to the numbers in the range of the third identification frame.
In particular, the reading of the secondary scale generally has only one digit, so that the recognized digit can be directly used as the reading of the water scale secondary scale.
130. And obtaining the water level according to the position relation between the water gauge scale and the water surface.
Optionally, in this embodiment, step 130 specifically includes:
1301. selecting the main scale reading with the minimum vertical coordinate as a reference main scale reading m;
1302. selecting the secondary scale reading with the minimum ordinate as a reference secondary scale reading n;
1303. if the ordinate of the reference secondary scale reading is smaller than the reference main scale reading, the height of the water level is m-1+ n/10; and if the ordinate of the reference secondary scale reading is greater than or equal to the reference main scale reading, the height of the water level is m + n/10.
Specifically, as shown in fig. 3, the primary scale reading with the smallest ordinate is 22(21 is not successfully identified due to being blocked by the water surface), that is, the primary reference scale reading is 22m, the secondary scale reading with the smallest ordinate is 1, that is, the secondary reference scale reading is 1dm, and the ordinate of 1 is less than 22, so that the water level height is 22-1+1/10 is 21.1 m.
In the foregoing solution, when the minor scale reading with the smallest ordinate has a certain distance from the water surface, there may be a certain deviation in the identified water level, and in order to further improve the identification accuracy, optionally, in this embodiment, the step 130 specifically further includes:
1304. extracting all contours in the range of the abscissa of the first recognition frame, and selecting the lowest contour as a horizontal plane;
specifically, the left and right horizontal coordinates of the first recognition frame are used for intercepting information in the coordinate range of the whole image, all contours of the newly obtained image are extracted by utilizing Gaussian blur and Canny algorithms, the contours with the contour point length smaller than 6 pixels are filtered, the lowest contour is selected as a horizontal plane, and the vertical coordinate of the first point is selected as the vertical coordinate of the current horizontal plane.
1305. Obtaining a correction distance according to the pixel distance between the lower edge ordinate of the third identification frame with the smallest ordinate and the ordinate of the horizontal plane and the ratio of the pixel distance to the actual distance;
as shown in fig. 3, through the foregoing steps, each third recognition frame can be recognized, and the third recognition frame with the smallest ordinate is determined from the third recognition frames, so that the pixel distance between the lower edge of the third recognition frame and the horizontal plane determined in step 1304 can be obtained.
In a preferred embodiment, upper and lower points of two known actual distances can be manually marked at a position close to the water surface to serve as pixel proportion mapping comparison points, and the actual distance of each pixel can be obtained by combining the actual distance between the two points.
The specific calculation process is shown as the following formula:
rate=0.5/(bottom y -top y )
last=(index y -cm y )*rate
wherein, bottom y Lower ordinate, top, representing manual setting y Denotes the manually set upper point ordinate, rate denotes the pixel proportion, index y Ordinate, cm, of the horizontal plane y The ordinate of the lowermost third recognition box is indicated.
1306. And subtracting the correction distance from the water level height to obtain the actual water level height.
I.e. the actual water level height weight height =height-last。
According to the scheme, the existing camera is used for collecting the regional image of the reservoir water gauge, the key information characteristics of the water gauge are extracted through target detection algorithms such as yolov3 and the like, an algorithm aiming at the actual value of the current water level is set by combining the geometric position relation among all scale regions on the water gauge, and real-time and efficient judgment is realized. Compared with common manual monitoring, a large amount of manpower is saved, and real-time monitoring is guaranteed. And the algorithm only needs to install a camera on the spot and deploy a server. The method has the advantages of reducing management complexity, having certain pertinence in judging water, liquid or irregular and fluid objects, high identification accuracy, strong generalization capability and the like.
Optionally, in this embodiment, the method further includes:
140. when the duration that the water level continuously exceeds the set height threshold reaches the preset duration, triggering an alarm state, and storing and recording the video stream of the current time; and when the duration continuously shorter than the height threshold reaches the preset duration, the alarm state is released.
Fig. 4 is a block diagram illustrating a structure of a water level recognition apparatus based on a computer vision algorithm according to an exemplary embodiment of the present invention.
Referring to fig. 4, the system includes:
the image acquisition module is used for acquiring an image of a reservoir water gauge area;
the scale extraction module is used for extracting the scale of the water gauge in the image by using a target recognition algorithm;
and the water level judging module is used for obtaining the water level according to the position relation between the water gauge scale and the water surface.
Optionally, in this embodiment, the scale extracting module specifically includes:
the target identification unit is used for extracting a first identification frame of the whole water gauge in the image, a second identification frame of the main scale of the water gauge, a third identification frame of the secondary scale of the water gauge and numbers by using a target identification algorithm;
a number extraction unit for extracting the number in the first recognition frame;
the main scale reading extraction unit is used for obtaining the main scale reading of the water gauge according to the numbers in the range of the second identification frame;
and the secondary scale reading extraction unit is used for obtaining the secondary scale reading of the water gauge according to the number in the range of the third identification frame.
Optionally, in this embodiment, the water level determining module specifically includes:
the reference main scale reading determining unit is used for selecting the main scale reading with the minimum vertical coordinate as a reference main scale reading m;
the reference secondary scale reading determining unit is used for selecting the secondary scale reading with the minimum vertical coordinate as a reference secondary scale reading n;
the water level height judging unit is used for judging that the height of the water level is m-1+ n/10 if the vertical coordinate of the reference secondary scale reading is smaller than the reference main scale reading; and
and if the ordinate of the reference secondary scale reading is greater than or equal to the reference main scale reading, the height of the water level is m + n/10.
Optionally, in this embodiment, the water level determining module specifically further includes:
a horizontal plane determining unit, configured to extract all contours within the range of the abscissa of the first recognition frame, and select a lowermost contour as a horizontal plane;
the correction distance calculation unit is used for obtaining a correction distance according to the pixel distance between the lower edge ordinate of the third identification frame with the smallest ordinate and the ordinate of the horizontal plane and the ratio of the pixel distance to the actual distance;
and the actual water level calculating unit is used for subtracting the correction distance from the water level height to obtain the actual water level height.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
FIG. 5 is a schematic diagram illustrating a computing device according to an exemplary embodiment of the present invention.
Referring to fig. 5, computing device 500 includes memory 510 and processor 520.
The Processor 520 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 510 may include various types of storage units, such as system memory, Read Only Memory (ROM), and permanent storage. Wherein the ROM may store static data or instructions for the processor 520 or other modules of the computer. The persistent storage device may be a read-write storage device. The persistent storage may be a non-volatile storage device that does not lose stored instructions and data even after the computer is powered off. In some embodiments, the persistent storage device employs a mass storage device (e.g., magnetic or optical disk, flash memory) as the persistent storage device. In other embodiments, the permanent storage may be a removable storage device (e.g., floppy disk, optical drive). The system memory may be a read-write memory device or a volatile read-write memory device, such as a dynamic random access memory. The system memory may store instructions and data that some or all of the processors require at runtime. Further, the memory 510 may comprise any combination of computer-readable storage media, including various types of semiconductor memory chips (DRAM, SRAM, SDRAM, flash, programmable read only memory), magnetic and/or optical disks may also be employed. In some embodiments, memory 510 may include a removable storage device that is readable and/or writable, such as a Compact Disc (CD), a digital versatile disc read only (e.g., DVD-ROM, dual layer DVD-ROM), a Blu-ray disc read only, an ultra-dense disc, a flash memory card (e.g., SD card, min SD card, Micro-SD card, etc.), a magnetic floppy disk, or the like. Computer-readable storage media do not contain carrier waves or transitory electronic signals transmitted by wireless or wired means.
The memory 510 has stored thereon executable code that, when processed by the processor 520, may cause the processor 520 to perform some or all of the methods described above.
The aspects of the invention have been described in detail hereinabove with reference to the drawings. In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments. Those skilled in the art should also appreciate that the acts and modules referred to in the specification are not necessarily required by the invention. In addition, it can be understood that the steps in the method according to the embodiment of the present invention may be sequentially adjusted, combined, and deleted according to actual needs, and the modules in the device according to the embodiment of the present invention may be combined, divided, and deleted according to actual needs.
Furthermore, the method according to the invention may also be implemented as a computer program or computer program product comprising computer program code instructions for carrying out some or all of the steps of the above-described method of the invention.
Alternatively, the invention may also be embodied as a non-transitory machine-readable storage medium (or computer-readable storage medium, or machine-readable storage medium) having stored thereon executable code (or a computer program, or computer instruction code) which, when executed by a processor of an electronic device (or computing device, server, etc.), causes the processor to perform part or all of the various steps of the above-described method according to the invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems and methods according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present invention, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the embodiments disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen in order to best explain the principles of the embodiments, the practical application, or improvements to the technology in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.

Claims (10)

1. A water level identification method based on a computer vision algorithm is characterized by comprising the following steps:
collecting an image of a reservoir water gauge area;
extracting water gauge scales in the image by using a target recognition algorithm;
and obtaining the water level according to the position relation between the water gauge scale and the water surface.
2. The method according to claim 1, wherein the extracting the water gauge scale in the image by using the target recognition algorithm specifically comprises:
extracting a first identification frame of the whole water gauge, a second identification frame of a main scale of the water gauge, a third identification frame of a secondary scale of the water gauge and numbers in the image by using a target identification algorithm;
extracting the number in the first recognition box;
obtaining a main scale reading of the water gauge according to the numbers in the range of the second identification frame;
and obtaining the secondary scale reading of the water gauge according to the numbers in the range of the third identification frame.
3. The method according to claim 2, wherein the obtaining the water level according to the position relationship between the water gauge scale and the water surface specifically comprises:
selecting the main scale reading with the minimum vertical coordinate as a reference main scale reading m;
selecting the secondary scale reading with the minimum ordinate as a reference secondary scale reading n;
if the ordinate of the reference secondary scale reading is smaller than the reference main scale reading, the height of the water level is m-1+ n/10;
and if the ordinate of the reference secondary scale reading is greater than or equal to the reference main scale reading, the height of the water level is m + n/10.
4. The method according to claim 3, wherein the obtaining of the water level according to the position relationship between the water gauge scale and the water surface further comprises:
extracting all contours in the range of the abscissa of the first recognition frame, and selecting the lowest contour as a horizontal plane;
obtaining a correction distance according to the pixel distance between the lower edge ordinate of the third identification frame with the smallest ordinate and the ordinate of the horizontal plane and the ratio of the pixel distance to the actual distance;
and subtracting the correction distance from the water level height to obtain the actual water level height.
5. A water level recognition device based on computer vision algorithm, comprising:
the image acquisition module is used for acquiring an image of a reservoir water gauge area;
the scale extraction module is used for extracting the scale of the water gauge in the image by using a target recognition algorithm;
and the water level judging module is used for obtaining the water level according to the position relation between the water gauge scale and the water surface.
6. The apparatus according to claim 5, wherein the scale extraction module specifically comprises:
the target identification unit is used for extracting a first identification frame of the whole water gauge in the image, a second identification frame of the main scale of the water gauge, a third identification frame of the secondary scale of the water gauge and numbers by using a target identification algorithm;
a number extraction unit for extracting the number in the first recognition frame;
the main scale reading extraction unit is used for obtaining the main scale reading of the water gauge according to the numbers in the range of the second identification frame;
and the secondary scale reading extraction unit is used for obtaining the secondary scale reading of the water gauge according to the number in the range of the third identification frame.
7. The apparatus of claim 6, wherein the water level determining module specifically comprises:
the reference main scale reading determining unit is used for selecting the main scale reading with the minimum vertical coordinate as a reference main scale reading m;
the primary scale reading determining unit is used for selecting a secondary scale reading with the minimum vertical coordinate as a primary scale reading n;
the water level height judging unit is used for judging that the height of the water level is m-1+ n/10 if the vertical coordinate of the reference secondary scale reading is smaller than the reference main scale reading; and
and if the ordinate of the reference secondary scale reading is greater than or equal to the reference main scale reading, the height of the water level is m + n/10.
8. The apparatus according to claim 7, wherein the water level determination module further comprises:
a horizontal plane determining unit, configured to extract all contours within the range of the abscissa of the first recognition frame, and select a lowermost contour as a horizontal plane;
the correction distance calculation unit is used for obtaining a correction distance according to the pixel distance between the lower edge ordinate of the third identification frame with the smallest ordinate and the ordinate of the horizontal plane and the ratio of the pixel distance to the actual distance;
and the actual water level calculating unit is used for subtracting the correction distance from the water level height to obtain the actual water level height.
9. A terminal device, comprising:
a processor; and
a memory having executable code stored thereon, which when executed by the processor, causes the processor to perform the method of any one of claims 1-4.
10. A non-transitory machine-readable storage medium having executable code stored thereon, wherein the executable code, when executed by a processor of an electronic device, causes the processor to perform the method of any of claims 1-4.
CN202210710152.5A 2022-06-22 2022-06-22 Water level identification method and device based on computer vision algorithm Pending CN115100654A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210710152.5A CN115100654A (en) 2022-06-22 2022-06-22 Water level identification method and device based on computer vision algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210710152.5A CN115100654A (en) 2022-06-22 2022-06-22 Water level identification method and device based on computer vision algorithm

Publications (1)

Publication Number Publication Date
CN115100654A true CN115100654A (en) 2022-09-23

Family

ID=83292809

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210710152.5A Pending CN115100654A (en) 2022-06-22 2022-06-22 Water level identification method and device based on computer vision algorithm

Country Status (1)

Country Link
CN (1) CN115100654A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115909298A (en) * 2022-09-26 2023-04-04 杭州数聚链科技有限公司 Cargo ship water gauge scale reading method based on machine vision
CN116469091A (en) * 2023-04-21 2023-07-21 浪潮智慧科技有限公司 Automatic water gauge reading method, device and medium based on real-time video

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115909298A (en) * 2022-09-26 2023-04-04 杭州数聚链科技有限公司 Cargo ship water gauge scale reading method based on machine vision
CN116469091A (en) * 2023-04-21 2023-07-21 浪潮智慧科技有限公司 Automatic water gauge reading method, device and medium based on real-time video

Similar Documents

Publication Publication Date Title
CN114972329B (en) Image enhancement method and system of surface defect detector based on image processing
CN115100654A (en) Water level identification method and device based on computer vision algorithm
CN111612781A (en) Screen defect detection method and device and head-mounted display equipment
CN111627009A (en) Screen detection method and device and head-mounted display equipment
CN111027546B (en) Character segmentation method, device and computer readable storage medium
US10769454B2 (en) Camera blockage detection for autonomous driving systems
CN110286126A (en) A kind of wafer surface defects subregion area detecting method of view-based access control model image
WO2021109697A1 (en) Character segmentation method and apparatus, and computer-readable storage medium
CN109325930A (en) Detection method, device and the detection device of boundary defect
CN111091123A (en) Text region detection method and equipment
CN113160161B (en) Method and device for detecting defects at edge of target
CN112037287B (en) Camera calibration method, electronic equipment and storage medium
WO2021000948A1 (en) Counterweight weight detection method and system, and acquisition method and system, and crane
CN111476804A (en) Method, device and equipment for efficiently segmenting carrier roller image and storage medium
CN109102026A (en) A kind of vehicle image detection method, apparatus and system
CN112102141A (en) Watermark detection method, watermark detection device, storage medium and electronic equipment
CN114155285A (en) Image registration method based on gray level histogram
CN113311507A (en) Typhoon path identification method and device
US20230186639A1 (en) Camera blockage detection for autonomous driving systems
CN107958226B (en) Road curve detection method, device and terminal
CN116563837A (en) High-precision map guideboard graphic data resolving method, device, equipment and storage medium
CN115953454A (en) Water level obtaining method, device and equipment based on image restoration and storage medium
CN115112199A (en) Reservoir water level identification method and device based on computer vision algorithm
CN111738085A (en) System construction method and device for realizing automatic driving and simultaneously positioning and mapping
CN113029046B (en) Method and device for detecting straightness of scraper conveyor based on video identification

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination