Liquid level measurement device applied to reservoir area and reservoir area volume calculation method and system
By designing a liquid level measuring device and image recognition technology for the reservoir area, the problem of manual participation in liquid volume calculation in the prior art is solved, and the effect of automated measurement and efficient calculation is achieved.
Patent Information
- Application Number
- CN202411584917.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art requires manual participation in liquid volume calculation, which makes measurement difficult.
A liquid level measuring device is designed, including a floating body and a support tube, and the liquid level is measured using multiple induction coils and light emitting units, and the liquid volume is calculated in combination with image recognition technology.
By automatically measuring liquid level and calculating liquid volume, the amount of manual participation is reduced and the accuracy and efficiency of measurement is improved.
Smart Images

Figure CN119469335A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a liquid level measuring device applied to a reservoir area, and a reservoir area volume calculation method and system. Background Art
[0002] Liquid level identification is widely used in various fields such as scientific research, life, industrial production, water conservancy and disaster prevention, especially in the field of water conservancy and disaster prevention. Due to the continuous wind disasters and floods in recent years, whenever a disaster strikes, it often causes rivers and streams to surge and reservoirs to be fully loaded and emergency flood discharges are required, often causing loss of life and property in a short period of time. In addition, the prevention and control of floods in the disaster prevention system is related to factors such as rainfall frequency, drainage system design standards within the area, reservoir capacity outside the area, and flood control standards outside the area. Under many uncertain factors, floods are bound to have risks. However, among the above factors, the grasp of the water levels of rivers, dams and reservoirs is the most direct and can predict the occurrence of floods the fastest.
[0003] At present, the calculation of liquid volume mainly relies on setting a reference system or monitoring the depth of the liquid through a depth detector to calculate the liquid volume. However, the above methods often require manual participation in practical applications, which makes the measurement more difficult. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a liquid level measuring device, a storage area volume calculation method and a system for use in a reservoir area, so as to solve the problem that the prior art relies on setting a reference system or monitoring the depth of the liquid through a depth detector to calculate the liquid volume, which often requires manual participation in actual applications, resulting in greater measurement difficulty.
[0005] The present invention is achieved through the following technical solutions:
[0006] A liquid level measuring device used in a reservoir area, the liquid level measuring device comprising a floating body and a supporting tube, the lower end of the supporting tube is fixedly connected to the floating body, and the upper end of the supporting tube extends vertically upward;
[0007] The support tube is sleeved with a plurality of induction coils along the length direction, and the plurality of induction coils are respectively point-connected with light-emitting units;
[0008] A sliding rod is movably connected inside the support tube, a permanent magnet is installed on the upper end of the sliding rod, and the lower end of the sliding rod passes through the floating body and extends downward;
[0009] A winch is installed on the bottom surface of the floating body, a support shaft is fixedly passed through the center of the winch, and the winch is rotatably connected to the floating body through the support shaft, an anchor cable is wound around the winch, one end of the anchor cable is connected to the winch, and the other end is connected to the anchor head;
[0010] A driving wheel is installed at one end of the support shaft, and a driven wheel is rotatably connected to the floating body. The driven wheel is located between the driving wheel and the sliding rod, and the two sides are respectively connected to the driving wheel and the sliding rod. A method for calculating the volume of a reservoir area includes the following steps:
[0011] Model the shape of the reservoir area and convert the shape of the reservoir area into a preset model of an equivalent inverted terrace structure;
[0012] A liquid level measuring device is provided to measure the liquid level in the reservoir area and obtain the liquid level value of the reservoir area;
[0013] Acquire an image to be identified, wherein the image to be identified at least includes: a liquid surface and a boundary line between the liquid surface and the environment;
[0014] Determine the liquid surface and the boundary between the liquid surface and the environment in the image to be identified by using a preset image recognition method, and determine the angle deviation parameter in the image to be identified according to the perspective transformation principle;
[0015] Obtaining the original image to be identified according to a preset restoration algorithm, the angle deviation parameter and the image to be identified, and determining the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified;
[0016] The actual area of the liquid surface in the reservoir is calculated according to the size of the boundary line between the liquid surface and the environment in the original image to be identified;
[0017] The actual area of the liquid surface in the reservoir area and the liquid level value in the reservoir area are substituted into the preset model to calculate the liquid volume in the reservoir area.
[0018] It is further defined that the step of acquiring the image to be identified includes: acquiring the image to be identified at least including the liquid surface and the boundary between the liquid surface and the environment through a preset image acquisition device.
[0019] It is further defined that the step of using a preset image recognition method to determine the liquid surface and the boundary between the liquid surface and the environment in the image to be recognized, and determining the angle deviation parameter in the image to be recognized according to the perspective transformation principle includes:
[0020] Using a preset image feature recognition algorithm to identify the image to be identified;
[0021] Determine the liquid surface and the boundary between the liquid surface and the environment in the image to be identified according to the feature matching result;
[0022] According to the size and position of the liquid surface in the image to be identified and the boundary line between the liquid surface and the environment, an angle deviation parameter in the image to be identified is determined.
[0023] It is further defined that the step of obtaining the original image to be identified according to the preset restoration algorithm, the angle deviation parameter and the image to be identified is as follows:
[0024] Use the getPerspectiveTransform function in OpenCV to process the preprocessed real-time image and obtain the perspective transformation matrix;
[0025] The image to be identified and the angle deviation parameter are added to the warpPerspective function in OpenCV to perform perspective transformation to obtain the original image to be identified.
[0026] It is further defined that the step of determining the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified comprises:
[0027] The positions of the liquid surface and the boundary line between the liquid surface and the environment in the original image to be identified are determined according to the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified, the preset restoration algorithm, and the angle deviation parameter.
[0028] It is further defined that the step of calculating the liquid surface area according to the liquid surface size in the original image to be identified, and determining the actual area of the liquid surface in the reservoir area according to a preset ratio comprises:
[0029] Inputting the original image to be identified into a preset liquid surface area annotation model for annotation, and obtaining an annotated image with a target liquid surface detection area to be identified;
[0030] The labeled image with the target liquid level detection area to be identified is cropped to obtain the image to be identified;
[0031] The liquid surface area in the annotated image is calculated according to the liquid surface size in the annotated image, and the actual area of the liquid surface in the reservoir area is determined according to a preset ratio.
[0032] It is further defined that the step of calculating the actual liquid volume of the liquid according to the preset model and the actual area of the liquid surface comprises:
[0033] Determining the type of parameters required to calculate the volume of the liquid according to the shape of the preset model;
[0034] Determine the specific parameter corresponding to the parameter type according to the preset model, the parameter type and the actual area of the liquid level in the reservoir area;
[0035] The actual liquid volume of the liquid is calculated based on the specific parameters, the actual area of the liquid surface in the reservoir area and the volume calculation formula corresponding to the preset model.
[0036] It is further defined that the step of calculating the actual liquid volume of the liquid according to the preset model and the actual area of the liquid surface comprises:
[0037] According to the preset model of the inverted step platform, the parameter types of the liquid volume to be calculated are determined as follows: bottom area, liquid depth, and actual liquid surface area;
[0038] Determine the actual parameters of the bottom area according to the preset model of the inverted step platform, and determine the actual parameters of the liquid depth according to the actual area of the liquid surface;
[0039] The actual parameters of the bottom area, the actual parameters of the liquid depth, the actual area of the liquid surface, and the volume calculation formula of the terrace are determined according to the preset model to calculate the actual liquid volume of the liquid.
[0040] A reservoir volume calculation system includes: an acquisition module, a first determination module, a second determination module, a third determination module, and a calculation module;
[0041] The acquisition module is used to acquire the image to be identified, wherein the image to be identified at least includes: a liquid surface and a boundary line between the liquid surface and the environment;
[0042] The first determination module is used to determine the liquid surface and the boundary between the liquid surface and the environment in the image to be identified by using a preset image recognition method, and to determine the angle deviation parameter in the image to be identified according to the perspective transformation principle;
[0043] The second determination module is used to obtain the original image to be identified according to a preset restoration algorithm, the angle deviation parameter and the transformation of the image to be identified, and to determine the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified;
[0044] The third determination module is used to calculate the liquid surface area according to the liquid surface size in the original image to be identified, and determine the actual area of the liquid surface in the reservoir area according to a preset ratio;
[0045] The calculation module is used to calculate the actual liquid volume of the liquid according to a preset model and the actual area of the liquid surface.
[0046] The beneficial effects of the present invention are:
[0047] The liquid level measuring device, reservoir volume calculation method and system applied to the reservoir area can regularize the irregular shape of the reservoir area by constructing a preset model of the reservoir water storage area in the shape of an inverted terrace, and can calculate the water storage capacity of the reservoir area according to the actual area of the reservoir liquid surface and the measured water level depth, that is, calculate the liquid volume in the reservoir area, which can effectively reduce the amount of manual participation and measurement difficulty.
[0048] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A schematic diagram of an application scenario provided for this application;
[0050] Figure 2 A schematic diagram of a flow chart of a reservoir volume calculation method provided in an embodiment of the present application;
[0051] Figure 3 A schematic diagram of a flow chart of another reservoir volume calculation method provided in an embodiment of the present application;
[0052] Figure 4 A schematic diagram of a flow chart of another reservoir volume calculation method provided in an embodiment of the present application;
[0053] Figure 5 A schematic diagram of a flow chart of another reservoir volume calculation method provided in an embodiment of the present application;
[0054] Figure 6 A schematic diagram of a flow chart of another reservoir volume calculation method provided in an embodiment of the present application;
[0055] Figure 7 A schematic diagram of another module of a storage area volume calculation system provided in an embodiment of the present application;
[0056] Figure 8 It is a structural schematic diagram of a liquid level measuring device used in a reservoir area;
[0057] Fig. 9 It is a schematic diagram of the internal structure of the liquid level measuring device used in the reservoir area;
[0058] Fig.10 for Fig. 9 A magnified view of middle;
[0059] In the figure: 10, electronic device; 11, memory; 12, processor; 13, network module;
[0060] 20. floating body; 21. supporting tube; 22. induction coil; 23. light emitting unit; 24. sliding rod; 25. permanent magnet; 26. capstan; 27. anchor cable; 28. anchor head; 29. driving wheel; 30. driven wheel;
[0061] 31. Acquisition module; 32. First determination module; 33. Second determination module; 34. Third determination module; 35. Calculation module. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0063] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0065] In the above description of the present invention, it should be noted that the terms "one side", "the other side", etc. indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0066] In addition, the term "same" does not mean that the parts must be absolutely the same, but slight differences are allowed. The term "vertical" only means that the positional relationship between the parts is more vertical than "parallel", and does not mean that the structure must be completely vertical, but can be slightly tilted.
[0067] See also Figure 1 , is a schematic diagram of an application scenario provided in the present application, the electronic device 10 may include: a memory 11, a processor 12, and a network module 13.
[0068] The memory 11, the processor 12, and the network module 13 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines. The memory 11 stores at least one functional module that can be stored in the memory 11 in the form of software or firmware. The processor 12 executes various functional applications and data processing by running the functional module in the form of software or hardware stored in the memory 11, that is, implementing the method performed by the electronic device 10 in the present application.
[0069] The memory 11 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a disk or a solid state drive, etc. The memory 11 is used to store a program, and the processor 12 executes the program after receiving an execution instruction.
[0070] The processor 12 may be an integrated circuit chip having data processing capabilities.
[0071] The processor 12 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc. The methods, steps, and logic diagrams in the present application may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. Generally, the processor 12 may be a chip of PCB33C01, which has a sensitivity of 100mV / g, a range of ±50g, a frequency band of 5-10kHz, and an applicable temperature of -54°C to +121°C.
[0072] The network module 13 is used to establish a communication connection between the electronic device 10 and an external communication terminal through a network to implement the sending and receiving operations of network signals and data. The above network signals may include wireless signals or wired signals.
[0073] Understandably, Figure 1 The structure shown is for illustration only. The electronic device 10 may also include Figure 1More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0074] Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0075] On the basis of the above, the present application also provides a computer-readable storage medium, wherein the computer-readable storage medium includes a computer program, and when the computer program is executed, the electronic device 10 where the computer-readable storage medium is located is controlled to execute the following method.
[0076] like Figure 2 As shown, the present application provides a method for calculating the volume of a reservoir area, including:
[0077] Model the shape of the reservoir area in advance, and convert the shape of the reservoir area into a preset model of an equivalent inverted terrace structure, and set up a liquid level measuring device to measure the liquid level of the reservoir area through the liquid level measuring device to obtain the liquid level value of the reservoir area;
[0078] Then execute the following steps:
[0079] S101: Obtain an image to be recognized.
[0080] In practical applications, the image to be identified can be obtained through a camera, a still camera, a video camera, a satellite, etc., and the specific method is not specifically limited here.
[0081] It should be noted that the image to be identified at least includes: a liquid surface and a boundary line between the liquid surface and the environment.
[0082] Specifically, a real-time image with high definition can be obtained through a preset image acquisition device;
[0083] The real-time image includes the liquid surface and the boundary between the liquid surface and the environment. In addition, a patrol robot equipped with a camera can be used to shoot the scene in the area where the target to be identified is located to obtain the real-time image.
[0084] For the convenience of explanation, the preset model is taken as an inverted terrace dam as an example. The camera device is generally set on the bank of the dam so that the image captured by the camera device can include the entire dam page and the dam bank that is not submerged by the liquid surface.
[0085] S102: using a preset image recognition method to determine the liquid surface and the boundary between the liquid surface and the environment in the image to be recognized, and determining an angle deviation parameter in the image to be recognized based on a perspective transformation principle.
[0086] like Figure 3As shown, the steps of using a preset image recognition method to determine the liquid surface and the boundary between the liquid surface and the environment in the image to be recognized, and determining the angle deviation parameter in the image to be recognized according to the perspective transformation principle include:
[0087] S201: Use a preset image feature recognition algorithm to recognize the image to be recognized.
[0088] The preset image feature recognition algorithm is determined according to needs and is not specifically limited herein as long as the preset image feature recognition algorithm can complete the recognition of the input image through training, thereby determining the features in the image to be recognized.
[0089] The preset image feature recognition algorithm needs to be trained. The specific training process is: input the marked image to be recognized into the algorithm to be trained, and train the algorithm so that the algorithm can recognize the mark. Specifically, if the marked feature in the training sample is the liquid surface, the preset image feature recognition algorithm obtained after training can be applied to the image containing the liquid surface to identify the liquid surface. The type and number of samples depend on actual needs and will not be elaborated here.
[0090] S202: Determine the liquid surface in the image to be identified and the boundary between the liquid surface and the environment according to the feature matching result.
[0091] The feature matching result determines the liquid surface in the image to be identified and the boundary between the liquid surface and the environment. The liquid surface in the original image to be identified and the boundary between the liquid surface and the environment are marked to determine the liquid surface in the image to be identified and the boundary between the liquid surface and the environment.
[0092] S203 , determining an angle deviation parameter in the image to be identified according to the size and position of the liquid surface in the image to be identified and the boundary line between the liquid surface and the environment.
[0093] The angle deviation parameter in the image to be identified is determined by comparing the actual liquid surface and the size and position of the boundary line between the liquid surface and the environment with the size and position of the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified.
[0094] Since the photos taken by the camera are generally wide-angle photos, a relatively straight line will appear to be slightly bent or offset in the photo. Therefore, it is necessary to determine the angle deviation parameter in the image to be identified.
[0095] The method for determining the angle deviation parameter in the image to be identified is to use the actual position or size of a straight line or an area, compare it with the straight line or area in the photo, and then obtain the angle deviation parameter of the straight line or the angle deviation parameter of the area.
[0096] S103, obtaining the original image to be identified according to a preset restoration algorithm, the angle deviation parameter and the transformation of the image to be identified, and determining the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified.
[0097] like Figure 4 As shown, the steps of obtaining the original image to be identified include:
[0098] S301, using the getPerspectiveTransform function in OpenCV to process the pre-processed real-time image to obtain a perspective transformation matrix;
[0099] S302: Add the image to be recognized and the angle deviation parameter to the warpPerspective function in OpenCV to perform perspective transformation to obtain the original image to be recognized.
[0100] OpenCV is a cross-platform computer vision and machine learning software library released under the BSD license (open source), which can run on Linux, Windows, Android and MacOS operating systems. It is lightweight and efficient - consisting of a series of C functions and a small number of C++ classes, while providing interfaces for languages such as Python, Ruby, and MATLAB, and implementing many common algorithms in image processing and computer vision.
[0101] The original image to be identified is obtained by using a preset restoration algorithm, the angle deviation parameter and the transformation of the image to be identified, and the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified are determined.
[0102] Specifically, it is equivalent to the projection distance of light, that is, objects appear larger when they are closer and smaller when they are farther away. The observed volume of an object at different positions is different. We only need to determine the reduction or enlargement ratio of the observed object to restore the observed object that has been projected larger or smaller.
[0103] The step of determining the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified comprises:
[0104] The positions of the liquid surface and the boundary line between the liquid surface and the environment in the original image to be identified are determined according to the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified, the preset restoration algorithm, and the angle deviation parameter.
[0105] S104, calculating the liquid surface area according to the liquid surface size in the original image to be identified, and determining the actual area of the liquid surface in the reservoir area according to a preset ratio.
[0106] like Figure 5 As shown, the steps for determining the actual area of the liquid level in the reservoir area include:
[0107] S401, inputting the original image to be identified into a preset liquid surface area annotation model for annotation to obtain an annotated image with a target liquid surface detection area to be identified.
[0108] S402: Crop the labeled image with the target liquid level detection area to be identified to obtain an image to be identified.
[0109] S403: Calculate the liquid surface area in the annotated image according to the liquid surface size in the annotated image, and determine the actual area of the liquid surface in the reservoir area according to a preset ratio.
[0110] Specifically, in step S401, the processed real-time image is input into a preset liquid surface area annotation model for annotation, and obtaining an annotated image with a target liquid surface detection area to be identified includes the following steps:
[0111] Step S401 constructs a liquid surface area annotation model using the processed real-time image in the historical database;
[0112] The step S401 specifically includes the following steps:
[0113] Collect real-time images containing the target to be identified in the historical database, and perform super-resolution reconstruction and perspective transformation processing to obtain several processed real-time images;
[0114] Several processed real-time images in the historical database are collected as sample image sets, and the liquid level detection areas in the sample image sets are labeled to obtain the target area sample image set. The target area sample image set and the corresponding image annotations are input into the neural network for training to obtain the liquid level area annotation model.
[0115] The specific steps include:
[0116] The target area sample image set is divided into a training sample image set and a test sample image set;
[0117] The training sample image set and the corresponding image annotations are input into the neural network for training to obtain a liquid surface area annotation model;
[0118] The liquid surface area annotation model is tested using a test sample image set.
[0119] Among them, neural network is an algorithmic mathematical model that imitates the behavioral characteristics of animal neural networks and performs distributed parallel information processing. Neural networks rely on the complexity of the system to adjust the interconnected relationships between a large number of internal nodes to achieve the purpose of processing information, and have the ability of self-learning and self-adaptation. The liquid surface area annotation model obtained through neural network training can make image annotation more accurate.
[0120] The processed real-time image is input into the liquid surface area annotation model for annotation, and annotated image with the target liquid surface detection area to be identified is obtained.
[0121] Wherein, inputting the processed real-time image into the liquid surface area annotation model for annotation in S412 further includes the following steps:
[0122] When the labeled image with the target liquid level detection area to be identified is not successfully labeled, the liquid level area labeling model is updated according to the labeled image with the target liquid level detection area to be identified that is not successfully labeled to obtain an updated liquid level area labeling model.
[0123] Then, the liquid surface area in the annotated image is calculated according to the liquid surface size in the annotated image, and the actual area of the liquid surface in the reservoir area is determined according to a preset ratio.
[0124] S105, calculating the actual liquid volume of the liquid according to the preset model and the actual area of the liquid surface.
[0125] like Figure 6 As shown, the steps for determining the actual area of the liquid level in the reservoir area include:
[0126] S501. Determine the type of parameters required to calculate the volume of the liquid according to the shape of a preset model.
[0127] S502: Determine specific parameters corresponding to the parameter type according to the preset model, the parameter type and the actual area of the liquid level in the reservoir area.
[0128] S503. Calculate the actual liquid volume of the liquid according to the specific parameters, the actual area of the liquid surface in the reservoir area, and the volume calculation formula corresponding to the preset model.
[0129] According to the preset model of the inverted step platform, the parameter types of the liquid volume to be calculated are determined as follows: bottom area, liquid depth, and actual liquid surface area;
[0130] Determine the actual parameters of the bottom area according to the preset model of the inverted step platform, and determine the actual parameters of the liquid depth according to the actual area of the liquid surface;
[0131] The actual parameters of the bottom area, the actual parameters of the liquid depth, the actual area of the liquid surface, and the volume calculation formula of the terrace are determined according to the preset model to calculate the actual liquid volume of the liquid.
[0132] In practical applications, the type of preset model is determined according to actual needs, and the liquid volume only needs to be determined directly or indirectly based on the liquid surface area and the preset model.
[0133] The present application provides a method for calculating the volume of a storage area. The method includes obtaining an image to be identified, wherein the image to be identified includes at least: a liquid surface and a boundary line between the liquid surface and the environment; using a preset image recognition method to determine the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified, and determining the angle deviation parameter in the image to be identified according to the perspective transformation principle; obtaining the original image to be identified according to a preset restoration algorithm, the angle deviation parameter and the image to be identified, and determining the liquid surface and the boundary line between the liquid surface and the environment in the original image to be identified; calculating the liquid surface area according to the liquid surface size in the original image to be identified, and determining the actual area of the liquid surface in the storage area according to a preset ratio; calculating the actual liquid volume of the liquid according to a preset model and the actual area of the liquid surface. The present application can determine the liquid surface area only by the image recognition method, and then determine the liquid volume by the container model and the liquid surface area, which avoids the reference system and the inaccuracy of manual calculation.
[0134] like Figure 7 As shown, the present application provides a storage area volume calculation system, including: an acquisition module 31, a first determination module 32, a second determination module 33, a third determination module 34, and a calculation module 35; the acquisition module 31 is used to acquire an image to be identified, wherein the image to be identified at least includes: a liquid surface and a boundary line between the liquid surface and the environment; the first determination module 32 is used to determine the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified using a preset image recognition method, and determine the angle deviation parameter in the image to be identified according to the perspective transformation principle; the second determination module 33 is used to obtain the original image to be identified according to a preset restoration algorithm, the angle deviation parameter and the image to be identified, and determine the liquid surface and the boundary line between the liquid surface and the environment in the original image to be identified; the third determination module 34 is used to calculate the liquid surface area according to the liquid surface size in the original image to be identified, and determine the actual area of the liquid surface in the storage area according to a preset ratio; the calculation module 35 is used to calculate the actual liquid volume of the liquid according to a preset model and the actual area of the liquid surface.
[0135] Optionally, the acquisition module 31 is used to acquire an image to be identified that at least includes a liquid surface and a boundary line between the liquid surface and the environment through a preset image acquisition device. Optionally, the first determination module 32 is used to identify the image to be identified using a preset image feature recognition algorithm; determine the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified based on the feature matching result; and determine the angle deviation parameter in the image to be identified based on the size and position of the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified.
[0136] Optionally, the second determination module 6O3 is used to use the getPerspectiveTransform function in OpenCV to process the preprocessed real-time image to obtain a perspective transformation matrix; add the image to be identified and the angle deviation parameter to the warpPerspective function in OpenCV to perform perspective transformation to obtain the original image to be identified.
[0137] Optionally, the second determination module 34 is also used to determine the position of the liquid surface and the boundary line between the liquid surface and the environment in the original image to be identified based on the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified, the preset restoration algorithm, and the angle deviation parameter.
[0138] Optionally, the third determination module 35 is used to input the original image to be identified into a preset liquid level area annotation model for annotation, so as to obtain an annotated image with a target liquid level detection area to be identified; to crop the annotated image with the target liquid level detection area to be identified, so as to obtain an image to be identified; to calculate the liquid surface area in the annotated image according to the liquid surface size in the annotated image, and to determine the actual area of the liquid surface in the reservoir according to a preset ratio.
[0139] Optionally, the calculation module 35 is used to determine the parameter type required to calculate the volume of the liquid according to the shape of the preset model; determine the specific parameters corresponding to the parameter type according to the preset model, the parameter type and the actual area of the liquid surface in the reservoir area; calculate the actual liquid volume of the liquid according to the specific parameters, the actual area of the liquid surface in the reservoir area and the volume calculation formula corresponding to the preset model.
[0140] Optionally, the calculation module 35 is also used to determine the parameter types of the liquid volume to be calculated according to the preset model of the inverted step: bottom area, liquid depth, actual liquid surface area; determine the actual parameters of the bottom area according to the preset model of the inverted step, and determine the actual parameters of the liquid depth according to the actual liquid surface area; determine the actual parameters of the bottom area, the actual parameters of the liquid depth, the actual liquid surface area, and the volume calculation formula of the step according to the preset model, and calculate the actual liquid volume of the liquid.
[0141] like Figure 8-10 As shown, the liquid level measuring device comprises a floating body 20 and a support tube 21, wherein the lower end of the support tube 21 is fixedly connected to the floating body 20, and the upper end of the support tube 21 extends vertically upward;
[0142] The support tube 21 is sleeved with a plurality of induction coils 22 along the length direction, and the plurality of induction coils 22 are respectively connected to light emitting units 23;
[0143] A sliding rod 24 is movably connected in the support tube 21, a permanent magnet 25 is installed on the upper end of the sliding rod 24, and the lower end of the sliding rod 24 passes through the floating body 20 and extends downward;
[0144] A winch 26 is installed on the bottom surface of the floating body 20. A support shaft is fixedly passed through the center of the winch 26 and is rotatably connected to the floating body 20 through the support shaft. An anchor cable 27 is wound around the winch 26. One end of the anchor cable 27 is connected to the winch 26, and the other end is connected to an anchor head 28.
[0145] A driving wheel 29 is installed at one end of the support shaft, and a driven wheel 30 is rotatably connected to the floating body 20. The driven wheel 30 is located between the driving wheel 29 and the sliding rod 24, and the two sides are respectively connected to the driving wheel 29 and the sliding rod 24.
[0146] The floating body 20 serves as the installation base for the support pipe 21 and the winch 26. It floats on the water surface by its own buoyancy and can float up and down with the ripples of wind and waves on the water surface.
[0147] One end of the anchor cable 27 is connected to the anchor head 28, and the anchor head 28 falls into the water area and is fixed to the bottom of the water. When the winch 26 floats with the floating body 20, the winch 26 will be pulled by the anchor cable 27 to rotate, and the rotation of the winch 26 will drive the driving wheel 29 to rotate. The winch 26 can be provided with a coil spring or other similar elastic reset structure, that is, when the winch 26 is pulled by the anchor cable 27, it can rotate, and when the traction force of the anchor cable 27 disappears, it can be reset under the action of the elastic reset structure, so that the winch 26 can float with the floating body 20 and rotate back and forth continuously;
[0148] That is, the driving wheel 29 installed on the support shaft will also be in a state of continuous reciprocating rotation, which will drive the driven wheel 30 to be in a state of continuous reciprocating rotation. Since the driven wheel 30 is in transmission connection with the sliding rod 24, the transmission rod will be in a state of continuous reciprocating sliding in the support tube 21 driven by the driven wheel 30, which can drive the permanent magnet 25 to be in a state of continuous reciprocating motion. When the permanent magnet 25 moves, it will move relative to the corresponding induction coil 22. The induction coil 22 will cut the magnetic flux lines of the permanent magnet 25 to generate current inside, and act on the light-emitting unit 23, so that the corresponding light-emitting unit 23 works, so as to determine the length of the anchor cable 27, that is, the water level depth, according to the identification of different light-emitting units 23;
[0149] The elongation of the anchor cable 27 and the moving distance of the sliding rod 24 can be adjusted by the circumference ratio of the driving gear and the driven wheel 30 .
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.
Claims
1. A liquid level measuring device used in a reservoir area, characterized in that: It comprises a floating body and a supporting tube, wherein the lower end of the supporting tube is fixedly connected to the floating body and the upper end of the supporting tube extends vertically upward; The support tube is sleeved with a plurality of induction coils along the length direction, and the plurality of induction coils are respectively point-connected with light-emitting units; A sliding rod is movably connected inside the support tube, a permanent magnet is installed on the upper end of the sliding rod, and the lower end of the sliding rod passes through the floating body and extends downward; A winch is installed on the bottom surface of the floating body, a support shaft is fixedly passed through the center of the winch, and the winch is rotatably connected to the floating body through the support shaft, an anchor cable is wound around the winch, one end of the anchor cable is connected to the winch, and the other end is connected to the anchor head; A driving wheel is installed at one end of the support shaft, and a driven wheel is rotatably connected to the floating body. The driven wheel is located between the driving wheel and the sliding rod, and the two sides of the driven wheel are respectively connected to the driving wheel and the sliding rod.
2. A method for calculating the volume of a reservoir area, characterized in that: The steps include: Model the shape of the reservoir area and convert the shape of the reservoir area into a preset model of an equivalent inverted terrace structure; Setting a liquid level measuring device as claimed in claim 1, measuring the liquid level of the reservoir area by means of the liquid level measuring device, and obtaining the liquid level value of the reservoir area; Acquire an image to be identified, wherein the image to be identified at least includes: a liquid surface and a boundary line between the liquid surface and the environment; Determine the liquid surface and the boundary between the liquid surface and the environment in the image to be identified by using a preset image recognition method, and determine the angle deviation parameter in the image to be identified according to the perspective transformation principle; Obtaining the original image to be identified according to a preset restoration algorithm, the angle deviation parameter and the image to be identified, and determining the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified; The actual area of the liquid surface in the reservoir is calculated according to the size of the boundary line between the liquid surface and the environment in the original image to be identified; The actual area of the liquid surface in the reservoir area and the liquid level value in the reservoir area are substituted into the preset model to calculate the liquid volume in the reservoir area.
3. The method for calculating the reservoir volume according to claim 2, characterized in that: The step of acquiring the image to be identified includes: acquiring the image to be identified including at least the liquid surface and the boundary between the liquid surface and the environment by a preset image acquisition device.
4. The method for calculating the reservoir volume according to claim 3 is characterized in that: The steps of using a preset image recognition method to determine the liquid surface and the boundary between the liquid surface and the environment in the image to be recognized, and determining the angle deviation parameter in the image to be recognized according to the perspective transformation principle include: Using a preset image feature recognition algorithm to identify the image to be identified; Determine the liquid surface and the boundary between the liquid surface and the environment in the image to be identified according to the feature matching result; According to the size and position of the liquid surface in the image to be identified and the boundary line between the liquid surface and the environment, an angle deviation parameter in the image to be identified is determined.
5. The method for calculating the reservoir volume according to claim 4, characterized in that: The step of obtaining the original image to be identified according to the preset restoration algorithm, the angle deviation parameter and the image to be identified is as follows: Use the getPerspectiveTransform function in OpenCV to process the pre-processed real-time image and obtain the perspective transformation matrix; The image to be identified and the angle deviation parameter are added to the warpPerspective function in OpenCV to perform perspective transformation to obtain the original image to be identified.
6. The method for calculating the reservoir volume according to claim 5, characterized in that: The step of determining the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified comprises: The positions of the liquid surface and the boundary line between the liquid surface and the environment in the original image to be identified are determined according to the liquid surface and the boundary line between the liquid surface and the environment in the image to be identified, the preset restoration algorithm, and the angle deviation parameter.
7. The method for calculating the reservoir volume according to claim 6, characterized in that: The steps of calculating the liquid surface area according to the liquid surface size in the original image to be identified, and determining the actual area of the liquid surface in the reservoir area according to a preset ratio include: Inputting the original image to be identified into a preset liquid surface area annotation model for annotation, and obtaining an annotated image with a target liquid surface detection area to be identified; The labeled image with the target liquid level detection area to be identified is cropped to obtain the image to be identified; The liquid surface area in the annotated image is calculated according to the liquid surface size in the annotated image, and the actual area of the liquid surface in the reservoir area is determined according to a preset ratio.
8. The method for calculating the reservoir volume according to claim 7, characterized in that: The step of calculating the actual liquid volume of the liquid according to the preset model and the actual area of the liquid surface comprises: Determining the type of parameters required to calculate the volume of the liquid according to the shape of the preset model; Determine the specific parameters corresponding to the parameter type according to the preset model, the parameter type and the actual area of the liquid level in the reservoir area; The actual liquid volume of the liquid is calculated based on the specific parameters, the actual area of the liquid surface in the reservoir area and the volume calculation formula corresponding to the preset model.
9. The method for calculating the reservoir volume according to claim 8, characterized in that: The step of calculating the actual liquid volume of the liquid according to the preset model and the actual area of the liquid surface comprises: According to the preset model of the inverted step platform, the parameter types of the liquid volume to be calculated are determined as follows: bottom area, liquid depth, and actual liquid surface area; Determine the actual parameters of the bottom area according to the preset model of the inverted step platform, and determine the actual parameters of the liquid depth according to the actual area of the liquid surface; The actual parameters of the bottom area, the actual parameters of the liquid depth, the actual area of the liquid surface, and the volume calculation formula of the terrace are determined according to the preset model to calculate the actual liquid volume of the liquid.
10. A storage area volume calculation system, used to execute the storage area volume calculation method according to claim 9, characterized in that: include: An acquisition module, a first determination module, a second determination module, a third determination module, and a calculation module; The acquisition module is used to acquire the image to be identified, wherein the image to be identified at least includes: a liquid surface and a boundary line between the liquid surface and the environment; The first determination module is used to determine the liquid surface and the boundary between the liquid surface and the environment in the image to be identified by using a preset image recognition method, and to determine the angle deviation parameter in the image to be identified according to the perspective transformation principle; The second determination module is used to obtain the original image to be identified according to a preset restoration algorithm, the angle deviation parameter and the transformation of the image to be identified, and to determine the liquid surface and the boundary between the liquid surface and the environment in the original image to be identified; The third determination module is used to calculate the liquid surface area according to the liquid surface size in the original image to be identified, and determine the actual area of the liquid surface in the reservoir area according to a preset ratio; The calculation module is used to calculate the actual liquid volume of the liquid according to a preset model and the actual area of the liquid surface.
Citation Information
Cited By
Septic tank liquid level monitoring and early warning method and system based on image detection
CN122259004A