Method and system for monitoring liquid level of chemical storage tank in real time based on image recognition
Through intelligent lighting environment judgment, image enhancement and correction technology, combined with multi-image fusion and dynamic weight update, the problem of inaccurate liquid level monitoring in the existing technology in complex lighting environments is solved, and high-precision and high-reliability liquid level monitoring is achieved.
Patent Information
- Application Number
- CN202510632075.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-16
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing chemical storage tank level monitoring method based on image recognition is difficult to accurately identify the liquid level height in complex lighting environments, and the lack of an effective dynamic adjustment mechanism, resulting in deviations in the liquid level monitoring results.
Intelligent lighting environment judgment, histogram equalization and CLAHE technology are used to enhance dark environment images, and the strong-light reflective images are corrected based on threshold segmentation method, and multiple liquid level images are acquired through a multi-angle image acquisition device to perform feature matching and dynamic weight updates to achieve high-precision fusion of liquid level information.
High-precision liquid level monitoring under complex lighting conditions is achieved, which improves the accuracy and reliability of monitoring, and avoids liquid level recognition errors caused by interference from single image.
Smart Images

Figure CN120147975A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chemical production process monitoring, and particularly to a real-time monitoring method and system for the liquid level of chemical storage tanks based on image recognition. Background Technique
[0002] In chemical production, the accurate and real-time monitoring of the liquid level of storage tanks is a key link to ensure production safety and optimize the production process. At present, although there are various liquid level monitoring technologies, there are still many technical problems to be solved in the field of monitoring methods based on image recognition.
[0003] Traditional liquid level monitoring means based on image recognition are unable to cope when facing complex lighting environments. Under direct strong light, the liquid level image of the storage tank is extremely prone to reflection, resulting in blurred liquid level boundaries and making it difficult to accurately identify the liquid level height; in the case of relatively dim light, the overall image is dim, and a large amount of liquid level detail information is lost, seriously affecting the accuracy and reliability of liquid level monitoring. Moreover, the existing monitoring methods lack an effective dynamic adjustment mechanism and are difficult to reasonably integrate the information of multiple images according to the change trend of the liquid level and the real-time fluctuation of the image quality, resulting in large deviations in the liquid level monitoring results when a single image is interfered.
[0004] Therefore, a real-time monitoring method and system for the liquid level of chemical storage tanks based on image recognition are proposed. Through technical means, it can accurately adapt to various lighting conditions, flexibly respond to different storage tanks, effectively integrate the information of multiple images, and achieve high-precision and high-reliability real-time monitoring of the liquid level of chemical storage tanks. Summary of the Invention
[0005] Technical problems to be solved: Unable to cope when facing complex lighting environments. Under direct strong light, the liquid level image of the storage tank is extremely prone to reflection, resulting in blurred liquid level boundaries and making it difficult to accurately identify the liquid level height; in the case of relatively dim light, the overall image is dim, and a large amount of liquid level detail information is lost, seriously affecting the accuracy and reliability of liquid level monitoring; lacking an effective dynamic adjustment mechanism and being difficult to reasonably integrate the information of multiple images according to the change trend of the liquid level and the real-time fluctuation of the image quality, resulting in large deviations in the liquid level monitoring results when a single image is interfered.
[0006] Technical solutions: To achieve the above solution objectives, the present invention provides the following technical solutions: A real-time monitoring method and system for the liquid level of chemical storage tanks based on image recognition, applied to different lighting condition interference scenarios, including the following steps: S1 Intelligent judgment of lighting environment: Calculate the average brightness of the collected liquid level image, construct a brightness histogram, and use big data analysis and machine learning technologies to set a threshold for distinguishing strong and weak lighting, so as to determine whether the image is in a relatively dim light, strong light reflection, or normal lighting environment.
[0007] S2 Optimization of Image Enhancement for Dim Light: When it is determined that the environment is dim, a technique combining histogram equalization and contrast-limited adaptive histogram equalization is used to enhance the image. Among them, histogram equalization introduces a local area adaptive adjustment mechanism to specially process small blocks in the liquid level edge and surrounding areas with rich textures.
[0008] S3 Correction of Glare Image: When it is determined that the environment is glare, a threshold-based segmentation method is used to correct the image. The glare area and non-glare area are processed separately, and finally the two processed areas are recombined through weighted average fusion.
[0009] S4 Liquid Level Recognition by Multi-Image Fusion: Multiple liquid level images are obtained through a multi-angle image acquisition device, and image preprocessing and feature matching are performed in sequence. Weights are determined according to image quality evaluation indicators and liquid level information is fused. At the same time, a dynamic weight update mechanism is used to optimize the fusion effect.
[0010] Preferably, the average brightness is calculated by traversing each pixel point in the image one by one, obtaining its brightness value and accumulating them, and finally dividing by the total number of pixel points; the brightness histogram is constructed by dividing the brightness range of the image into several small intervals, traversing all pixel points in the image, counting the number of pixel points in each interval, and then calculating the proportion of this number to the total number of pixel points.
[0011] Preferably, in the innovative histogram equalization, when calculating the cumulative distribution function, the probability of its appearance in the image is determined according to the ratio of the number of pixel points at each gray level to the total number of pixel points, and a local area adaptive adjustment mechanism centered on pixel points is introduced during the mapping transformation.
[0012] Preferably, in the contrast-limited adaptive histogram equalization operation, the image is divided into multiple non-overlapping 8×8 pixel small blocks, a contrast limit threshold is preset, a more refined adjustment strategy is adopted for the small blocks in the liquid level edge and surrounding areas with rich textures, and finally the processed small blocks are spliced back into a complete image through bilinear interpolation.
[0013] Preferably, in the threshold-based segmentation operation, based on the high brightness feature of the glare area, a brightness threshold is set by analyzing a large number of liquid level image samples with glare. Parallel computing technology is used to improve the segmentation efficiency when traversing image pixel points, and the threshold is dynamically adjusted by constructing a glare area feature database.
[0014] Preferably, the image preprocessing includes median filtering and Gaussian filtering, and the parameters of median filtering and Gaussian filtering are adaptively adjusted according to the noise level and clarity indicators of the image using an image quality evaluation algorithm.
[0015] Preferably, the feature matching adopts the Scale-Invariant Feature Transform (SIFT) algorithm. It performs matching by constructing a scale space, generating a Difference of Gaussian (DOG) pyramid, and generating feature descriptors. It uses a KD-tree-based data structure for rapid retrieval of feature descriptors and proposes an improved feature point screening strategy.
[0016] Preferably, in the liquid level information fusion, the weights are determined according to the clarity and noise level of the images, and a dynamic weight update mechanism is adopted. When the liquid level changes rapidly, the weights of images with high clarity and low noise are increased; when the image quality suddenly drops at a certain moment, the weights are adjusted accordingly according to the degree and cause of the drop to reduce the impact of the image on the liquid level information fusion.
[0017] A real-time monitoring method and system for the liquid level of a chemical storage tank based on image recognition. The system is applied to the above real-time monitoring method and system for the liquid level of a chemical storage tank based on image recognition. The system includes the following modules: Data acquisition module: It consists of a multi-angle image acquisition device. This device reasonably arranges multiple image acquisition devices around the chemical storage tank to ensure that liquid level images can be obtained from different angles, providing rich data for subsequent multi-image fusion.
[0018] Image processing module: It undertakes the key tasks of preprocessing the acquired liquid level images, judging the illumination environment, enhancing images with low light, and correcting images with strong light and reflection.
[0019] Liquid level recognition module: First, it performs median filtering and Gaussian filtering on the preprocessed images to remove noise. Then, it constructs a scale space, generates a DOG pyramid, and generates feature descriptors through the SIFT algorithm for feature matching. It screens key feature points according to the prior information of the position of the liquid level in the image to improve the matching speed and accuracy. It determines the weights of each image based on the image quality evaluation index, fuses the liquid level information, and adjusts the weights in real time through the dynamic weight update mechanism.
[0020] User interaction module: It presents the liquid level monitoring results in an intuitive graphical interface, including information such as the real-time liquid level height and the liquid level change trend curve; it supports users to set parameters, including adjusting the illumination threshold and optimizing the filtering parameters. At the same time, it has an alarm function to notify the operator in a timely manner when the liquid level fluctuates abnormally and the image quality drops severely.
[0021] Preferably, the system uses average brightness calculation, brightness histogram construction, big data analysis, and machine learning techniques to set the illumination threshold and judge the illumination environment; it uses a method combining histogram equalization and Contrast Limited Adaptive Histogram Equalization (CLAHE) to enhance images with low light; it uses a threshold-based segmentation method and the Shape from Shading (SFS) model to correct images with strong light and reflection to improve the image quality.
[0022] Beneficial effects: Compared with the prior art, the present invention provides a real-time monitoring method and system for the liquid level of chemical storage tanks based on image recognition, having the following beneficial effects: 1. The real-time monitoring method for the liquid level of chemical storage tanks based on image recognition generates a light threshold through big data and machine learning, can accurately adapt to complex lighting, breaks through the limitation of setting the threshold relying on experience traditionally. In terms of image enhancement and correction, for darker light, an innovative local region adaptive histogram equalization and optimized CLAHE technology are adopted, and under strong light and specular reflection, a threshold segmentation for constructing a feature database and an SFS model with dynamic adjustment of environmental parameters introduced are used to present the liquid level details and boundaries more clearly; when identifying the liquid level through multi-image fusion, an innovative dynamic weight update mechanism adjusts the weight in real time according to the liquid level change and image quality, greatly improving the monitoring reliability.
[0023] 2. The real-time monitoring system for the liquid level of chemical storage tanks based on image recognition uses big data analysis and machine learning technologies to automatically generate accurate light thresholds, can adapt to the lighting changes in different chemical scenarios, greatly improving the accuracy of liquid level monitoring under various lighting conditions; for image enhancement and correction, this system adopts local region adaptive adjusted histogram equalization and optimized CLAHE technology, as well as threshold segmentation assisted by constructing a feature database and an SFS model with dynamic adjustment of environmental parameters, which can better enhance images in dark environments, remove strong light specular reflection, and clearly restore the liquid level details; in the multi-image fusion link, this system first creates a dynamic weight update mechanism, adjusts the weight in real time according to the liquid level change and image quality, effectively avoiding the interference of single images and significantly improving the monitoring reliability. Description of the Drawings
[0024] Figure 1 is a schematic diagram of the method steps of the present invention; Figure 2 is a schematic diagram of the system framework of the present invention. Detailed Embodiments
[0025] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0026] Please refer to Figures 1 to 2 , the present invention proposes a real-time monitoring method and system for the liquid level of chemical storage tanks based on image recognition, including the following content: A real-time monitoring method and system for the liquid level of chemical storage tanks based on image recognition includes the following steps: 1. Intelligent judgment of the lighting environment After starting the monitoring method, a comprehensive illumination analysis is performed on the collected liquid level images.
[0027] Average brightness calculation: Assume the total number of image pixels is , and the brightness value of the pixel is . By traversing each pixel in the image one by one, obtaining its brightness value and accumulating it, and finally dividing by the total number of pixels , the average brightness is accurately calculated .
[0028] Brightness histogram construction: Divide the brightness range of the image (usually 0 - 255) into several small intervals, for example, every 10 brightness values as an interval. Traverse all pixels in the image, count the number of pixels in each interval, and then calculate the proportion of this number to the total number of pixels, so as to construct a detailed and accurate brightness histogram.
[0029] Threshold setting innovation: Use big data analysis and machine learning techniques. Collect liquid level images of chemical storage tanks under different illumination conditions, covering various complex industrial environments. Input these image data into a specially constructed deep learning model. Through deep learning and analysis of a large amount of data, the model automatically generates light intensity discrimination thresholds applicable to different scenarios . Compared with the traditional method of setting thresholds relying on experience, it can adapt to the illumination changes in different chemical production scenarios. When , it is determined that the image is in a darker light environment; when , further analyze the brightness histogram. If there is a high - brightness peak significantly higher than the surrounding intervals in the histogram, and the proportion of the number of pixel points corresponding to this peak to the total number of pixel points exceeds 5%, it is determined as a strong light reflection environment; otherwise, it is determined as a normal illumination environment.
[0030] 2. Enhancement and optimization of darker light images When it is determined that the image is in a darker light environment, a technology combining a unique optimized histogram equalization and contrast - limited adaptive histogram equalization (CLAHE) is used to enhance the image.
[0031] Histogram equalization operation: CDF calculation: First, calculate the cumulative distribution function (CDF) of the image. The image gray - level range is [0, 255]. For each gray - level , the probability that it appears in the image is accurately determined by the ratio of the number of pixel points of this gray - level to the total number of pixel points. The cumulative distribution function .
[0032] Mapping transformation: The original gray - level value of each pixel point is mapped according to When performing mapping transformation, an innovative local area adaptive adjustment mechanism is introduced. With each pixel as the center, a local area of appropriate size (such as a 5×5 pixel area) is selected. An advanced regional feature analysis algorithm is used to analyze the grayscale distribution characteristics of the pixels in the local area, including grayscale mean, variance, etc. If the grayscale distribution in the local area is relatively concentrated, it means that there are fewer details in the area. During the mapping transformation, the transformation coefficient is appropriately increased to enhance the contrast of the area; if the grayscale distribution in the local area is relatively dispersed, it means that the details are rich, and the transformation coefficient is kept relatively stable, so as to better retain the key details of the liquid level while improving the overall brightness and contrast.
[0033] Optimized CLAHE operation: Small block division and processing: Divide the image into multiple non-overlapping 8×8 pixel blocks. For each block, calculate its cumulative distribution function separately, but limit the degree of contrast enhancement. Pre-set contrast limit threshold , the value range is between 0.01 and 0.1. Calculate the distribution probability of each gray level in the small block. If the probability of a gray level exceeds , the excess part will be evenly distributed to other gray levels.
[0034] Special processing of liquid level area: Use advanced edge detection algorithms (such as Canny algorithm) and image texture analysis technology to perform special processing on small blocks at the edge of the liquid level and the surrounding texture-rich area. The edge detection algorithm is used to accurately determine the position of the liquid level edge. For small blocks at the edge of the liquid level and the surrounding texture-rich area, a more sophisticated adjustment strategy is adopted when performing contrast enhancement. For example, the step size of contrast enhancement is appropriately reduced to avoid loss of details due to excessive enhancement, and to further highlight the liquid level contour and details. Finally, the processed small blocks are spliced back to the complete image through the bilinear interpolation method. Bilinear interpolation is to calculate the grayscale value of the pixel at the target position through linear interpolation based on the grayscale values of the four adjacent pixels, thereby achieving seamless splicing of small blocks.
[0035] 3. Strong light reflection image correction technology If it is determined to be a strong reflective environment, a threshold-based segmentation method is used to correct the image.
[0036] Accurate threshold-based segmentation operation: Threshold setting basis: Based on the high brightness characteristics of the reflective area, a large number of liquid level image samples with reflective light are analyzed, and the brightness threshold is set using big data statistical analysis methods. For example, an in-depth analysis of 1,000 reflective liquid level images revealed that more than 95% of the reflective area pixel brightness values were greater than 200, thus scientifically setting , so as to accurately distinguish the reflective area from the non-reflective area.
[0037] Traversal and Division: Traverse each pixel point in the image. If its brightness value , then divide this pixel point into the specular reflection area; otherwise, it belongs to the non-specular reflection area. During the traversal process, parallel computing technology is adopted, and a multi-core processor or GPU is used to accelerate the calculation to improve the segmentation efficiency.
[0038] Feature Database Construction: By constructing a feature database for the specular reflection area and applying advanced pattern recognition technology, the threshold setting can be made more accurate, effectively dealing with complex specular reflection scenarios. Extract features from a large number of liquid level images with specular reflection, including brightness features, color features, texture features, etc., to construct the database. In practical applications, according to the features of the current image, search for similar specular reflection patterns in the database and dynamically adjust the threshold to improve the segmentation accuracy.
[0039] Non-specular Reflection Area Processing: For the non-specular reflection area, the CLAHE method is used for processing. Divide the non-specular reflection area into small blocks, limit the degree of contrast enhancement, calculate the adjusted cumulative distribution function and perform gray mapping on the pixel points to enhance the brightness and contrast of this area and enhance the details. During this process, combined with the prior knowledge of the image, according to the shape and installation position of the storage tank, pre-determine the approximate position range of the liquid level in the image. For the small blocks within this range, when performing CLAHE processing, increase the intensity of contrast enhancement to focus on enhancing the detail performance of this area.
[0040] Specular Reflection Area Processing: For the specular reflection area, a specular reflection removal algorithm based on a physical model is adopted, specifically the Shape from Shading (SFS) model.
[0041] Model Principle: This model is based on the physical principle of the light reflected from the object surface, assuming that the light reflected from the object surface conforms to the Lambertian reflection model. Given the light source direction, intensity, and the brightness value of the specular reflection area in the image, the normal vector distribution of the object surface is estimated using the steepest descent method. The steepest descent method is an iterative optimization algorithm that continuously calculates the gradient of the objective function (such as the error function between the estimated normal vector distribution and the actual image brightness), updates the normal vector estimate along the direction of the gradient descent, and gradually approaches the true normal vector distribution.
[0042] Dynamic adjustment of environmental parameters: On the basis of the traditional SFS model, a real-time environmental parameter monitoring and feedback mechanism is introduced to dynamically adjust the model parameters according to environmental factors such as temperature and humidity at the chemical production site. For example, temperature changes may affect the reflection characteristics of the object surface. By installing temperature sensors on site, temperature data can be obtained in real time. When the temperature rises, the parameters related to the reflectivity in the model are appropriately adjusted, and the estimated specular component is subtracted from the pixel values in the specular area of the original image to more accurately restore the real image information. Finally, the processed non-specular area and the corrected specular area are recombined through a weighted average fusion method. The weights are determined according to the quality evaluation indicators of the two areas after image segmentation. The clarity of the area is measured by the mean value of the image gradient amplitude calculated by the Laplacian operator, and the contrast of the area is measured by the difference between the maximum gray value and the minimum gray value within the area. The higher the clarity and contrast of the area, the greater the weight.
[0043] 4. Multi-image fusion liquid level recognition Image preprocessing: Median filtering: Median filtering is performed on each image in turn. For each pixel point in the image, a 3×3 or 5×5 neighborhood window is selected centered on it, and the gray values of all pixel points within the window are sorted, and the median value is taken as the new gray value of the pixel point. For example, in a 3×3 neighborhood window, the pixel point gray values are 50, 60, 70, 40, 80, 90, 30, 100, 110 respectively. After sorting, they are 30, 40, 50, 60, 70, 80, 90, 100, 110, and the median value 70 is the new gray value of the pixel point, effectively removing impulse noises such as salt-and-pepper noise in the image and retaining the image edges and details.
[0044] Gaussian filtering: Using the Gaussian function , where is the standard deviation, controlling the smoothness of the Gaussian function, generating a Gaussian kernel with the same size as the neighborhood window, and convolving the Gaussian kernel with the image. For each pixel point in the image, its new gray value is obtained by multiplying the gray values of the pixel points in the neighborhood by the corresponding coefficients of the Gaussian kernel and then summing them, reducing the high-frequency noise in the image and making the image smoother, providing a stable basis for subsequent feature matching. In actual operation, according to the noise level and detail richness of the image, an adaptive parameter adjustment algorithm is used to adaptively adjust value. For example, for an image with more noise and relatively less details, the value is appropriately increased to enhance the smoothing effect; for an image with rich details, the value is reduced to avoid losing details due to excessive smoothing.
[0045] Parameter Adaptive Adjustment: In the preprocessing stage, an independently developed image quality assessment algorithm is used to adaptively adjust the parameters of median filtering and Gaussian filtering according to indicators such as the noise level and clarity of the image, achieving a better preprocessing effect. The image quality assessment algorithm comprehensively evaluates the image quality by calculating indicators such as the signal-to-noise ratio and structural similarity index of the image. If the image noise level is high, appropriately increase the median filter window size and the value of Gaussian filtering; if the image clarity is low, adjust the filtering parameters to enhance image details.
[0046] Feature Matching: Scale Space Construction: In multiple preprocessed images, the Scale-Invariant Feature Transform (SIFT) algorithm is used for feature matching. Construct the scale space of the image, and generate a Gaussian pyramid by performing Gaussian convolution on the image at different scales. First, determine the initial scale and then perform Gaussian convolution on the original image to generate images at different scales. For example, with as the initial scale, successively perform ( , ) scale Gaussian convolution on the image to obtain a series of images at different scales, forming a Gaussian pyramid.
[0047] DOG Pyramid Generation: Subtract adjacent scale space images to obtain a Difference of Gaussian (DOG) pyramid. Subtract two adjacent layers of images in the Gaussian pyramid to obtain the DOG pyramid. The DOG pyramid highlights features such as edges and corners in the image. In the DOG pyramid, each pixel point is compared with 18 pixel points in its 8-neighborhood and the corresponding positions in the adjacent upper and lower scales. If the pixel point is the maximum or minimum value among these 26 points, it is determined as an extreme point.
[0048] Feature Descriptor Generation: For each extreme point, select a 16×16 pixel neighborhood window centered on it, and calculate the gradient direction and magnitude of each pixel point within the window. Divide the neighborhood into multiple 4ⅹ4 sub-regions, and statistically calculate the gradient histograms in 8 directions within each sub-region to form a descriptor vector. Concatenate the descriptor vectors of all sub-regions to form a feature descriptor with scale and rotation invariance for this extreme point. For example, within a sub-region, statistically calculate the distribution of the gradient directions of each pixel point within 8 direction intervals to generate an 8-dimensional gradient histogram vector, and concatenate the 8-dimensional vectors of 4×4 sub-regions within this neighborhood into a 128-dimensional feature descriptor vector.
[0049] Matching and Retrieval Optimization: Using the Euclidean distance as a metric, calculate the Euclidean distance between a certain feature descriptor in one image and all feature descriptors in another image. If there exists a distance less than a set threshold, which is determined through experiments and has a value range between 0.6 and 0.8, for the pair of feature descriptors, it is considered a successful match. To improve the accuracy and efficiency of matching, a KD-tree based data structure is adopted to quickly retrieve feature descriptors. As a binary search tree, the KD-tree divides high-dimensional space data into different nodes, enabling rapid positioning and querying of target data to determine the corresponding positions and pose information of the liquid level in different images. Based on the SIFT algorithm, an improved feature point screening strategy is proposed. According to the prior information of the liquid level's position in the image, feature points that are more critical for liquid level recognition are preferentially screened, significantly enhancing the matching speed and accuracy. For example, according to the shape and installation position of the storage tank, the approximate position range of the liquid level in the image is determined in advance, and only the feature points within this range are focused on for matching and screening.
[0050] Liquid Level Information Fusion: Basis for Determining Weights: Suppose there are images, and the position information of the liquid level in the images is , where the liquid level position information is the quantization representation of the coordinates of the liquid level in the image or the proportion of the liquid level height to the image height, and the corresponding weight is . The weights are determined according to the image quality evaluation indicators. The image quality evaluation indicators are clarity and noise level. Clarity is measured by calculating the mean value of the gradient magnitude of the image using the Laplacian operator. The larger the mean value, the higher the clarity. The noise level is measured by calculating the image noise power. The lower the power, the lower the noise level. Normalize the clarity and the noise level to obtain , , and the weight ( is the weight distribution coefficient, 0.6 - 0.8), and . For example, in a certain liquid level monitoring, there are 3 images. The clarity of image 1 is , and the noise level is ; the clarity of image 2 is , and the noise level is ; the clarity of image 3 is , and the noise level is . After normalization, the respective weights , , are calculated.
[0051] Dynamic weight update: A dynamic weight update mechanism is proposed. According to the change trend of the liquid level and the fluctuation of image quality at different times, the weights are adjusted in real time to further optimize the effect of liquid level information fusion. By analyzing the change of the liquid level in consecutive multiple frames of images, if the liquid level changes rapidly, it indicates that there may be situations such as operating condition adjustment. At this time, increase the weight of the image with high clarity and low noise to improve the accuracy of liquid level monitoring; if the image quality suddenly drops at a certain moment, adjust the weight accordingly according to the degree and reason of the drop, and reduce the impact of this image on the liquid level information fusion. The fused liquid level position information , effectively avoids the liquid level recognition error caused by the reflection or other interferences of a single image, and significantly improves the accuracy and reliability of liquid level monitoring. For example, when the liquid level is in a stable state and the image quality is relatively stable, the weight adjustment range is small to maintain the stability of the current liquid level monitoring; once the liquid level shows abnormal fluctuations, and at the same time, the quality of some images drops due to factors such as equipment failure and environmental mutation, the dynamic weight update mechanism quickly comes into play, reduces the weight of the poor-quality images, and increases the contribution of high-quality images to the liquid level information fusion, ensuring that the liquid level monitoring results can truly reflect the actual change of the liquid level in the storage tank.
[0052] A real-time liquid level monitoring method and system for chemical storage tanks based on image recognition, applied to the above real-time liquid level monitoring method for chemical storage tanks based on image recognition, includes the following modules: 1. Data acquisition module: It is composed of a multi-angle image acquisition device. This device reasonably arranges multiple image acquisition devices around the chemical storage tank to ensure that liquid level images can be obtained from different angles, providing rich data for subsequent multi-image fusion. The acquisition devices have characteristics such as high resolution and wide dynamic range to adapt to the complex lighting conditions and environmental requirements of the chemical production site.
[0053] 2. Image processing module: It undertakes key tasks such as preprocessing the acquired liquid level images, judging the lighting environment, enhancing the images with darker light, and correcting the images with strong light reflection. Use average brightness calculation, brightness histogram construction, big data analysis and machine learning techniques to set the lighting threshold to judge the lighting environment; use an innovative method combining histogram equalization and CLAHE to enhance the images with darker light; use a threshold-based segmentation method and SFS model to correct the images with strong light reflection to improve the image quality and lay a foundation for liquid level recognition.
[0054] 3. Liquid level recognition module: First, perform median filtering and Gaussian filtering on the preprocessed image to remove noise. Then, construct a scale space, generate a DOG pyramid, and generate feature descriptors through the SIFT algorithm for feature matching. Screen key feature points according to the prior information of the liquid level position in the image to improve the matching speed and accuracy. After that, determine the weights of each image based on the image quality evaluation index, fuse the liquid level information, and adjust the weights in real time through a dynamic weight update mechanism to improve the accuracy and reliability of liquid level monitoring.
[0055] 4. User interaction module: Present the liquid level monitoring results in an intuitive graphical interface, including information such as the real-time liquid level height and the liquid level change trend curve. Support users to set parameters, such as adjusting the light threshold and optimizing the filtering parameters. At the same time, it has an alarm function to notify the operator in time when the liquid level fluctuates abnormally or the image quality drops severely, facilitating user management and decision-making.
[0056] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A real-time monitoring method for liquid level in chemical storage tanks based on image recognition, applied to interference scenarios under different lighting conditions, characterized by: The following steps are involved: S1 Intelligent judgment of lighting environment: Calculate the average brightness of the collected liquid level image, construct a brightness histogram, and use big data analysis and machine learning technology to set the threshold for distinguishing between light intensity, so as to determine whether the image is in a dark light, strong light reflection or normal light environment; S2 low-light image enhancement optimization: When it is determined to be a low-light environment, a combination of histogram equalization and contrast-limited adaptive histogram equalization is used to enhance the image, and small blocks at the edge of the liquid level and surrounding areas with rich textures are processed; S3 Strong light reflective image correction: When it is determined to be a strong light reflective environment, the image is corrected using a threshold-based segmentation method, the reflective area and the non-reflective area are processed separately, and finally the two processed areas are recombined through a weighted average fusion method; S4 multi-image fusion liquid level recognition: multiple liquid level images are acquired through a multi-angle image acquisition device, and image preprocessing and feature matching are performed in sequence. The weights are determined according to the image quality evaluation index and the liquid level information is fused. At the same time, a dynamic weight update mechanism is used to optimize the fusion effect.
2. The method for real-time monitoring of liquid level in chemical storage tanks based on image recognition according to claim 1 is characterized in that: The average brightness is calculated by traversing each pixel in the image one by one, obtaining its brightness value and accumulating it, and finally dividing it by the total number of pixels; The brightness histogram is constructed by dividing the brightness range of the image into several small intervals, traversing all the pixels of the image, counting the number of pixels in each interval, and then calculating the ratio of this number to the total number of pixels.
3. The method for real-time monitoring of liquid level in chemical storage tanks based on image recognition according to claim 1 is characterized in that: In the histogram equalization, when calculating the cumulative distribution function, the probability of each grayscale pixel appearing in the image is determined according to the ratio of the number of pixels to the total number of pixels, and a local area adaptive adjustment mechanism centered on the pixel is introduced during the mapping transformation.
4. The method for real-time monitoring of liquid level in chemical storage tanks based on image recognition according to claim 1 is characterized in that: In the contrast-limited adaptive histogram equalization operation, the image is divided into multiple non-overlapping 8x8 pixel blocks, a contrast limit threshold is pre-set, a more refined adjustment strategy is adopted for the small blocks at the edge of the liquid level and the surrounding texture-rich area, and finally the processed small blocks are spliced back into the complete image through the bilinear interpolation method.
5. The method for real-time monitoring of liquid level in chemical storage tanks based on image recognition according to claim 1 is characterized in that: In the threshold-based segmentation operation, the brightness threshold is set by analyzing a large number of liquid level image samples with reflections according to the high brightness characteristics of the reflective area, parallel computing technology is used to improve the segmentation efficiency when traversing the image pixels, and the threshold is dynamically adjusted by building a reflective area feature database.
6. The method for real-time monitoring of liquid level in chemical storage tanks based on image recognition according to claim 1 is characterized in that: The image preprocessing includes median filtering and Gaussian filtering. The image quality assessment algorithm is used to adaptively adjust the parameters of the median filtering and Gaussian filtering according to the noise level and clarity index of the image.
7. The method for real-time monitoring of liquid level in chemical storage tanks based on image recognition according to claim 1 is characterized in that: The feature matching adopts a scale-invariant feature transformation algorithm, constructs a scale space, generates a DOG pyramid, generates feature descriptors for matching, uses a KD tree-based data structure to quickly retrieve feature descriptors, and proposes an improved feature point screening strategy.
8. The method for real-time monitoring of liquid level in chemical storage tanks based on image recognition according to claim 1 is characterized in that: In the liquid level information fusion, the weight is determined according to the clarity and noise level of the image, and a dynamic weight update mechanism is adopted. When the liquid level changes rapidly, the weight of the image with high clarity and low noise is increased; when the image quality suddenly drops at a certain moment, the weight is adjusted accordingly according to the degree and cause of the drop to reduce the impact of the image on the liquid level information fusion.
9. Real-time monitoring system of liquid level in chemical storage tanks based on image recognition, characterized by: The system is applied to the real-time monitoring method of liquid level of chemical storage tanks based on image recognition as described in any one of claims 1 to 8 above, and the system includes the following modules: Data acquisition module: It is composed of a multi-angle image acquisition device. The device rationally arranges multiple image acquisition devices around the chemical storage tank to ensure that liquid level images can be obtained from different angles, providing rich data for subsequent multi-image fusion; Image processing module: undertakes the key tasks of preprocessing the collected liquid level images, judging the lighting environment, enhancing the dark light images, and correcting the strong light reflection images; Liquid level recognition module: first perform median filtering and Gaussian filtering on the preprocessed image to remove noise, then use the SIFT algorithm to construct the scale space, generate the DOG pyramid, generate feature descriptors, perform feature matching, select key feature points based on the prior information of the liquid level position in the image, improve the matching speed and accuracy, determine the weight of each image based on the image quality evaluation index, integrate the liquid level information, and adjust the weight in real time through the dynamic weight update mechanism; User interaction module: presents the liquid level monitoring results in an intuitive graphical interface, including real-time liquid level height and liquid level change trend curve information; supports users to set parameters, including illumination threshold adjustment and filter parameter optimization, and has an alarm function to promptly notify operators when the liquid level fluctuates abnormally or the image quality is severely degraded.
10. The real-time monitoring system for liquid level of chemical storage tanks based on image recognition according to claim 9 is characterized in that: The system uses average brightness calculation, brightness histogram construction, big data analysis and machine learning technology to set the light threshold and judge the lighting environment; uses a method combining histogram equalization and CLAHE to enhance dark images; and uses a threshold-based segmentation method and SFS model to correct strong light reflective images to improve image quality.
Citation Information
Patent Citations
Path extraction and identification method of visual guidance system under complex illumination condition
CN107622502A
Method and device for detecting liquid level of resin solution tank
CN111089632A
Image processing method and device
CN115512118A
Visual optimization method for camera in rainy days
CN118898562A
Woven tape quality detection system and method based on industrial camera detection
CN119147539A
Cited By
Component light source adaptive search method, system, device, equipment and medium
CN120411448A
Water meter quality defect detection method and device based on machine vision
CN120489301A
A water meter quality defect detection method and device based on machine vision
CN120489301B
Barrel liquid level detection method and system for field image of surface water monitoring station
CN121577121A
Illumination adaptive image preprocessing method and system for monocular Gaussian sputtering SLAM
CN122023187A
