Machine vision-based liquid level monitoring system for flow batteries
By using a machine vision-based flow battery level monitoring system, and employing multi-stage image analysis and comprehensive evaluation methods, the accuracy and reliability issues of flow battery level monitoring have been resolved. This has enabled high-precision and intelligent level monitoring, reducing manual maintenance costs.
Patent Information
- Application Number
- CN202510774842.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2045-06-11
AI Technical Summary
Existing liquid level monitoring methods for flow batteries suffer from problems such as large measurement errors, inaccurate precision, and susceptibility to environmental interference. In particular, it is difficult to achieve high reliability and high precision liquid level monitoring under complex working conditions.
A machine vision-based liquid level monitoring system for flow batteries is adopted, which includes image acquisition, preprocessing, liquid level detection, and system control modules. Through multi-stage image analysis and comprehensive evaluation, combined with gradient calculation and threshold matching, accurate liquid level measurement is achieved.
It improves the accuracy of liquid level measurement and the intelligence level of the system, reduces manual maintenance costs, and enhances the system's response speed and automation capabilities.
Smart Images

Figure CN120445360B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of flow battery monitoring technology, and in particular to a flow battery level monitoring system based on machine vision. Background Technology
[0002] Accurate monitoring of the internal electrolyte level is crucial during the production, use, and maintenance of flow batteries. An excessively high electrolyte level can cause electrolyte overflow, corroding equipment and causing environmental pollution; an excessively low level can degrade battery performance and even lead to safety accidents.
[0003] Traditional liquid level monitoring methods, such as float-type, capacitive, and ultrasonic level sensors, have many limitations. Float-type level gauges rely on mechanical structures and are susceptible to electrolyte corrosion over long-term use, leading to increased measurement errors, and mechanical wear may cause malfunctions. Capacitive level sensors are easily affected by changes in ambient temperature, humidity, and electrolyte conductivity, resulting in inaccurate measurement results. Ultrasonic level gauges are prone to interference in complex electromagnetic environments, making it difficult to guarantee measurement accuracy.
[0004] With the development of machine vision technology, image analysis-based liquid level monitoring methods are gradually being applied in the industrial field.
[0005] Most existing machine vision-based liquid level monitoring solutions employ a single detection algorithm or a simple image processing workflow.
[0006] For example, some solutions rely only on simple edge detection algorithms such as the Sobel operator. Because they are sensitive to noise, they are prone to generating a large number of false edges in the complex working environment of flow batteries (such as image jitter caused by equipment vibration and image interference caused by electrolyte impurities), resulting in a large error in liquid level detection.
[0007] Some solutions, while employing relatively advanced algorithms such as the Canny operator, lack fusion analysis of the results from different algorithms, failing to fully leverage the advantages of each algorithm and making it difficult to adapt to the needs of accurate liquid level measurement under different working conditions.
[0008] Therefore, there is an urgent need for a high-reliability, high-precision liquid level monitoring system for flow batteries with intelligent interaction and efficient control capabilities to address the aforementioned problems. Summary of the Invention
[0009] The purpose of this invention is to provide a liquid level monitoring system for flow batteries based on machine vision in order to solve the above-mentioned problems.
[0010] To achieve the above objectives, the present invention adopts the following technical solution:
[0011] A machine vision-based liquid level monitoring system for flow batteries includes:
[0012] Image acquisition module: Acquires image information of the liquid level in the flow battery and preprocesses it;
[0013] Liquid level detection module: Analyzes the liquid level image of the flow battery to obtain the analytical evaluation liquid level of the flow battery;
[0014] Display and Interaction Module: Outputs and presents the liquid level detection results;
[0015] System control module: Controls the devices in the image acquisition module and coordinates the workflow of each module in the system.
[0016] Preferably, acquiring the liquid level image information of the flow battery includes:
[0017] Images of the liquid level in a flow battery are captured using an industrial camera.
[0018] Choose the appropriate lens based on the camera model, shooting distance, and required field of view;
[0019] Provide ample lighting for the shoot.
[0020] Preferably, the preprocessing of the acquired image includes:
[0021] Remove noise from the image;
[0022] Image features are enhanced by adjusting contrast and brightness.
[0023] Convert a color or grayscale image into a binary image, dividing the pixels in the image into two categories: foreground and background.
[0024] Preferably, the analysis of the liquid level image based on the flow battery to obtain the analytical evaluation liquid level of the flow battery specifically includes:
[0025] The first and second evaluation liquid levels of the flow battery were obtained respectively.
[0026] The analytical evaluation level is obtained by comprehensively analyzing the first evaluation liquid level and the second evaluation liquid level.
[0027] Preferably, the process of obtaining the first evaluation liquid level includes:
[0028] Use an image processing library to read the image file containing the liquid surface and convert it to a grayscale image;
[0029] Perform a horizontal convolution operation on the grayscale image to obtain the horizontal convolution kernel:
[0030] Perform a vertical convolution operation on the grayscale image to obtain the vertical convolution kernel:
[0031] Calculate the gradient magnitude and direction based on the horizontal and vertical gradients;
[0032] This includes calculating the gradient magnitude based on the horizontal and vertical gradients; and calculating the gradient direction using the arctangent function.
[0033] A preset amplitude threshold is used to compare the gradient amplitude with the threshold and then extract the liquid surface contour on the binarized edge image: each contour consists of a series of points;
[0034] Contours related to the liquid surface are selected based on their position, size, and shape characteristics.
[0035] Calculate the contour features, including perimeter, area, and centroid;
[0036] Obtain the cross-sectional area of the container, extract the area enclosed by the liquid surface contour through contour extraction, obtain the liquid surface height data according to the proportional relationship, and record it as the first evaluation liquid surface;
[0037] The first liquid level deviation is obtained by calculating the difference between the obtained liquid level height data and the scale value in the image of the container.
[0038] Preferably, the process of obtaining the second evaluation liquid level includes:
[0039] Read the image and convert it to grayscale;
[0040] A Gaussian kernel is constructed using a two-dimensional Gaussian function, and a convolution operation is performed on the grayscale image to remove noise;
[0041] Obtain the gradient magnitude and direction obtained during the calculation of the first evaluation liquid level;
[0042] Iterate through each pixel in the image. For each pixel, determine the gradient magnitude of its neighboring pixels in the gradient direction based on its gradient direction.
[0043] If the gradient magnitude of the pixel is not a local maximum, set its value to 0; otherwise, retain its original value.
[0044] Setting high and low thresholds, the image after non-maximum suppression is processed, including:
[0045] Pixels with gradient magnitudes greater than a high threshold are identified as strong edge pixels;
[0046] Pixels with gradient magnitudes less than the low threshold are excluded;
[0047] Pixels with gradient magnitudes between the high and low thresholds are retained as weak edge pixels if they are connected to strong edge pixels; otherwise, they are excluded.
[0048] Extract the contours of the image after double thresholding;
[0049] Based on the liquid level height calculation process in the first evaluation liquid level acquisition process, the contour is screened, the contour features are calculated, and the liquid level height is calculated according to the shape of the container; the obtained liquid level height is recorded as the second evaluation liquid level, and the difference between the obtained liquid level height data and the scale value in the container image is calculated to obtain the second liquid level deviation.
[0050] Preferably, the step of obtaining the analytical evaluation liquid level by comprehensively analyzing the first evaluation liquid level and the second evaluation liquid level includes:
[0051] The average of the first and second assessment liquid levels is used as the base liquid level.
[0052] After normalizing the first liquid level deviation and the second liquid level deviation, the first liquid level deviation and the second liquid level deviation are respectively used as the legs of the isosceles right triangle, and the remaining sides are connected to obtain two isosceles right triangles. The areas of the two isosceles right triangles are calculated respectively, and their area difference is calculated to obtain the difference coefficient.
[0053] Three threshold value ranges are preset, and each threshold value range corresponds to an additional liquid level value. The difference coefficient is matched with the three threshold value ranges to obtain the additional liquid level value corresponding to the difference coefficient.
[0054] The sum of the base liquid level and the additional liquid level value is calculated to obtain the analytical evaluation liquid level.
[0055] Preferably, the display and interaction module specifically includes:
[0056] Liquid level display unit:
[0057] Displays the current liquid level's height and capacity information in real-time numerical form;
[0058] By drawing graphs related to liquid level, the proportional relationship between liquid level and other parameters can be shown;
[0059] The trend of liquid level change over time is displayed in the form of a curve;
[0060] Parameter setting unit:
[0061] Used for users to set camera resolution, frame rate, exposure time, and gain parameters;
[0062] Based on the actual working requirements of the flow battery, set the upper and lower alarm thresholds for the liquid level;
[0063] Operation control unit:
[0064] Users can effectively control the image acquisition, processing, and analysis process through the user interface.
[0065] Preferably, the system control module specifically includes:
[0066] Hardware control unit:
[0067] The system communicates with the hardware devices via an interface, sending start and stop commands to the camera and light source. When the system starts working, the hardware control unit first sends a start signal to the camera and light source to put them into working state. When the system stops working, it sends a stop signal to turn off the camera and light source.
[0068] Based on the camera shooting parameters and light source brightness parameters set by the user in the parameter setting unit, the corresponding control commands are sent to the hardware device.
[0069] Process control unit:
[0070] At preset time intervals, acquisition commands are sent to the image acquisition module to trigger the camera to acquire images of the liquid level of the flow battery.
[0071] The acquired images are preprocessed by filtering, enhancement, and binarization. Then, the liquid level edge and contour information are extracted from the preprocessed images, the liquid level height is calculated, and finally the liquid level data is stored and analyzed.
[0072] Throughout the entire process, the process control unit monitors the working status of each module in real time.
[0073] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0074] 1. This invention uses a rapid gradient calculation method to initially locate the liquid level contour on the first evaluation liquid surface, and the second evaluation liquid surface uses multi-stage processing to accurately extract the edge, with the two complementing each other; in the comprehensive analysis stage, through a unique mean calculation method, a geometric model constructed based on the liquid level deviation and the calculation of the difference coefficient, combined with a preset threshold to match additional liquid level values, it can effectively eliminate the error of a single detection method and correct the detection deviation caused by environmental interference, image noise and other factors.
[0075] 2. This invention integrates a complete display and interaction module and a system control module, achieving a high degree of flexibility in human-computer interaction and intelligent system operation. The control module, through the collaborative work of the hardware control unit and the process control unit, achieves precise control of hardware devices and intelligent scheduling of the workflow of each module. In the event of an anomaly, it can automatically adjust the working strategy and provide timely feedback. Compared with traditional monitoring systems, the response speed is improved, effectively reducing manual maintenance costs and improving the automation and intelligence level of flow battery monitoring. Attached Figure Description
[0076] Further details, features, and advantages of this application are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:
[0077] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0078] Several embodiments of this application will now be described in more detail with reference to the accompanying drawings to enable those skilled in the art to implement this application. This application may be embodied in many different forms and for various purposes and should not be limited to the embodiments set forth herein. These embodiments are provided to make this application thorough and complete, and to fully convey the scope of this application to those skilled in the art. The embodiments described do not limit this application.
[0079] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It will be further understood that terms such as those defined in commonly used dictionaries shall be interpreted as having a meaning consistent with their meaning in the relevant field and / or the context of this specification, and shall not be interpreted in an idealized or overly formal sense unless expressly defined herein.
[0080] Please see Figure 1 As shown, the present invention provides a technical solution:
[0081] A machine vision-based liquid level monitoring system for flow batteries includes:
[0082] Image acquisition module: Acquires image information of the liquid level in the flow battery and preprocesses it;
[0083] include:
[0084] Images of the liquid level in a flow battery are captured using an industrial camera.
[0085] Choose the appropriate camera based on the specific application scenario and requirements, such as parameters like resolution, frame rate, and ISO.
[0086] For example, for liquid level measurement with high accuracy requirements, a high-resolution camera can be selected; for fast-flowing liquid batteries, a high frame rate camera is needed to capture the instantaneous liquid level status.
[0087] Choose the appropriate lens based on the camera model, shooting distance, and field of view requirements, such as a prime lens or a zoom lens. For example, when monitoring the liquid level of a flow battery in different locations, a zoom lens can be used to flexibly adjust the shooting range.
[0088] Provide sufficient light for shooting to ensure image quality;
[0089] There are various types of light sources, such as white light sources and infrared light sources. For flow battery level monitoring, white light sources are typically used to provide clear images. At the same time, it is necessary to select an appropriate light source arrangement method based on the shooting environment and the characteristics of the object's surface, such as backlighting or front lighting. Backlighting is suitable for highlighting the outline of the liquid level, facilitating level detection and analysis.
[0090] The acquired image is preprocessed, including:
[0091] Remove noise from an image to improve its quality;
[0092] Common filtering methods include mean filtering, median filtering, and Gaussian filtering; for example, Gaussian filtering can effectively remove Gaussian noise from an image, making the image smoother.
[0093] By adjusting the contrast and brightness of an image, its features can be enhanced, making subsequent processing and analysis easier. For example, histogram equalization can enhance the contrast of an image, making the difference between the liquid level and the background more obvious.
[0094] Converting a color or grayscale image to a binary image involves dividing the pixels in the image into two categories: foreground and background. Common binarization methods include thresholding, which includes global thresholding and local thresholding. Global thresholding is suitable for situations where the grayscale difference between the liquid level and the background is large and relatively uniform; local thresholding is suitable for situations where the grayscale difference between the liquid level and the background varies in different areas.
[0095] Liquid level detection module: Analyzes the liquid level image of the flow battery to obtain the analytical evaluation liquid level of the flow battery;
[0096] Specifically, it includes:
[0097] The first and second evaluation liquid levels of the flow battery were obtained respectively.
[0098] The analytical evaluation level is obtained by comprehensively analyzing the first evaluation liquid level and the second evaluation liquid level.
[0099] The process of obtaining the first assessment liquid level includes:
[0100] Use an image processing library to read the image file containing the liquid surface and convert it to a grayscale image;
[0101] A color image consists of three channels: red (R), green (G), and blue (B). The formula used to convert it to a grayscale image is: ;
[0102] Perform a horizontal convolution operation on the grayscale image to obtain the horizontal convolution kernel:
[0103] Let the image be The convolution result is:
[0104] in It is the element at the corresponding position in the horizontal convolution kernel;
[0105] Perform a vertical convolution operation on the grayscale image to obtain the vertical convolution kernel:
[0106] The convolution result is: ;
[0107] in It is the element at the corresponding position in the vertical convolution kernel;
[0108] Calculate the gradient magnitude and direction based on the horizontal and vertical gradients;
[0109] This includes calculating the gradient magnitude based on the horizontal and vertical gradients; and calculating the gradient direction using the arctangent function.
[0110] The horizontal gradient is ;
[0111] Vertical gradient is ;
[0112] The gradient magnitude is: ;
[0113] gradient direction ;
[0114] A preset amplitude threshold is used to compare the gradient amplitude with the threshold and then extract the liquid surface contour on the binarized edge image: each contour consists of a series of points;
[0115] Compare the gradient magnitude with the threshold:
[0116] ;
[0117] in This is the binarized edge image, where 255 represents edge pixels and 0 represents non-edge pixels;
[0118] Contours related to the liquid surface are selected based on their position, size, and shape characteristics.
[0119] For example, filtering can be done by judging the centroid position of the contour and whether the contour area is within a reasonable range;
[0120] Calculate the contour features, including perimeter, area, and centroid;
[0121] Obtain the cross-sectional area of the container, extract the area enclosed by the liquid surface contour through contour extraction, obtain the liquid surface height data according to the proportional relationship, and record it as the first evaluation liquid surface;
[0122] The first liquid level deviation is obtained by calculating the difference between the obtained liquid level height data and the scale value in the image of the container.
[0123] The process of obtaining the second assessment liquid level includes:
[0124] Read the image and convert it to grayscale;
[0125] A Gaussian kernel is constructed using a two-dimensional Gaussian function, and a convolution operation is performed on the grayscale image to remove noise;
[0126] Obtain the gradient magnitude and direction obtained during the calculation of the first evaluation liquid level;
[0127] Iterate through each pixel in the image. For each pixel, determine the gradient magnitude of its neighboring pixels in the gradient direction based on its gradient direction.
[0128] If the gradient magnitude of the pixel is not a local maximum, set its value to 0; otherwise, retain its original value.
[0129] Setting high and low thresholds, the image after non-maximum suppression is processed, including:
[0130] Pixels with gradient magnitudes greater than a high threshold are identified as strong edge pixels;
[0131] Pixels with gradient magnitudes less than the low threshold are excluded;
[0132] Pixels with gradient magnitudes between the high and low thresholds are retained as weak edge pixels if they are connected to strong edge pixels; otherwise, they are excluded.
[0133] Extract the contours of the image after double thresholding;
[0134] Based on the liquid level height calculation process in the first evaluation liquid level acquisition process, the contour is screened, the contour features are calculated, and the liquid level height is calculated according to the shape of the container; the obtained liquid level height is recorded as the second evaluation liquid level, and the difference between the obtained liquid level height data and the scale value in the container image is calculated to obtain the second liquid level deviation;
[0135] The analytical evaluation level is obtained by comprehensively analyzing the first and second evaluation liquid levels, including:
[0136] The average of the first and second assessment liquid levels is used as the base liquid level.
[0137] After normalizing the first liquid level deviation and the second liquid level deviation, the first liquid level deviation and the second liquid level deviation are respectively used as the legs of the isosceles right triangle, and the remaining sides are connected to obtain two isosceles right triangles. The areas of the two isosceles right triangles are calculated respectively, and their area difference is calculated to obtain the difference coefficient.
[0138] Three threshold value ranges are preset, and each threshold value range corresponds to an additional liquid level value. The difference coefficient is matched with the three threshold value ranges to obtain the additional liquid level value corresponding to the difference coefficient.
[0139] The sum of the base liquid level and the additional liquid level value is calculated to obtain the analytical evaluation liquid level;
[0140] Display and Interaction Module: Outputs and presents the liquid level detection results;
[0141] Specifically, it includes;
[0142] Liquid level display unit:
[0143] It displays the current liquid level and capacity information in real time in numerical form; the display is clear and accurate, allowing users to quickly obtain the actual current liquid level.
[0144] By drawing graphs related to liquid level, the proportional relationship between liquid level and other parameters can be shown;
[0145] For example, bar charts and pie charts can dynamically change their color, size, and other attributes according to different liquid levels, so that users can more intuitively judge whether the liquid level is within the normal range.
[0146] The trend of liquid level change over time is displayed in the form of a curve;
[0147] Users can analyze the trend of the curve to identify abnormal fluctuations in the liquid level. For example, a sharp rise or fall in the curve may indicate a leak or abnormal filling of the flow battery.
[0148] Parameter setting unit:
[0149] Used for users to set camera resolution, frame rate, exposure time, and gain parameters;
[0150] For example, when the ambient light around the flow battery is low, users can appropriately increase the camera's exposure time and gain to obtain a clear image of the liquid level; in scenarios where it is necessary to quickly capture changes in liquid level, the camera's frame rate can be increased.
[0151] Based on the actual working requirements of the flow battery, set the upper and lower alarm thresholds for the liquid level;
[0152] When the liquid level exceeds the set threshold range, the system will automatically trigger an alarm mechanism to promptly notify the user to take appropriate measures.
[0153] Operation control unit:
[0154] Users can effectively control the image acquisition, processing, and analysis process through the user interface;
[0155] Start Acquisition: When the user needs to start the liquid level monitoring system, click the "Start Acquisition" button on the operation interface. The system will trigger the image acquisition module to start working and acquire liquid level images of the flow battery according to the set parameters and time intervals.
[0156] Stop Acquisition: When liquid level monitoring is no longer required, the user can click the "Stop Acquisition" button. The system will immediately stop image acquisition, as well as subsequent image preprocessing, liquid level detection, and data processing, to save system resources.
[0157] Manually triggered liquid level detection: In addition to automatic liquid level detection at predetermined time intervals, users can also manually trigger the liquid level detection operation according to actual conditions. For example, after performing certain special operations, users can immediately manually trigger a liquid level detection to obtain the latest liquid level information;
[0158] System control module: controls the devices in the image acquisition module and coordinates the workflow of each module in the system;
[0159] Specifically, it includes;
[0160] Hardware control unit:
[0161] The system communicates with the hardware devices via an interface, sending start and stop commands to the camera and light source. When the system starts working, the hardware control unit first sends a start signal to the camera and light source to put them into working state. When the system stops working, it sends a stop signal to turn off the camera and light source.
[0162] Based on the camera shooting parameters and light source brightness parameters set by the user in the parameter setting unit, the corresponding control commands are sent to the hardware device.
[0163] For example, user-set camera resolution, exposure time, and other parameters can be transmitted to the camera via a communication interface, enabling it to acquire images according to the new parameters; and the brightness and color of the light source can be adjusted according to the needs of ambient light and liquid level detection.
[0164] Process control unit:
[0165] At preset time intervals, acquisition commands are sent to the image acquisition module to trigger the camera to acquire images of the liquid level of the flow battery.
[0166] For example, images are captured every minute to monitor changes in the liquid level in real time;
[0167] The acquired images are preprocessed by filtering, enhancement, and binarization. Then, the liquid level edge and contour information are extracted from the preprocessed images, the liquid level height is calculated, and finally the liquid level data is stored and analyzed.
[0168] Throughout the entire process execution, the process control unit monitors the working status of each module in real time;
[0169] If a module malfunctions, such as camera acquisition failure or abnormal liquid level detection results, the process control unit will take appropriate measures in a timely manner, such as re-triggering image acquisition or adjusting preprocessing parameters, and will also provide feedback on the abnormality to the user so that the user can handle it promptly.
[0170] The above formulas are derived from software simulations using a large amount of data and are selected to be close to the actual values. The influence weight factors and specific coefficient values in the formulas are set by those skilled in the art based on the actual situation and can be adjusted and modified in the future.
[0171] The above description of the embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A machine vision-based liquid level monitoring system for flow batteries, characterized in that, include: Image acquisition module: Acquires image information of the liquid level in the flow battery and preprocesses it; Liquid level detection module: Analyzes liquid level images from the flow battery to obtain an analytical assessment of the flow battery's liquid level, specifically including: The first and second evaluation liquid levels of the flow battery were obtained respectively. The analytical evaluation level is obtained by comprehensively analyzing the first evaluation liquid level and the second evaluation liquid level. Display and Interaction Module: Outputs and presents the liquid level detection results; System control module: Controls the devices in the image acquisition module and coordinates the workflow of each module in the system.
2. The liquid level monitoring system for a flow battery based on machine vision according to claim 1, characterized in that, The acquisition of liquid level image information of the flow battery includes: Images of the liquid level in a flow battery are captured using an industrial camera. Choose the appropriate lens based on the camera model, shooting distance, and required field of view; Provide ample lighting for the shoot.
3. The liquid level monitoring system for a flow battery based on machine vision according to claim 2, characterized in that, The acquired image is preprocessed, including: Remove noise from the image; Image features are enhanced by adjusting contrast and brightness. Convert a color or grayscale image into a binary image, dividing the pixels in the image into two categories: foreground and background.
4. The liquid level monitoring system for a flow battery based on machine vision according to claim 1, characterized in that, The process of obtaining the first assessment liquid level includes: Use an image processing library to read the image file containing the liquid surface and convert it to a grayscale image; Perform a horizontal convolution operation on the grayscale image to obtain the horizontal convolution kernel: Perform a vertical convolution operation on the grayscale image to obtain the vertical convolution kernel: Calculate the gradient magnitude and direction based on the horizontal and vertical gradients; This includes calculating the gradient magnitude based on the horizontal and vertical gradients; and calculating the gradient direction using the arctangent function. A preset amplitude threshold is used to compare the gradient amplitude with the threshold and then extract the liquid surface contour from the binarized edge image. Each contour consists of a series of points. Contours related to the liquid surface are selected based on their position, size, and shape characteristics. Calculate the contour features, including perimeter, area, and centroid; Obtain the cross-sectional area of the container, extract the area enclosed by the liquid surface contour through contour extraction, obtain the liquid surface height data according to the proportional relationship, and record it as the first evaluation liquid surface; The first liquid level deviation is obtained by calculating the difference between the obtained liquid level height data and the scale value in the image of the container.
5. The liquid level monitoring system for a flow battery based on machine vision according to claim 4, characterized in that, The process of obtaining the second assessment liquid level includes: Read the image and convert it to grayscale; A Gaussian kernel is constructed using a two-dimensional Gaussian function, and a convolution operation is performed on the grayscale image to remove noise; Obtain the gradient magnitude and direction obtained during the calculation of the first evaluation liquid level; Iterate through each pixel in the image. For each pixel, determine the gradient magnitude of its neighboring pixels in the gradient direction based on its gradient direction. If the gradient magnitude of the pixel is not a local maximum, set its value to 0; otherwise, retain its original value. Setting high and low thresholds, the image after non-maximum suppression is processed, including: Pixels with gradient magnitudes greater than a high threshold are identified as strong edge pixels; Pixels with gradient magnitudes less than the low threshold are excluded; Pixels with gradient magnitudes between the high and low thresholds are retained as weak edge pixels if they are connected to strong edge pixels; otherwise, they are excluded. Extract the contours of the image after double thresholding; Based on the liquid level height calculation process in the first evaluation liquid level acquisition process, the contour is screened, the contour features are calculated, and the liquid level height is calculated according to the shape of the container; the obtained liquid level height is recorded as the second evaluation liquid level, and the difference between the obtained liquid level height data and the scale value in the container image is calculated to obtain the second liquid level deviation.
6. The liquid level monitoring system for a flow battery based on machine vision according to claim 5, characterized in that, The analytical evaluation level is obtained by comprehensively analyzing the first and second evaluation liquid levels, including: The average of the first and second assessment liquid levels is used as the base liquid level. After normalizing the first liquid level deviation and the second liquid level deviation, the first liquid level deviation and the second liquid level deviation are respectively used as the legs of the isosceles right triangle, and the remaining sides are connected to obtain two isosceles right triangles. The areas of the two isosceles right triangles are calculated respectively, and their area difference is calculated to obtain the difference coefficient. Three threshold value ranges are preset, and each threshold value range corresponds to an additional liquid level value. The difference coefficient is matched with the three threshold value ranges to obtain the additional liquid level value corresponding to the difference coefficient. The sum of the base liquid level and the additional liquid level value is calculated to obtain the analytical evaluation liquid level.
7. The liquid level monitoring system for a flow battery based on machine vision according to claim 1, characterized in that, The display and interaction module specifically includes; Liquid level display unit: Displays the current liquid level's height and capacity information in real-time numerical form; By drawing graphs related to liquid level, the proportional relationship between liquid level and other parameters can be shown; The trend of liquid level change over time is displayed in the form of a curve; Parameter setting unit: Used for users to set camera resolution, frame rate, exposure time, and gain parameters; Based on the actual working requirements of the flow battery, set the upper and lower alarm thresholds for the liquid level; Operation control unit: Users can effectively control the image acquisition, processing, and analysis process through the user interface.
8. The liquid level monitoring system for a flow battery based on machine vision according to claim 1, characterized in that, The system control module specifically includes: Hardware control unit: The system communicates with the hardware devices via an interface, sending start and stop commands to the camera and light source. When the system starts working, the hardware control unit first sends a start signal to the camera and light source to put them into working state. When the system stops working, it sends a stop signal to turn off the camera and light source. Based on the camera shooting parameters and light source brightness parameters set by the user in the parameter setting unit, the corresponding control commands are sent to the hardware device. Process control unit: At preset time intervals, acquisition commands are sent to the image acquisition module to trigger the camera to acquire images of the liquid level of the flow battery. The acquired images are preprocessed by filtering, enhancement, and binarization. Then, the liquid level edge and contour information are extracted from the preprocessed images, the liquid level height is calculated, and finally the liquid level data is stored and analyzed. Throughout the entire process, the process control unit monitors the working status of each module in real time.
Citation Information
Patent Citations
Method and system for detecting liquid level in liquid storage bottle
CN112508852A