Water level detection method and device based on fitting function
By using a method based on fitting function in water level detection, combined with float and camera technology, the problems of large measurement errors and high maintenance costs in traditional water level detection technology are solved, and high-precision and reliable water level detection are achieved.
Patent Information
- Application Number
- CN202510164809.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-14
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2045-02-14
AI Technical Summary
The existing water level detection technology relies on sensors and is susceptible to factors such as temperature, humidity, wind and waves, electromagnetic interference and signal transmission lines, resulting in large measurement errors, limited service life and high maintenance costs. Visual detection methods are affected by light, target occlusion and reflection refraction, making it difficult to achieve high-precision water level detection.
Using a water level detection method based on the fitting function, a buoy is installed on the ruler, a camera is installed next to the pool, and a pre-trained target recognition network is used to identify the scale scale and the central point of the float in the monitoring image, an exponential fitting function is constructed, and the optimal fitting parameters are obtained through iterative solution, and the water level height is calculated.
This method breaks away from the dependence of traditional water level detection technology on sensors, improves the accuracy and reliability of water level detection, reduces maintenance costs, and is suitable for high-precision water level detection scenarios.
Smart Images

Figure CN119624974A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of water level detection, and in particular to a water level detection method and device based on a fitting function. Background Art
[0002] In key areas such as water resource management, flood warning, and environmental monitoring, water level detection technology is of great significance for water level changes in water bodies such as rivers, lakes, and reservoirs. However, existing water level detection technology mainly relies on sensor technology and has several limitations. Specifically, the sensor is exposed to harsh outdoor environments for a long time, and its measurement accuracy is easily affected by factors such as temperature, humidity, wind and waves, resulting in large errors. In addition, electromagnetic interference and signal transmission line problems may also interfere with the sensor signal, thereby affecting the accuracy of the measurement results. When the measurement range of the sensor is inconsistent with the actual water level range, it may also lead to inaccurate measurement data. The physical properties of the sensor determine its limited service life, so it needs to be replaced regularly, which increases maintenance costs.
[0003] With the popularization of artificial intelligence, existing technologies generally use visual detection to directly detect water levels. Water levels are detected by visually detecting the scale readings in the water. However, visual detection is easily affected by lighting and target occlusion. In addition, there is reflection and refraction on the water surface. Therefore, direct use of cameras for visual detection has a large error. The accuracy requirements for water level detection are also very high, often at the millimeter level, so visual detection cannot be used in many high-precision scenarios. Summary of the invention
[0004] The embodiments of the present application provide a water level detection method and device based on a fitting function. A buoy is installed on a ruler, a camera is installed next to a pool, and the video image in the pool camera is monitored. Accurate pool water level data is calculated based on the ruler scale value and the buoy in the image and based on the fitting function analysis.
[0005] In a first aspect, an embodiment of the present application provides a water level detection method based on a fitting function, the method comprising: Deploy scales and buoys in the waters to be inspected, and obtain monitoring images containing the scales and buoys in real time from a bird's-eye view; Using a pre-trained target recognition network to identify each scale mark and buoy center point in the monitoring image, and obtaining the two-dimensional coordinate value of each scale mark and buoy center point in the form of pixel coordinates; An exponential fitting function is constructed, and initial fitting parameters are set for the exponential fitting function. The actual scale value of the ruler, the vertical coordinate of each two-dimensional coordinate value of the ruler scale, and the vertical coordinate of the two-dimensional coordinate value of the buoy center point are normalized and brought into the exponential fitting function for iterative solution to obtain the optimal fitting parameters. The water level height is obtained based on the optimal fitting parameters and the vertical coordinate of the normalized two-dimensional coordinate value of the buoy center point, wherein the value range of the initial fitting parameters is (1, 2).
[0006] In a second aspect, an embodiment of the present application provides a water level detection device based on a fitting function, comprising: An acquisition module is used to deploy scales and buoys in the waters to be detected, and to acquire monitoring images including the scales and buoys in real time from a bird's-eye view; A recognition module, used to use a pre-trained target recognition network to recognize each scale mark and buoy center point in the monitoring image, and obtain the two-dimensional coordinate value of each scale mark and buoy center point in the form of pixel coordinates; A fitting module is used to construct an exponential fitting function and set initial fitting parameters for the exponential fitting function. The actual scale value of the ruler, the vertical coordinate of each two-dimensional coordinate value of the ruler scale, and the vertical coordinate of the two-dimensional coordinate value of the buoy center point are normalized and brought into the exponential fitting function for iterative solution to obtain the optimal fitting parameters. The water level height is obtained based on the optimal fitting parameters and the vertical coordinate of the normalized two-dimensional coordinate value of the buoy center point, wherein the value range of the initial fitting parameters is (1, 2).
[0007] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute a water level detection method based on a fitting function.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, in which a computer program is stored. The computer program includes a program code for controlling a process to execute a process, and the process includes a water level detection method based on a fitting function.
[0009] The main contributions and innovations of the present invention are as follows: The embodiment of the present application uses a camera to pull a video stream and processes frame images through a target recognition convolutional neural network model, thereby getting rid of the dependence of traditional water level detection technology on sensors and overcoming the problems of large measurement errors, limited service life and high maintenance costs caused by the influence of factors such as temperature, humidity, wind and waves, electromagnetic interference, signal transmission lines and measurement range matching on sensors; in the detection step, the embodiment of the present application acquires image data, identifies targets and acquires coordinates, determines a suitable fitting function according to image features, and introduces a prior distribution to integrate experience or previous experimental data to provide initial information for fitting parameters. The likelihood estimation can accurately measure the degree of data fitting, and the posterior distribution combines the prior and likelihood functions to update parameter information. The synergistic effect of the three makes the solution of fitting parameters more accurate and stable, thereby greatly improving the accuracy and reliability of water level detection; Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 is a flow chart of a water level detection method based on a fitting function according to an embodiment of the present application; Figure 2 is a schematic diagram of the connection relationship between a buoy and a through hole according to an embodiment of the present application; Figure 3 is a graph of an exponential fitting function according to an embodiment of the present application; Figure 4 is a structural block diagram of a water level detection device based on a fitting function according to an embodiment of the present application; Figure 5 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0011] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0012] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0013] Embodiment 1:
[0014] The present application provides a method for detecting water level based on a fitting function, by installing a buoy on a ruler, installing a camera next to a pool, monitoring the video image in the pool camera, and calculating and analyzing the ruler scale value and the buoy in the image based on the fitting function to obtain accurate pool water level data. Specifically, refer to Figure 1 , the method comprising: Deploy scales and buoys in the waters to be inspected, and obtain monitoring images containing the scales and buoys in real time from a bird's-eye view; Using a pre-trained target recognition network to identify each scale mark and buoy center point in the monitoring image, and obtaining the two-dimensional coordinate value of each scale mark and buoy center point in the form of pixel coordinates; An exponential fitting function is constructed, and initial fitting parameters are set for the exponential fitting function. The actual scale value of the ruler, the vertical coordinate of each two-dimensional coordinate value of the ruler scale, and the vertical coordinate of the two-dimensional coordinate value of the buoy center point are normalized and brought into the exponential fitting function for iterative solution to obtain the optimal fitting parameters. The water level height is obtained based on the optimal fitting parameters and the vertical coordinate of the normalized two-dimensional coordinate value of the buoy center point, wherein the value range of the initial fitting parameters is (1, 2).
[0015] In some specific embodiments, a through hole is provided at the center of the buoy, and the buoy is placed on the scale through the through hole. The connection relationship between the buoy and the through hole is as follows: Figure 2 As shown, this solution connects the buoy and the scale through a through hole to prevent the buoy from being carried away by the water flow, and normal water level detection can be guaranteed even in the case of turbulent water flow.
[0016] In some embodiments, a camera is installed in the water area to be inspected, and the camera obtains a video stream of the water area to be inspected. The video stream is then decoded according to the frame rate of the camera to obtain n frames of monitoring images containing a ruler and a buoy to detect the water level height of the water area to be inspected.
[0017] In some specific embodiments, any target recognition network can be used to identify the monitoring image, such as YOLO, GhostNet, etc., and this solution does not limit this.
[0018] Specifically, the camera of this solution pulls the video stream and processes the frame image through the target recognition convolutional neural network model, getting rid of the traditional water level detection technology's dependence on sensors and overcoming the problems of large measurement errors, limited service life and high maintenance costs caused by the sensors being affected by factors such as temperature, humidity, wind and waves, electromagnetic interference, signal transmission lines and measurement range matching.
[0019] In some embodiments, the two-dimensional coordinate value of each scale mark and the center point of the buoy is calculated with the lower left corner of the monitoring image as the coordinate origin, wherein the two-dimensional coordinate value of each scale mark and the center point of the buoy is represented by the position of the pixel point in the monitoring image. If each scale mark and the center point of the buoy occupies multiple pixels, the center point of the area occupied by the multiple pixels is used as the two-dimensional coordinate value of the corresponding scale mark or the center point of the buoy.
[0020] Specifically, taking the lower left corner of the monitoring image as the coordinate origin (0, 0), the two-dimensional coordinates of the m scale values on the ruler are (x1, y1), (x2, y2), ..., (x m ,y m ), the two-dimensional coordinates of the center point of the buoy are (x m+1 ,y m+1 ).
[0021] Exemplarily, when the ruler scale occupies 30 pixels in the horizontal direction and 40 pixels in the vertical direction, the center point of the image area occupied by the ruler scale is used as the two-dimensional coordinate value of the ruler scale.
[0022] Specifically, this solution uses pixel coordinates to accurately represent the position of the scale and the center point of the buoy, which is convenient for subsequent fitting calculations.
[0023] In some embodiments, since the ruler is vertical, it can be inferred that the actual scale value of the ruler and the ordinate of the two-dimensional coordinate value of the scale are exponentially related. Therefore, this solution uses an exponential fitting function for fitting, and the formula is as follows: ; The characteristic of the exponential fitting function is that it must pass through specific points (0, 0) and (1, e), and the ordinate of the scale value and the scale value must pass through the points (0, 0) and (b, c), so the fitting function is rewritten as: ; Among them, b represents the maximum value of the scale value, c represents the height of the image, a is the initial fitting parameter, and y i Represents the m scale values and the vertical coordinate of the center point of the buoy, v i Represents the water level.
[0024] In some embodiments, the actual scale value of the ruler, the ordinate of each two-dimensional coordinate value of the ruler scale, and the ordinate of the two-dimensional coordinate value of the buoy center point are normalized based on the image height of the monitoring image.
[0025] Specifically, since there is a large difference between the picture height and the ruler scale value in the camera video stream in actual measurement, the picture height is usually three to four digits, while the ruler scale value is usually single digits. In order to make the fitting function more intuitively represent the scale value of the ruler, the height of the monitoring picture is used to normalize the ruler scale value so that its range is unified to 0-100.
[0026] Specifically, the normalized ordinates of the m scale values and the center point of the buoy are: ; Among them, c represents the height of the image, y i Represents the unnormalized vertical coordinate of the m scale values and the center point of the buoy.
[0027] The normalized scale values are: ; Among them, b represents the maximum value of the scale, d represents the minimum value of the scale, and v i Represents m scale values.
[0028] Then the fitting function is converted to: ; Where a is the fitting parameter, Represents the normalized ordinate value, Represents the normalized scale value (i.e. water level height).
[0029] In some specific embodiments, since the camera acquires the monitoring image from a bird's-eye view, it can be obtained based on the basic properties of the exponential function and the relationship between the ordinate of the scale value and the scale value: an increase in the ordinate of the scale value will lead to an increase in the spacing between adjacent scale values, so the value range of the initial fitting parameter is set to (1, 2), so as to obtain a better fitting effect and a faster convergence speed.
[0030] In this embodiment, the curve diagram of the exponential fitting function is as follows: Figure 3As shown, a prior distribution is set for the initial fitting parameters, and the deviation between the current exponential fitting function value and the actual scale value is calculated in each round of iteration to obtain a deviation result. A likelihood estimate is calculated based on the deviation result, and then the likelihood estimate is used to calculate the posterior distribution of the current iteration round. The total deviation result of each actual scale value in each round of iteration is calculated, and the fitting parameters are updated based on the total deviation result and the posterior distribution until the optimal fitting parameters are obtained.
[0031] Specifically, the prior distribution is used to select the most appropriate value for the initial fitting parameter within the value range, the likelihood estimate is used to represent the matching of the fitting parameters in the current round of iterations, and the posterior distribution is used to adjust the fitting parameters in each round of iterations according to the likelihood estimate.
[0032] Exemplarily, the prior distribution satisfies the normal distribution, and an initial fitting parameter a0 is selected according to the prior distribution. Then, for the initial fitting parameter a0, the deviation between the corresponding fitting function value and the normalized value of each scale value is calculated, and the deviation result of the i-th scale value is: ; in, Represents the normalized scale value, Represents the normalized scale value calculated by the fitting function, that is, the water level height.
[0033] Then the total deviation result S in the current iteration round is: ; The smaller S is, the higher the degree of fit between the fitting parameter a and the scale value at the current viewing angle is.
[0034] In this scheme, the ordinate of the scale value on the image is continuously substituted into the exponential fitting function as input, and the size of the fitting parameter a is continuously adjusted with a step size of 0.0001 for iteration. In each iteration, the fitting parameter a is updated and the total deviation value S is recalculated. When the iteration round T is reached, or in consecutive iteration rounds, the total deviation value S does not decrease significantly, or begins to increase, it indicates that the fitting parameter a has converged. At this time, the iteration is stopped and the fitting parameter a at the time of convergence is taken as the optimal fitting parameter.
[0035] The vertical coordinate of the normalized two-dimensional coordinate value of the center point of the buoy is: ; Among them, y m+1 Represents the ordinate of the center point of the buoy. The normalized ordinate of the center point of the buoy By inputting the fitting function, the normalized scale value of the buoy center point can be calculated. , so the scale value after normalization of the buoy center point Convert it to the actual scale value of the buoy center point to get the water level v of the pool m+1 : ; in, represents the normalized scale value of the center point of the buoy, b represents the maximum scale value, and d represents the minimum scale value.
[0036] Specifically, this scheme determines the appropriate fitting function based on the image features, and introduces the prior distribution to integrate the experience or previous experimental data to provide initial information for the fitting parameters. The likelihood estimation can accurately measure the degree of data fitting, and the posterior distribution combines the prior and likelihood functions to update the parameter information. The synergistic effect of the three makes the solution of the fitting parameters more precise and stable, thereby greatly improving the accuracy and reliability of water level detection.
[0037] Embodiment 2: Based on the same idea, refer to Figure 4 , the present application also proposes a water level detection device based on a fitting function, comprising: An acquisition module is used to deploy scales and buoys in the waters to be detected, and to acquire monitoring images including the scales and buoys in real time from a bird's-eye view; A recognition module, used to use a pre-trained target recognition network to recognize each scale mark and buoy center point in the monitoring image, and obtain the two-dimensional coordinate value of each scale mark and buoy center point in the form of pixel coordinates; A fitting module is used to construct an exponential fitting function and set initial fitting parameters for the exponential fitting function. The actual scale value of the ruler, the vertical coordinate of each two-dimensional coordinate value of the ruler scale, and the vertical coordinate of the two-dimensional coordinate value of the buoy center point are normalized and brought into the exponential fitting function for iterative solution to obtain the optimal fitting parameters. The water level height is obtained based on the optimal fitting parameters and the vertical coordinate of the normalized two-dimensional coordinate value of the buoy center point, wherein the value range of the initial fitting parameters is (1, 2).
[0038] Embodiment three: This embodiment also provides an electronic device, referring to Figure 5 , comprises a memory 404 and a processor 402, wherein the memory 404 stores a computer program, and the processor 402 is configured to run the computer program to execute the steps in any of the above method embodiments.
[0039] Specifically, the processor 402 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0040] Among them, the memory 404 may include a large capacity memory 404 for data or instructions. For example, but not limitation, the memory 404 may include a hard disk drive (HDD), a floppy disk drive, a solid state drive (SSD), a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In appropriate cases, the memory 404 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 404 may be inside or outside the data processing device. In a specific embodiment, the memory 404 is a non-volatile memory. In a specific embodiment, the memory 404 includes a read-only memory (ROM) and a random access memory (RAM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (Programmable Read-Only Memory, PROM for short), an erasable PROM (Erasable Programmable Read-Only Memory, EPROM for short), an electrically erasable PROM (Electrically Erasable Programmable Read-Only Memory, EEPROM for short), an electrically alterable ROM (Electrically Alterable Read-Only Memory, EAROM for short) or a flash memory (FLASH) or a combination of two or more of these. In appropriate circumstances, the RAM may be a static random access memory (SRAM) or a dynamic random access memory (DRAM), wherein the DRAM may be a fast page mode dynamic random access memory 404 (FPMDRAM), an extended data output dynamic random access memory (EDODRAM), a synchronous dynamic random access memory (SDRAM), etc.
[0041] The memory 404 may be used to store or cache various data files required for processing and / or communication, as well as possible computer program instructions executed by the processor 402 .
[0042] The processor 402 reads and executes the computer program instructions stored in the memory 404 to implement any one of the water level detection methods based on the fitting function in the above embodiments.
[0043] Optionally, the electronic device may further include a transmission device 406 and an input / output device 408 , wherein the transmission device 406 is connected to the processor 402 , and the input / output device 408 is connected to the processor 402 .
[0044] The transmission device 406 can be used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired or wireless network provided by a communication provider of the electronic device. In one example, the transmission device includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 406 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0045] The input and output device 408 is used to input or output information. In this embodiment, the input information may be monitoring images, initial fitting parameters, etc., and the output information may be optimal fitting parameters, water level height, etc.
[0046] Optionally, in this embodiment, the processor 402 may be configured to perform the following steps through a computer program: Deploy scales and buoys in the waters to be inspected, and obtain monitoring images containing the scales and buoys in real time from a bird's-eye view; Using a pre-trained target recognition network to identify each scale mark and buoy center point in the monitoring image, and obtaining the two-dimensional coordinate value of each scale mark and buoy center point in the form of pixel coordinates; An exponential fitting function is constructed, and initial fitting parameters are set for the exponential fitting function. The actual scale value of the ruler, the vertical coordinate of each two-dimensional coordinate value of the ruler scale, and the vertical coordinate of the two-dimensional coordinate value of the buoy center point are normalized and brought into the exponential fitting function for iterative solution to obtain the optimal fitting parameters. The water level height is obtained based on the optimal fitting parameters and the vertical coordinate of the normalized two-dimensional coordinate value of the buoy center point, wherein the value range of the initial fitting parameters is (1, 2).
[0047] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0048] In general, various embodiments may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects of the invention may be implemented in hardware, while other aspects may be implemented in firmware or software executed by a controller, microprocessor, or other computing device, but the invention is not limited thereto. Although various aspects of the invention may be shown and described as block diagrams, flow charts, or using some other graphical representation, it should be understood that, as non-limiting examples, the boxes, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.
[0049] Embodiments of the present invention may be implemented by computer software that is executable by a data processor of a mobile device, such as in a processor entity, or by hardware, or by a combination of software and hardware. Computer software or programs (also referred to as program products) including software routines, applets and / or macros may be stored in any device-readable data storage medium, and they include program instructions for performing specific tasks. A computer program product may include one or more computer executable components configured to perform an embodiment when the program is run. One or more computer executable components may be at least one software code or a portion thereof. In addition, at this point, it should be noted that, for example, Figure 5 Any block of the logic flow in the program may represent program steps, or interconnected logic circuits, blocks and functions, or a combination of program steps and logic circuits, blocks and functions. The software may be stored on physical media such as memory chips or storage blocks implemented within a processor, magnetic media such as hard disks or floppy disks, and optical media such as, for example, DVDs and their data variants, CDs, etc. Physical media are non-transitory media.
[0050] Those skilled in the art should understand that the technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0051] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A water level detection method based on fitting function, characterized in that: The following steps are involved: Deploy scales and buoys in the waters to be inspected, and obtain monitoring images containing the scales and buoys in real time from a bird's-eye view; Using a pre-trained target recognition network to identify each scale mark and buoy center point in the monitoring image, and obtaining the two-dimensional coordinate value of each scale mark and buoy center point in the form of pixel coordinates; An exponential fitting function is constructed, and initial fitting parameters are set for the exponential fitting function. The actual scale value of the ruler and the vertical coordinate of each two-dimensional coordinate value of the ruler scale are normalized and brought into the exponential fitting function for iterative solution to obtain the optimal fitting parameters. The water level height is obtained based on the optimal fitting parameters and the vertical coordinate of the normalized two-dimensional coordinate value of the buoy center point, wherein the value range of the initial fitting parameters is (1, 2).
2. A water level detection method based on fitting function according to claim 1, characterized in that: A through hole is arranged at the center of the buoy, and the buoy is put on the ruler through the through hole.
3. A water level detection method based on fitting function according to claim 1, characterized in that: The two-dimensional coordinate value of each scale mark and the center point of the buoy is calculated with the lower left corner of the monitoring image as the coordinate origin. The two-dimensional coordinate value of each scale mark and the center point of the buoy is represented by the position of the pixel point in the monitoring image. If each scale mark and the center point of the buoy occupies multiple pixels, the center point of the area occupied by the multiple pixels is used as the two-dimensional coordinate value of the corresponding scale mark or the center point of the buoy.
4. The water level detection method based on fitting function according to claim 1 is characterized in that: Based on the image height of the monitoring image, the actual scale value of the ruler, the ordinate of each two-dimensional coordinate value of the ruler scale, and the ordinate of the two-dimensional coordinate value of the buoy center point are normalized.
5. The water level detection method based on fitting function according to claim 1 is characterized in that: A prior distribution is set for the initial fitting parameters, and in each round of iteration, the deviation between the current exponential fitting function value and the actual scale value is calculated to obtain a deviation result, a likelihood estimate is calculated based on the deviation result, and then the likelihood estimate is used to calculate the posterior distribution of the current iteration round, and the total deviation result of each actual scale value in each round of iteration is calculated, and the fitting parameters are updated based on the total deviation result and the posterior distribution until the optimal fitting parameters are obtained.
6. A water level detection method based on fitting function according to claim 5, characterized in that: The prior distribution is used to select the most appropriate value for the initial fitting parameter within the value range, the likelihood estimate is used to represent the matching of the fitting parameters in the current round of iterations, and the posterior distribution is used to adjust the fitting parameters in each round of iterations according to the likelihood estimate.
7. A water level detection device based on fitting function, characterized in that: include: An acquisition module is used to deploy scales and buoys in the waters to be detected, and to acquire monitoring images including the scales and buoys in real time from a bird's-eye view; A recognition module, used to use a pre-trained target recognition network to recognize each scale mark and buoy center point in the monitoring image, and obtain the two-dimensional coordinate value of each scale mark and buoy center point in the form of pixel coordinates; A fitting module is used to construct an exponential fitting function and set initial fitting parameters for the exponential fitting function. The actual scale value of the ruler and the vertical coordinate of each two-dimensional coordinate value of the ruler scale are normalized and brought into the exponential fitting function for iterative solution to obtain the optimal fitting parameters. The water level height is obtained based on the optimal fitting parameters and the vertical coordinate of the normalized two-dimensional coordinate value of the buoy center point, wherein the value range of the initial fitting parameters is (1, 2).
8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the water level detection method based on fitting function as described in any one of claims 1-6.
9. A readable storage medium, characterized in that: A computer program is stored in the readable storage medium, wherein the computer program includes a program code for controlling a process to execute a process, wherein the process includes a water level detection method based on a fitting function according to any one of claims 1-6.
Citation Information
Patent Citations
Water level measuring system and method based on digital image processing
CN103017869A
Intelligent visual reading device and reading method for water gauge
CN114152313A
Water gauge-free water level reading method and device and computer readable storage medium
CN116863128A
Liquid level gauge device
JP2008292364A
Float meter reading program, float meter reading device and float meter reading method
JP2022184377A