Early warning equipment for water conservancy flood prevention and early warning method thereof

By processing low-light water level scale images, extracting water level information and sending early warnings, the problem of traditional water level detection methods being affected by environmental factors is solved, and real-time water level detection and early warning are realized in harsh environments .

CN119207016AInactive Publication Date: 2024-12-27ANHUI & HUAI RIVER WATER RESOURCES RES INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411592752.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional water level detection methods are greatly affected by environmental factors, with high maintenance costs and failure rates. The existing water level intelligent video recognition technology is susceptible to low light conditions and has low accuracy.

Method used

The processing of low-light water level scale images includes conversion to the HSV color space, separation of hue, saturation, and brightness, grayscale processing, judgment of image type, brightness enhancement or binarization processing, and using a 5×5 convolution kernel Filter, calculate the minimum enclosure matrix of the water level ruler, extract the water level area, count the number of scale lines to calculate the water level value, and send an early warning when the threshold exceeds.

Benefits of technology

It realizes accurate extraction of water level information under low light conditions, reduces noise amplification, improves image clarity and contrast, and sends alarm commands to mobile terminals or cloud servers in real time to help deal with emergencies in a timely manner and reduces maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207016A_ABST
    Figure CN119207016A_ABST
Patent Text Reader

Abstract

The invention discloses early warning equipment for water conservancy flood prevention and an early warning method thereof, and relates to the technical field of alarm devices. Converting the water gauge image into an HSV color space to obtain an HSV image; carrying out hue, saturation and brightness separation on the HSV image, and respectively carrying out graying processing on separated components; whether the water gauge image belongs to a low-light image or a normal-light image is judged through the brightness component; if the image is a low-light image, brightness enhancement processing is carried out; carrying out image binarization processing and filtering processing; calculating a minimum surrounding matrix of a water gauge for the filtered image, and extracting a water gauge area; counting the number of scale marks in the water gauge area, and calculating to obtain a water level value according to the number; if the water level value is larger than the warning value, an alarm instruction is sent. A water level value is calculated by processing a low-illumination water level gauge image and accurately extracting a water level gauge, and early warning information is sent according to the water level value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of alarm devices, and in particular to an early warning device and an early warning method for water conservancy flood control. Background Art

[0002] Water level data is important information for responding to flood disasters, flood control command, and water conservancy project scheduling. Due to the characteristics of the measuring device, the traditional water level detection method is greatly affected by environmental factors, is not easy to install, and has high maintenance costs and failure rates. With the development of computer vision and digital image processing technology, it is possible to automatically identify water levels based on video image data. This method effectively solves the problems existing in traditional water level detection. However, the current water level intelligent video recognition technology has technical problems that it is easily affected by low light conditions and has low accuracy. Based on this, the present invention proposes an early warning device and an early warning method for water conservancy flood control. Summary of the invention

[0003] The present invention provides an early warning device and an early warning method for water conservancy flood control, which calculates the water level value by processing a low-light water level gauge image and accurately extracting the water level gauge, and sends early warning information according to the water level value.

[0004] According to one aspect of the present disclosure, there is provided an early warning method for water conservancy flood control, characterized in that the method comprises: Acquire a water level gauge image acquired by an image acquisition device; Convert the water gauge image into the HSV color space to obtain an HSV image; Separate the HSV image into hue, saturation and brightness, and grayscale the separated hue component, saturation component and brightness component to obtain a grayscale image; Determining whether the water gauge image is a low-light image or a normal-light image by using the brightness component; If it is a low-light image, brightness enhancement processing is performed; the enhanced image or the normal-light image is subjected to image binarization processing; The binarized image is filtered using a 5×5 convolution kernel; The minimum enclosing matrix of the water level gauge is calculated for the filtered image, and the water level gauge area is extracted. The lower boundary of the water level gauge area is the water level line, and the upper boundary is the top of the water level gauge. Counting the number of scale lines in the water level gauge area, and calculating the water level value according to the number of scale lines; If the water level value is greater than the warning value, an alarm instruction is sent to the mobile terminal or cloud server; The step of judging whether the water gauge image belongs to a low-light image or a normal-light image by using the brightness component includes: calculating a mean value of the brightness component of the image, judging whether the mean value is greater than a first threshold value, judging the image to be a normal-light image if the mean value is greater than the first threshold value, and judging the image to be a low-light image if the mean value is less than the first threshold value; The image binarization processing is performed on the enhanced image or the normal light image, including: setting a threshold value of a hue component, a threshold value of saturation, and a threshold value of brightness, and performing binarization processing on the image according to the set threshold values; The step of calculating the minimum enclosing matrix of the water level gauge on the filtered image and extracting the water level gauge area includes: The convex polygon surrounding the point set is determined according to the coordinate information of the point set in the filtered image, and a side of the convex polygon is collinear with the side of the circumscribed rectangle to obtain multiple circumscribed rectangles. The areas of the multiple circumscribed rectangles are compared, and the smallest one is selected as the minimum area circumscribed rectangle.

[0005] In a possible implementation, counting the number of scale lines in the water gauge area includes: counting the number of scale lines in the water gauge area by using an 8-connected domain analysis method.

[0006] In a possible implementation manner, the brightness enhancement process includes: The feature extraction module is used to extract features from low-light images: feature extraction is performed at different scales; The feature-extracted image is decomposed through a layer decomposition module to obtain reflection images of different scales and illumination images of different scales; Through the feature fusion module, deep feature extraction and cross-scale fusion are performed on multi-scale reflection images and illumination images to eliminate redundant information, realize cross-scale fusion of complementary feature information, and obtain multi-scale reflection images and multi-scale illumination images; The reflectivity restoration module is responsible for removing degradation from multi-scale reflectance images; The illumination adjustment module is responsible for adjusting the illumination of the illumination image; The image fusion module fuses the reflection image and the illumination image to obtain an enhanced image.

[0007] In a possible implementation, the feature extraction module performs feature extraction on the low-light image: feature extraction is performed at different scales, including: taking the original low-light image as input, as a low-level image, constructing a Gaussian image pyramid from bottom to top, convolving the low-level image with a Gaussian kernel, smoothing the result of the convolution operation, and then down-sampling to obtain an upper-level image.

[0008] In a possible implementation, the layer decomposition module decomposes the feature-extracted image to obtain reflection images of different scales and illumination images of different scales, including: the original image after feature extraction passes through a convolution layer, and the obtained feature map will be sent to two branches. The first branch goes to the reflectance map part, which is performed by eight consecutive convolution pooling operations, and after each pooling operation, it passes through a batch normalization layer; the second branch obtains the illumination map, and the feature map obtained by the first convolution layer is connected with the reflectance map through 4 consecutive convolution operations, and finally passes through a normalization layer to obtain the illumination map.

[0009] In a possible implementation, the reflectivity restoration module is responsible for removing degradation from a multi-scale reflective image, including: The image segmentation network structure, the downsampling part is 6 consecutive convolution operations, the kernel size is 3x3, the number of channels is 32, 64, 64, 128, 128, 256, and the pooling sampling is the maximum pooling operation with a step size of 2; the upsampling is 6 consecutive convolution operations, the kernel size is 3x3, the number of channels is 256, 128, 128, 64, 64, 32, and the feature map obtained in the downsampling is connected in sequence to obtain the feature map with twice the original channels, and finally pass through an activation function layer to get the result.

[0010] In a possible implementation, the illumination adjustment module is responsible for performing illumination adjustment on the illumination image, including: the input feature map passes through 4 convolutional layers, wherein the kernel size of each convolutional layer is 3x3, the number of channels of the first three convolutional layers is 32, the number of channels of the last one is 1, the activation function is the Leaky Rule function, and finally a normalization layer is used for normalization.

[0011] In a possible implementation, the image fusion module fuses the reflection image and the illumination image to obtain an enhanced image, including: step 1, first passing the high-scale reflection image or the illumination image through multiple residual recursive units, and then upsampling it using a deconvolution layer to keep the scale consistent with the next layer of reflection image, the upsampling rate should be consistent with the downsampling rate in the image feature extraction module, the transformed high-scale upper layer image is consistent in size with the low-scale lower layer image, and then the transformed high-scale upper layer image and the low-scale lower layer image are added pixel by pixel to achieve cross-scale image fusion; a multi-scale fused reflection image or a multi-scale fused illumination image is obtained; wherein each residual recursive unit is composed of a 3×3 convolution layer, a 2×2 normalization layer and a ReLU activation function.

[0012] An early warning device for water conservancy flood control, the early warning device applies the method, and the device comprises: The water level gauge image acquisition module is used to collect water level gauge images at the river site; The water level image processing module is used to process the collected water level image and enhance the image that is too dark; A water level data calculation module is used to calculate the water level information based on the water level gauge information extracted from the processed image; Water level warning push module: pushes water level information exceeding the warning line to the mobile terminal or cloud server in real time.

[0013] Compared with the prior art, the present invention has the following beneficial effects: The early warning device and early warning method for water conservancy and flood control of the disclosed embodiment enhance the collected water level gauge image, and then calculate the water level information according to the extracted features of the water level gauge image, and send an alarm instruction to the mobile terminal or cloud server when the water level value is greater than the threshold. The detection results are pushed to the mobile device of the staff in real time to help the staff deal with emergencies in time and increase the response time.

[0014] An early warning device and early warning method for water conservancy and flood control can realize long-distance measurement. Since the water level is measured by image data, no damage is caused to the measured target. In addition, data can be collected from a long distance, and the requirements for environmental factors are low. Under the condition that the target can be measured, it can adapt to various harsh environments. Real-time water level detection can be realized: the video stream is processed in real time by the monitoring equipment, image data is collected for the detection area, and the water level value is calculated. Low maintenance cost: the required on-site monitoring equipment is relatively universal and does not contact the water surface, which can achieve a zero wear effect.

[0015] The low-light image is enhanced to ensure image enhancement, reduce noise amplification, and reduce image blur. It effectively improves the brightness of the water gauge image and maintains good clarity and contrast, providing good image data for subsequent water level detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of an early warning method for water conservancy flood control according to an embodiment of the present disclosure is shown.

[0017] Figure 2 A schematic diagram of a water level gauge image after extraction according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0018] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0019] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0020] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.

[0021] Figure 1 A flowchart of an early warning method for water conservancy and flood prevention according to an embodiment of the present disclosure is shown, and an early warning method for water conservancy and flood prevention is provided. Figure 1 As shown, the method includes: S01, obtaining a water level gauge image acquired by an image acquisition device; S02, converting the water gauge image into the HSV color space to obtain an HSV image; S03, separating the HSV image into hue, saturation and brightness, and graying the separated hue component, saturation component and brightness component to obtain a grayscale image; S04, judging whether the water gauge image is a low-light image or a normal-light image according to the brightness component; S05, if it is a low-light image, then brightness enhancement processing is performed; and image binarization processing is performed on the enhanced image or the normal-light image; S06, filtering the binarized image using a 5×5 convolution kernel; S07, calculating the minimum enclosing matrix of the water level gauge for the filtered image, extracting the water level gauge area, the lower boundary of the water level gauge area is the water level line, and the upper boundary is the top of the water level gauge; S08, counting the number of scale lines in the water level gauge area, and calculating the water level value according to the number of scale lines; If the water level value is greater than the warning value, an alarm instruction is sent to the mobile terminal or cloud server.

[0022] For example, the water gauge image can be frame image data captured from a video or a picture captured by a camera; the HSV color space is a method of representing points in the RGB color space in an inverted cone, using (hue, saturation, brightness) to represent colors. Compared with the RGB color space, it can more intuitively represent the color hue, vividness, and brightness, making it easier to compare colors and making full use of color information. Considering that the scale lines of the water gauge image have distinct color features, the water gauge area can be effectively segmented in the HSV color space.

[0023] The three components of the water gauge image converted into the HSV space, hue H, saturation S, and brightness V, are separated and grayed out respectively. The graying process makes it contain only brightness information, reduces the dimension of the storage image matrix, and facilitates the calculation of image gradient features. The grayscale image greatly retains the water gauge information and greatly improves the speed of subsequent operations, meeting the real-time requirements and ensuring the robustness of the algorithm.

[0024] In a possible implementation, determining whether the water level gauge image belongs to a low-light image or a normal-light image by using the brightness component includes: calculating the mean of the brightness component of the image, determining whether the mean is greater than a first threshold, if it is greater than the first threshold, determining it to be a normal-light image, and if it is less than the first threshold, determining it to be a low-light image.

[0025] For example, the channel V of the image is averaged after being converted to the HSV color space, and the threshold is set to 100. Images with results below the threshold are determined to be low-light images.

[0026] For example, using global threshold-based image binarization, select blue, set the threshold to H[100-124], S[43-255], V[46-255], if the pixel value of the pixel point is not within the threshold range, it is assigned to 0, otherwise it is assigned to 1.

[0027] Median filtering is used to reduce noise in water gauge images. The nonlinear method of median filtering overcomes the blurring of image details caused by linear filters and is very effective in smoothing impulse noise. It can well preserve the edges of water gauge images. For example, a 5×5 convolution template is used to filter the water gauge grayscale image.

[0028] For the point set in our binary image, located in the two-dimensional plane, we just need to find a minimum point set connected into a convex polygon so that all the points in the point set in the binary image are inside the convex polygon. After obtaining the convex hull of the point set, calculate the minimum circumscribed rectangle of the convex hull, that is, the minimum enclosing rectangle of the point set. Since one side of the minimum circumscribed rectangle of a polygon must be collinear with one of the sides of the polygon, the rotating calcaneal method can be used to find the minimum circumscribed rectangle of a convex polygon. You only need to enumerate the sides of the polygon, make the circumscribed rectangle, compare the areas of the circumscribed rectangles, and select the smallest one, which is the minimum area circumscribed rectangle.

[0029] In a possible implementation, the counting of the number of roots of the scale lines in the water gauge area includes: counting the number of roots of the scale lines in the water gauge area by an 8-connected domain analysis method. A connected domain refers to an image area composed of pixels with the same grayscale value and adjacent positions in a binary image. Connected domains are usually divided into 4-connected domains and 8-connected domains based on the proximity relationship of pixel points. A 4-connected domain contains adjacent pixels in the four directions of the pixel point, namely, up, down, left, and right. An 8-connected domain needs to additionally include 4 oblique adjacent pixels on the main and secondary diagonals.

[0030] Count the number of scale lines in the water level gauge area and calculate the water level value based on the number. For example, the width of each scale line is 5 cm. The length of the water level gauge exposed above the water surface is obtained by calculating the number of scale lines above the water level line and multiplying it by the width of the scale lines, thereby obtaining the actual value of the water level.

[0031] In a possible implementation, the enhanced image or the normal light image is subjected to image binarization, including: setting a threshold of a hue component, a threshold of saturation, and a threshold of brightness, and performing binarization on the image according to the set thresholds.

[0032] In a possible implementation, the minimum bounding matrix of the water level gauge is calculated for the filtered image to extract the water level gauge area, including: The convex polygon surrounding the point set is determined according to the coordinate information of the point set in the filtered image, and a side of the convex polygon is collinear with the side of the circumscribed rectangle to obtain multiple circumscribed rectangles. The areas of the multiple circumscribed rectangles are compared, and the smallest one is selected as the minimum area circumscribed rectangle.

[0033] Figure 2 A schematic diagram of a water gauge image after extraction according to an embodiment of the present disclosure is shown. The scale lines of the water gauge are shaped like the letter E, and one letter E includes five scale lines, namely, the width of three horizontal lines of the letter E plus two white scale lines between the three horizontal lines. One letter E can represent the width of 5 scale lines, which can be 5 cm or 50 cm.

[0034] In a possible implementation manner, the brightness enhancement process includes: The feature extraction module is used to extract features from low-light images: feature extraction is performed at different scales, including: taking the original low-light image as input and as a low-level image, constructing a Gaussian image pyramid from bottom to top, convolving the low-level image with a Gaussian kernel, and smoothing the result of the convolution operation and then down-sampling it to obtain an upper-level image.

[0035] The feature-extracted image is decomposed through a layer decomposition module to obtain reflection images of different scales and illumination images of different scales, including: the original image after feature extraction passes through a convolution layer, and the obtained feature map will be sent to two branches. The first branch goes to the reflectance map part, which consists of eight consecutive convolution pooling operations. After each pooling operation, it passes through a batch normalization layer; the second branch obtains the illumination map. The feature map obtained by the first convolution layer is connected with the reflectance map through 4 consecutive convolution operations, and finally passes through a normalization layer to obtain the illumination map.

[0036] For example, after feature extraction, the image passes through a convolution layer, and the obtained feature map will be sent to two branches. The first branch goes to the reflectance map part, which is operated by eight consecutive convolution pooling operations. Compared with the original layer decomposition module, the deep network structure can extract richer features. At the same time, after each pooling operation, it passes through a batch normalization layer; the second branch obtains the illumination map. The feature map obtained by the first convolution layer is connected with the reflectance map through 4 consecutive convolution operations, and finally passes through a normalized Sigmoid layer to obtain the illumination map.

[0037] Through the feature fusion module, deep feature extraction and cross-scale fusion are performed on multi-scale reflection images and illumination images to eliminate redundant information, realize cross-scale fusion of complementary feature information, and obtain multi-scale reflection images and multi-scale illumination images; For example, after the layer decomposition module, the reflection images and illumination images of different scales contain a large amount of redundant and complementary feature information, which brings certain difficulties to the comprehensive utilization of the feature information. Therefore, a feature fusion module is needed to further extract and fuse the features of the multi-scale reflection images and illumination images in order to make full use of the complementary feature information and remove the redundant feature information.

[0038] In the image fusion module, the high-scale reflection image (or illumination image), i.e., the top layer of the image pyramid, is first passed through multiple residual recursive units. Specifically, each residual recursive unit consists of a 3×3 convolution layer, a 2×2 normalization layer, and a ReLU activation function. Then, a deconvolution layer is used for upsampling to keep the scale consistent with the next layer of the image pyramid. Therefore, the upsampling rate should be consistent with the downsampling rate in the image feature extraction module. After the transformation, the high-scale upper layer image is consistent with the low-scale lower layer image in size. Then, the two are added pixel by pixel to achieve cross-scale image fusion. Repeat this step again and fuse the image of the third layer of the image pyramid. At this point, the cross-scale fusion of all three scales of reflection images (illumination images) is achieved. At this time, a multi-scale fused reflection image (illumination image) is obtained, which integrates complementary feature information at different scales.

[0039] The reflectivity restoration module is responsible for removing degradation from multi-scale reflective images, including: image segmentation network structure, the downsampling part is 6 consecutive convolution operations, the kernel size is 3x3, the number of channels is 32, 64, 64, 128, 128, 256, and the pooling sampling is the maximum pooling operation with a step size of 2; the upsampling is 6 consecutive convolution operations, the kernel size is 3x3, the number of channels is 256, 128, 128, 64, 64, 32, and the feature map obtained in the downsampling is connected in sequence to obtain the feature map of twice the original channels, and finally pass through an activation function layer to get the result.

[0040] For example, the reflectivity restoration module is relatively complex, and the overall structure is also an image segmentation network structure. The downsampling part is 6 consecutive convolution operations, the kernel size is 3x3, the number of channels is 32, 64, 64, 128, 128, 256, and the pooling sampling is the maximum pooling operation with a step size of 2; the upsampling is 6 consecutive convolution operations, the kernel size is 3x3, the number of channels is 256, 128, 128, 64, 64, 32, and the feature map obtained in the downsampling is connected in sequence to obtain the feature map of twice the original channel, and finally pass through a normalized Sigmoid layer to get the result.

[0041] The illumination adjustment module is responsible for adjusting the illumination of the illumination image, including: the input feature map passes through 4 convolutional layers, in which the kernel size of each convolutional layer is 3x3, the number of channels of the first three convolutional layers is 32, the number of channels of the last one is 1, the activation function is the Leaky Rule function, and finally a normalization layer is used for normalization.

[0042] For example, the illumination adjustment module is relatively simple. The input feature map passes through 4 convolutional layers. The kernel size of each convolutional layer is 3x3. The number of channels of the first three convolutional layers is 32, and the number of channels of the last one is 1. The activation function is the Leaky Rule function, and finally a normalized Sigmoid layer is used for normalization.

[0043] The image fusion module fuses the reflection image and the illumination image to obtain an enhanced image, including: step 1, first passing the high-scale reflection image or illumination image through multiple residual recursive units, and then upsampling it using a deconvolution layer to keep the scale consistent with the next layer of reflection image, the upsampling rate should be consistent with the downsampling rate in the image feature extraction module, the high-scale upper layer image after transformation is consistent with the low-scale lower layer image size, and then the transformed high-scale upper layer image and the low-scale lower layer image are added pixel by pixel to achieve cross-scale image fusion; a multi-scale fused reflection image or a multi-scale fused illumination image is obtained; wherein each residual recursive unit is composed of a 3×3 convolution layer, a 2×2 normalization layer and a ReLU activation function. For example, the image fusion module fuses the reflection image and the illumination image according to the Retinex theory to restore the image enhancement result.

[0044] For example, the concept of multi-scale images: scale is crucial for the mining and extraction of image features. At different scales, the feature information that can be mined from images is also different. Just like when the human eye observes an object, the perceived feature information is different at different distances from the object. When the distance is closer, more detailed feature information can be observed. The same is true for images. Although some feature information of the image is difficult to discover at the current scale, it becomes easy to extract and use when it is converted to another scale. Due to various degradations, the image feature information contained in low-light images is lost compared to normal light images. In order to mine more feature information of low-light images, an image feature extraction module can be added to perform multi-scale transformation on the image. The image pyramid method is adopted to extract features at different scales to make full use of the multi-scale information of low-light images.

[0045] Image pyramid is an effective way to express images at multiple scales. From bottom to top, the image resolution decreases and the image scale increases. The upper image is obtained by downsampling the lower image, and the lower image is obtained by upsampling the upper image.

[0046] Gaussian pyramid is used to extract multi-scale feature information of images. Gaussian pyramid uses Gaussian kernel to construct image pyramid. Because Gaussian kernel is a linear kernel, no other noise interference will be introduced in the process of downsampling the image, and another scale of the image can be naturally extracted. The specific construction process of the image feature extraction module is as follows: take the original low-light image as input, as the low-level image, and construct Gaussian image pyramid from bottom to top. Convolve the low-level image with the Gaussian kernel (Gaussian filtering), smooth the result and then downsample it to obtain the upper-level image.

[0047] According to one aspect of the present disclosure, there is provided an early warning device for water conservancy flood control, characterized in that the device comprises: The water level gauge image acquisition module is used to collect water level gauge images at the river site; The water level image processing module is used to process the collected water level image and enhance the image that is too dark; A water level data calculation module is used to calculate the water level information based on the water level gauge information extracted from the processed image; Water level warning push module: pushes water level information exceeding the warning line to the mobile terminal or cloud server in real time.

[0048] Decode the real-time video stream of the water level detection point collected by the surveillance camera, intercept the water level video at regular intervals, and convert the video into image frames as the image data of the water level detection module; pre-process the collected water level image, and enhance the image if it is too dark. Then, use the water level image processing method in this paper to extract the water gauge area and the scale line, and hand it over to the water level data calculation module. The water level information is pushed to the mobile terminal or cloud server in real time.

[0049] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0050] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. An early warning method for water conservancy and flood control, characterized in that: The method comprises: Acquire a water level gauge image acquired by an image acquisition device; Convert the water gauge image into the HSV color space to obtain an HSV image; Separate the HSV image into hue, saturation and brightness, and grayscale the separated hue component, saturation component and brightness component to obtain a grayscale image; Determining whether the water gauge image is a low-light image or a normal-light image by using the brightness component; If it is a low-light image, brightness enhancement processing is performed; the enhanced image or the normal-light image is subjected to image binarization processing; The binarized image is filtered using a 5×5 convolution kernel; The minimum enclosing matrix of the water level gauge is calculated for the filtered image, and the water level gauge area is extracted. The lower boundary of the water level gauge area is the water level line, and the upper boundary is the top of the water level gauge. Counting the number of scale lines in the water level gauge area, and calculating the water level value according to the number of scale lines; If the water level value is greater than the warning value, an alarm instruction is sent to the mobile terminal or cloud server.

2. The early warning method for water conservancy and flood control according to claim 1, characterized in that: Calculate the minimum enclosing matrix of the water level gauge for the filtered image and extract the water level gauge area, including: The convex polygon surrounding the point set is determined according to the coordinate information of the point set in the filtered image, and a side of the convex polygon is collinear with the side of the circumscribed rectangle to obtain multiple circumscribed rectangles. The areas of the multiple circumscribed rectangles are compared, and the smallest one is selected as the minimum area circumscribed rectangle.

3. The early warning method for water conservancy and flood control according to claim 1, characterized in that: The brightness component is used to determine whether the water level gauge image belongs to a low-light image or a normal-light image, including: calculating the mean of the brightness component of the image, and determining whether the mean is greater than a first threshold value, if it is greater than the first threshold value, determining it to be a normal-light image, and if it is less than the first threshold value, determining it to be a low-light image.

4. The early warning method for water conservancy and flood control according to claim 1, characterized in that: The brightness enhancement process comprises: The feature extraction module is used to extract features from low-light images: feature extraction is performed at different scales; The feature-extracted image is decomposed through a layer decomposition module to obtain reflection images of different scales and illumination images of different scales; Through the feature fusion module, deep feature extraction and cross-scale fusion are performed on multi-scale reflection images and illumination images to eliminate redundant information, realize cross-scale fusion of complementary feature information, and obtain multi-scale reflection images and multi-scale illumination images; The reflectivity restoration module is responsible for removing degradation from multi-scale reflectance images; The illumination adjustment module is responsible for adjusting the illumination of the illumination image; The image fusion module fuses the reflection image and the illumination image to obtain an enhanced image.

5. The early warning method for water conservancy and flood control according to claim 4, characterized in that: The feature extraction module is used to extract features from the low-light image: feature extraction is performed at different scales, including: taking the original low-light image as input, as a low-level image, constructing a Gaussian image pyramid from bottom to top, convolving the low-level image with a Gaussian kernel, and smoothing the result of the convolution operation and then down-sampling it to obtain an upper-level image.

6. The early warning method for water conservancy and flood control according to claim 4, characterized in that: The layer decomposition module decomposes the image after feature extraction to obtain reflection images of different scales and illumination images of different scales, including: the original image after feature extraction passes through a convolution layer, and the obtained feature map will be sent to two branches, the first branch goes to the reflectance map part, and is operated by eight consecutive convolution pooling operations. After each pooling operation, it passes through a batch normalization layer; the second branch obtains the illumination map, the feature map obtained by the first convolution layer is connected with the reflectance map through four consecutive convolution operations, and finally passes through a normalization layer to obtain the illumination map.

7. The early warning method for water conservancy and flood control according to claim 4, characterized in that: The reflectivity restoration module is responsible for removing degradation from multi-scale reflective images, including: The image segmentation network structure, the downsampling part is 6 consecutive convolution operations, the kernel size is 3x3, the number of channels is 32, 64, 64, 128, 128, 256, and the pooling sampling is the maximum pooling operation with a step size of 2; the upsampling is 6 consecutive convolution operations, the kernel size is 3x3, the number of channels is 256, 128, 128, 64, 64, 32, and the feature map obtained in the downsampling is connected in sequence to obtain the feature map with twice the original channels, and finally pass through an activation function layer to get the result.

8. The early warning method for water conservancy and flood control according to claim 4, characterized in that: The illumination adjustment module is responsible for performing illumination adjustment on the illumination image, including: the input feature map passes through 4 convolutional layers, wherein the kernel size of each convolutional layer is 3x3, the number of channels of the first three convolutional layers is 32, the number of channels of the last one is 1, the activation function is the Leaky Rule function, and finally a normalization layer is used for normalization.

9. The early warning method for water conservancy and flood control according to claim 4, characterized in that: The image fusion module fuses the reflection image and the illumination image to obtain an enhanced image, including: step 1, first passing the high-scale reflection image or the illumination image through multiple residual recursive units, and then upsampling it using a deconvolution layer to keep the scale consistent with the next layer of reflection image, the upsampling rate should be consistent with the downsampling rate in the image feature extraction module, the transformed high-scale upper layer image is consistent in size with the low-scale lower layer image, and then the transformed high-scale upper layer image and the low-scale lower layer image are added pixel by pixel to achieve cross-scale image fusion; a multi-scale fused reflection image or a multi-scale fused illumination image is obtained; wherein each residual recursive unit is composed of a 3×3 convolution layer, a 2×2 normalization layer and a ReLU activation function.

10. An early warning device for water conservancy and flood control, characterized in that: The early warning device applies the method described in any one of claims 1 to 9, and the device comprises: The water level gauge image acquisition module is used to collect water level gauge images at the river site; The water level image processing module is used to process the collected water level image and enhance the image that is too dark; A water level data calculation module is used to calculate the water level information based on the water level gauge information extracted from the processed image; Water level warning push module: pushes water level information exceeding the warning line to the mobile terminal or cloud server in real time.

Citation Information

Cited By

  • Liquid level monitoring system of flow battery based on machine vision

    CN120445360A