Water accumulation detection method, device, apparatus and storage medium
By using fluorescent stickers as scales in dark environments, combined with infrared mode and image processing technology, the problem of water accumulation detection being unable to occur in dark environments has been solved, achieving stable water accumulation detection and water level calculation, saving resources and time.
Patent Information
- Application Number
- CN202111504798.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-10
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2041-12-10
AI Technical Summary
Existing water accumulation detection methods cannot effectively detect water accumulation in dark environments. The color of the water accumulation changes with the background and lighting, requiring frequent adjustments to the model threshold. The huge differences in water accumulation morphology result in poor learning performance of deep learning models and an inability to detect water accumulation depth.
Fluorescent stickers were used as scales, and images were acquired using infrared mode. Image blocks were obtained by traversing the position information of the fluorescent stickers. Combined with color space conversion and morphological operations, the water level height was calculated. A single water level rise depth test method was used to determine whether water accumulation existed and its depth.
Stable detection of water accumulation in dark environments avoids frequent adjustments to model thresholds, saves data set creation steps, shortens development cycles, conserves resources, increases detection stability, and calculates water level height.
Smart Images

Figure CN114494680B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and more specifically, to a method, apparatus, device, and storage medium for detecting water accumulation. Background Technology
[0002] Community properties and certain specialized businesses often have numerous basements for storage, frequently used to store goods or other important items. These basements typically have limited natural light and are usually dark. Due to uncontrollable factors such as rainy seasons or burst water pipes, flooding in these basements can often cause irreparable damage to homeowners.
[0003] Currently, no technology has been found in the field of intelligent video algorithms to detect water accumulation in basements under dark conditions. Current water accumulation detection methods are all designed for detecting water accumulation on roads under lit conditions.
[0004] Currently, besides commonly used sensor deployments, the intelligent video field primarily employs two methods for detecting road surface water. The first method uses pre-trained object detection or semantic segmentation models to detect water in the image. While logically simple, this method is inexhaustible due to the vast differences in water shape and the fact that water color changes with background and lighting, leading to low model accuracy. The second method uses image space transformation combined with object detection or semantic segmentation models to extract features matching a water color threshold from the image, then uses a pre-trained model for inference. Similarly, this method is highly sensitive to water color, requiring frequent threshold adjustments for different lighting conditions and environments. Furthermore, the inexhaustible nature of water shape results in poor performance of the pre-trained model. In low-light conditions, the situation becomes even more complex.
[0005] Therefore, how to solve the problems that road water accumulation detection cannot detect water accumulation in the dark, the color of water accumulation changes with the background and lighting, requiring frequent adjustment of the model threshold, and the huge differences in water accumulation shape that cannot be exhausted, resulting in poor learning effect of deep learning models and inability to detect water accumulation depth, are technical problems that urgently need to be solved by those skilled in the art.
[0006] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0007] To address the problems in the prior art, the present invention aims to provide a water accumulation detection method, apparatus, device, and storage medium, which overcomes the difficulties of the prior art and solves the problems that road water accumulation detection cannot detect water accumulation in the dark, the color of water accumulation changes with the background and lighting, requiring frequent adjustment of the model threshold, and the huge differences in water accumulation morphology that cannot be exhaustively represented, resulting in poor learning effect of deep learning models and inability to detect water accumulation depth.
[0008] An embodiment of the present invention provides a method for detecting water accumulation, comprising:
[0009] In infrared mode, an image of the area to be detected is acquired. The area to be detected is covered with fluorescent stickers used as scales. Each fluorescent sticker is associated with a sticker identifier and position information.
[0010] In the image, the position information of the fluorescent sticker is traversed to obtain multiple image blocks;
[0011] Based on the pixel values of each pixel in the acquired image block, determine whether the fluorescent sticker corresponding to each image block is obscured;
[0012] Calculate the water level height in the area to be detected based on whether the fluorescent stickers are obscured.
[0013] In some embodiments of the present invention, the step of traversing the position information of the fluorescent sticker in the image to obtain multiple image blocks includes:
[0014] Perform color space conversion on the acquired image patches.
[0015] In some embodiments of the present invention, traversing the position information of the fluorescent sticker in the image to obtain multiple image blocks includes one of the following traversal methods:
[0016] According to the scale of the fluorescent sticker, the position information of the fluorescent sticker is traversed in the image from large to small;
[0017] According to the scale of the fluorescent sticker, the position information of the fluorescent sticker is traversed in the image from small to large;
[0018] According to the scale of the fluorescent sticker, starting from the set position, the position information of the fluorescent sticker is traversed, wherein the traversal direction is determined according to whether the fluorescent sticker at the set position is blocked.
[0019] In some embodiments of the present invention, the traversal direction is determined according to the following steps:
[0020] If the fluorescent sticker at the set position is blocked, the traversal direction will be from the set position toward the smaller scale.
[0021] If the fluorescent sticker at the set position is not obscured, then the traversal direction will be from the set position toward the larger scale.
[0022] In some embodiments of the present invention, the step of determining whether the fluorescent sticker corresponding to each image block is obscured based on the pixel values of each pixel of the acquired image block is as follows:
[0023] Calculate the number of target pixels in the image block, where the target pixels are pixels whose pixel values are within a first color threshold range;
[0024] Calculate the ratio of the number of target pixels to the total number of pixels in the image block;
[0025] When the calculated ratio is greater than or equal to the second ratio threshold, it is determined that the image block is not occluded;
[0026] When the calculated ratio is less than the second ratio threshold, it is determined that the image block is occluded.
[0027] In some embodiments of the present invention, the water level in the area to be detected is equal to the total number of graduations minus the maximum graduation of the obscured fluorescent sticker.
[0028] In some embodiments of the present invention, it further includes:
[0029] If the difference between the current water level in the area to be detected and the previous water level in the area to be detected is greater than a third preset threshold, a water accumulation alarm message will be generated.
[0030] According to another aspect of the present invention, a water accumulation detection device is also provided, comprising:
[0031] The acquisition module is configured to acquire images of the area to be detected in infrared mode. The area to be detected is covered with fluorescent stickers used as scales, and each fluorescent sticker is associated with a sticker identifier and position information.
[0032] An image block acquisition module is configured to traverse the position information of the fluorescent sticker in the image to acquire multiple image blocks;
[0033] The occlusion determination module is configured to determine whether the fluorescent sticker corresponding to each image block is occluded based on the pixel value of each pixel of the acquired image block.
[0034] The water level calculation module is configured to calculate the water level height of the area to be detected based on whether each fluorescent sticker is obscured.
[0035] According to another aspect of the present invention, a water accumulation detection and treatment device is also provided, comprising:
[0036] processor;
[0037] A memory in which executable instructions of the processor are stored;
[0038] The processor is configured to perform the steps of the water accumulation detection method described above by executing the executable instructions.
[0039] Embodiments of the present invention also provide a computer-readable storage medium for storing a program, which, when executed, implements the steps of the above-described water accumulation detection method.
[0040] Compared with the prior art, the purpose of this invention is:
[0041] On the one hand, by utilizing the reflective properties of fluorescent strips in the dark, this invention can be used in dark environments. On the other hand, by leveraging the characteristic that the same fluorescent strip has a certain color range in the camera's infrared mode, there is no need to frequently modify the model's color threshold, and it is less affected by the background color. Furthermore, by using the detection of fluorescent strips instead of deep learning, the steps of creating datasets are saved, avoiding the poor inference performance of deep learning models due to the varying shapes of water accumulation, shortening the development cycle, saving development resources, and reducing costs and increasing efficiency. Moreover, by using a single water level rise depth verification method to calculate the rate of water rise, it can determine whether there is actual water accumulation or whether the scale line is obscured, increasing the stability of the detection method and allowing for the calculation of water level height. Finally, there is no need to deploy a large number of additional IoT sensor devices. Thus, this invention solves the problems of road water accumulation detection not being able to detect water accumulation in the dark, the need for frequent model threshold adjustments due to changes in water color with background and lighting, and the inability to exhaustively measure the vast differences in water accumulation shapes, resulting in poor learning performance of deep learning models and the inability to detect water depth. Attached Figure Description
[0042] Other features, objects, and advantages of the invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings.
[0043] Figure 1 This is a flowchart of a water accumulation detection method.
[0044] Figure 2 This is a flowchart of one embodiment of the water accumulation detection method of the present invention.
[0045] Figure 3 This is a flowchart of another embodiment of the water accumulation detection method of the present invention.
[0046] Figure 4 This is a flowchart of a specific embodiment of the water accumulation detection method of the present invention.
[0047] Figure 5This is a schematic diagram of a module of one embodiment of the water accumulation detection device of the present invention.
[0048] Figure 6 This is a schematic diagram of another embodiment of the water accumulation detection device of the present invention.
[0049] Figure 7 This is a schematic diagram of the water accumulation detection device of the present invention.
[0050] Figure 8 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of the present invention. Detailed Implementation
[0051] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that the invention will be thorough and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and therefore repeated descriptions of them will be omitted.
[0052] See below. Figure 1 , Figure 1 This is a flowchart of a water accumulation detection method. It uses image space transformation combined with object detection or semantic segmentation models to extract features from the image that meet a water accumulation color threshold, and then uses a pre-trained model for inference. First, step S101 acquires the image; then step S102 performs image correction; step S103 performs color space transformation on the corrected image; step S104 analyzes the color characteristics and saturation of pixels; step S105 retains pixels that meet the set threshold; step S106 performs morphological operations on the retained pixels; step S107 performs connected region analysis after morphological operations; step S108 removes image patches with areas smaller than the threshold; step S109 performs contour complexity analysis on the remaining image patches; and step S110 uses a pre-trained model under daylight conditions for inference. However, this method is very sensitive to water accumulation color, requiring frequent threshold adjustments for different lighting conditions and environments. Furthermore, the inexhaustible nature of water accumulation shapes can lead to poor performance of the pre-trained model. In low-light, dark environments, the actual situation is even more complex.
[0053] See Figure 2 , Figure 2 This is a flowchart of one embodiment of the water accumulation detection method of the present invention. An embodiment of the present invention provides a water accumulation detection method, including the following steps:
[0054] Step S210: In infrared mode, acquire an image of the area to be detected, wherein the area to be detected is covered with fluorescent stickers used as scales, and each fluorescent sticker is associated with a sticker identifier and position information.
[0055] Specifically, fluorescent stickers serve as length markers in the area to be detected, arranged along the direction of water rise, with the scale markings decreasing in size to represent the corresponding marker positions. In some embodiments, the distance between each fluorescent sticker can be the same, allowing the sticker markings to increase uniformly from largest to smallest according to their position. In still other embodiments, the distance between each fluorescent sticker can be different, allowing the sticker markings to increase in size from largest to smallest according to their position, with the increase being positively correlated with the distance between the stickers. This application can realize many more uses of fluorescent stickers, which will not be elaborated here.
[0056] Specifically, the fluorescent sticker can be rectangular or other shapes. Specifically, depending on the shape of the fluorescent sticker, corresponding positional information can be provided. For example, for a rectangular fluorescent sticker, the horizontal and vertical coordinates of each vertex (or designated vertices) of the fluorescent sticker can be provided. In some embodiments, the horizontal and vertical coordinates of the top-left and bottom-right corners of the rectangle in the image can be used as the positional information of the fluorescent sticker. If the fluorescent sticker is another polygon, the horizontal and vertical coordinates of each vertex of the polygon can be obtained as the positional information. This application is not limited thereto.
[0057] In some embodiments, the location information may indicate the position of the fluorescent sticker in the area to be detected. In other embodiments, the location information may also indicate the position of the fluorescent sticker in an image of the area to be detected. For example, when there is no water accumulation in the area to be detected, an image of the area to be detected can be acquired by an acquisition module to obtain the position of the fluorescent sticker in that image. Furthermore, during water accumulation detection, an acquisition module with the same field of view can be used to acquire images of the area to be detected, thereby obtaining corresponding and consistent images to facilitate water accumulation detection.
[0058] Step S220: Traverse the position information of the fluorescent sticker in the image to obtain multiple image blocks.
[0059] Specifically, step S220 can be performed in one of the following traversal methods: traversing the position information of the fluorescent sticker in the image from large to small according to the scale of the fluorescent sticker; traversing the position information of the fluorescent sticker in the image from small to large according to the scale of the fluorescent sticker; traversing the position information of the fluorescent sticker starting from a set position according to the scale of the fluorescent sticker, wherein the traversal direction is determined according to whether the fluorescent sticker at the set position is obscured.
[0060] Specifically, in a scenario traversed from smallest to largest, if the current fluorescent sticker is not obscured, the next fluorescent sticker is obtained in the direction of the larger scale to determine whether the next fluorescent sticker is obscured; if the current fluorescent sticker is obscured, and according to the traversal method from smallest to largest, the current fluorescent sticker is the one that is just obscured, the water level is approximately at the current fluorescent sticker / the previous fluorescent sticker.
[0061] Specifically, in a scenario traversed from largest to smallest, if the current fluorescent sticker is obscured, the next fluorescent sticker is obtained in the direction of the smaller scale to determine whether the next fluorescent sticker is obscured; if the current fluorescent sticker is not obscured, and according to the traversal method from largest to smallest, the current fluorescent sticker is the one that was just not obscured, the water level is approximately at the current fluorescent sticker / the previous fluorescent sticker.
[0062] Specifically, in an embodiment where the position information of the fluorescent sticker is traversed from a set position according to the scale of the fluorescent sticker, the traversal direction is determined according to the following steps: if the fluorescent sticker at the set position is covered, then the traversal direction is taken from the set position towards the smaller scale; if the fluorescent sticker at the set position is not covered, then the traversal direction is taken from the set position towards the larger scale.
[0063] Step S230: Determine whether the fluorescent sticker corresponding to each image block is covered based on the pixel value of each pixel of the acquired image block.
[0064] Step S240: Calculate the water level height in the area to be detected based on whether each fluorescent sticker is obscured.
[0065] This invention addresses several key issues. First, it utilizes the reflective properties of fluorescent strips in darkness, enabling its use in low-light environments. Second, it leverages the consistent color range of the same fluorescent strip in infrared camera mode, eliminating the need for frequent adjustments to the model's color threshold and minimizing the impact of background color variations. Third, it replaces deep learning with fluorescent strip detection, saving the steps of dataset creation and avoiding the poor inference performance of deep learning models due to varying water morphologies, thus shortening the development cycle, saving development resources, and reducing costs while increasing efficiency. Fourth, it employs a single-instance water level rise depth verification method to calculate the rate of water level rise, thereby determining whether water accumulation is genuine or if the scale lines are obscured, increasing the stability of the detection method and allowing for the calculation of water level height. Fifth, it eliminates the need to deploy numerous additional IoT sensor devices. Therefore, this invention solves several problems related to road surface water detection: the inability to detect water accumulation in darkness, the need for frequent model threshold adjustments due to changes in water color with background and lighting, and the inability to exhaustively measure the vast differences in water morphologies, leading to poor learning performance and the inability to detect water depth using deep learning models.
[0066] See below. Figure 3 , Figure 3 This is a flowchart of another embodiment of the water accumulation detection method of the present invention. (See flowchart for example.) Figure 3 As shown, the water accumulation detection method includes:
[0067] Step S310: In infrared mode, acquire an image of the area to be detected, wherein the area to be detected is covered with fluorescent stickers used as scales, and each fluorescent sticker is associated with a sticker identifier and position information;
[0068] Step S320: Traverse the position information of the fluorescent sticker in the image to obtain multiple image blocks;
[0069] Step S330: Perform color space conversion on the acquired multiple image blocks.
[0070] Step S340: Calculate the number of target pixels in the image block, where the target pixels are pixels whose pixel values are within the first color threshold range;
[0071] Step S350: Calculate the ratio of the number of target pixels to the total number of pixels in the image block;
[0072] Step S360: When the calculated ratio is greater than or equal to the second ratio threshold, it is determined that the image block is not occluded;
[0073] Step S370: When the calculated ratio is less than the second ratio threshold, it is determined that the image block is occluded;
[0074] Step S380: Make the water level in the area to be detected equal to the total number of graduations minus the maximum graduation of the obscured fluorescent sticker;
[0075] Step S390: If the difference between the current water level in the area to be detected and the previous water level in the area to be detected is greater than a third preset threshold, a water accumulation alarm message is generated.
[0076] Therefore, addressing the shortcomings of the aforementioned road surface water detection methods—namely, their inability to detect water accumulation in darkness, the need for frequent model threshold adjustments due to changes in water color with background and lighting, and the inability to exhaustively represent all water morphology variations leading to poor learning performance and failure to detect water depth—this invention proposes a method that utilizes the reflective stripes of fluorescent strip stickers as scale lines in the infrared mode of a camera. This method combines visual image color space conversion, image morphological operations, and a single water level rise depth test method to determine the presence of water accumulation in a basement in a dark environment and output the water depth. Specifically, the color space conversion in step S330 refers to using different metrics to describe color, commonly RGB. Color space conversion involves changing the original color space of multiple image blocks acquired in S320, enabling better differentiation of fluorescent strip pixels from other pixels in S330 to facilitate the calculation of the number of fluorescent strip pixels. Morphological operations can be performed in step S340. Morphological operations address the situation where, after extracting fluorescent strip pixels in S330, there may be large areas of fluorescent pixels clustered together, while scattered pixels are distributed around them. At this point, morphological operations are needed to erode or dilate all the extracted fluorescent pixels (depending on the situation), that is, to remove scattered fluorescent pixels or expand the number of fluorescent pixels so that all pixels are connected together.
[0077] This embodiment uses the reflective stripes of fluorescent strip stickers as scale markers. Since the color of the same fluorescent strip is consistent in infrared mode, there is no need to frequently modify the color space conversion threshold. Furthermore, this invention does not use a deep learning model; instead, it detects whether the fluorescent strip scale disappears. This avoids the poor inference performance of deep learning models due to varying water accumulation patterns, shortening the development cycle, saving development resources, and reducing costs while increasing efficiency. Finally, this invention uses a pioneering single-instance water level rise depth verification method to calculate the water rise rate, thereby determining whether there is actual water accumulation or if the scale is obscured, increasing the stability of the detection method.
[0078] See below. Figure 4 , Figure 4 This is a flowchart illustrating a specific embodiment of the water accumulation detection method of the present invention. The following steps are shown in section 4:
[0079] Step S401: Image input.
[0080] Specifically, the input image can be an image of the area to be detected when there is no water accumulation.
[0081] Step S402: Pre-mark the set T of readable pixel block locations of fluorescent bars in the image as a scale.
[0082] Step S403: Traverse the pixel block regions corresponding to the fluorescent bars in the image from small to large according to the scale.
[0083] Step S404: In the image to be detected, extract the image block corresponding to the next scale tk region position in the above traversal direction.
[0084] Step S405: Perform color space conversion on this image block.
[0085] Step S406: Count the number Sk of pixels that meet the first color threshold (this threshold can be obtained from actual scene measurement experiments).
[0086] Step S407: Calculate the ratio of Sk to the total number of pixels in the image block.
[0087] Step S408: Determine whether the calculated ratio is greater than or equal to the second threshold (this threshold can be set to 0.5 and can be adjusted according to the actual situation).
[0088] If step S408 determines that it is yes, it means that the current scale tk can be detected as not being covered by water. Therefore, return to step S404 to retrieve the image block of the next scale for judgment.
[0089] If step S408 is incorrect, it means that the current scale tk cannot be detected, and there may be water accumulation. Therefore, step S409 is executed: calculate the difference Rk between the total number of scales T n and the current scale index k as the current water level height.
[0090] Step S410: Calculate the difference between the current water level and the previous water level.
[0091] Step S411: Determine whether the calculated difference is less than the third threshold.
[0092] If step S411 determines that it is true, then proceed to step S412: assign the current water level height to the previous water level height. Step S413: issue a water accumulation alarm and output the water accumulation height.
[0093] If step S411 determines no, then step S414 is executed: output a water level rise alarm.
[0094] In some embodiments, if step S411 determines no, it may indicate that the water level is rising too fast, which is inconsistent with the actual situation, and there may be a situation where the scale tk is obstructed, and no water accumulation has occurred. Therefore, when a water level rise alarm is received, the water level can be determined through further image processing algorithms / manual methods.
[0095] The above is merely an illustrative description of the specific implementation of the present invention, and the present invention is not intended to be limited thereto. The splitting, merging, and execution order of steps, the splitting and merging of modules, and the changes in information transmission are all within the protection scope of the present invention.
[0096] Figure 5 This is a schematic diagram of a module of one embodiment of the water accumulation detection device of the present invention. The water accumulation detection device 500 of the present invention, as shown... Figure 5 As shown, it includes, but is not limited to: acquisition module 510, image block acquisition module 520, occlusion determination module 530, and water level calculation module 540.
[0097] The acquisition module 510 is configured to acquire images of the area to be detected in infrared mode. The area to be detected is covered with fluorescent stickers used as scales, and each fluorescent sticker is associated with a sticker identifier and position information.
[0098] The image block acquisition module 520 is configured to traverse the position information of the fluorescent sticker in the image to acquire multiple image blocks;
[0099] The occlusion determination module 530 is configured to determine whether the fluorescent sticker corresponding to each image block is occluded based on the pixel value of each pixel of the acquired image block;
[0100] The water level calculation module 540 is configured to calculate the water level height of the area to be detected based on whether each fluorescent sticker is blocked.
[0101] The implementation principle of the above modules can be found in the relevant introduction in the water accumulation detection method, and will not be repeated here.
[0102] The water accumulation detection device of this invention, on the one hand, utilizes the reflective properties of fluorescent strips in the dark, enabling its use in dark environments; on the other hand, it leverages the characteristic that the same fluorescent strip has a fixed color range in the infrared mode of the camera, eliminating the need for frequent adjustments to the model's color threshold and minimizing the impact of background color. Furthermore, it uses fluorescent strip detection instead of deep learning, saving the steps of creating datasets and avoiding poor inference performance of deep learning models due to varying water accumulation patterns, thus shortening the development cycle, saving development resources, and reducing costs while increasing efficiency. Moreover, it utilizes a single-instance water level rise depth verification method to calculate the rate of water rise, thereby determining whether there is actual water accumulation or if the scale lines are obscured, increasing the stability of the detection method and allowing for the calculation of water level height. Finally, it eliminates the need to deploy a large number of additional IoT sensor devices. Therefore, it solves the problems of road water accumulation detection being unable to detect water accumulation in the dark, the need for frequent model threshold adjustments due to changes in water color with background and lighting, and the inability to exhaustively measure the vast differences in water accumulation patterns, leading to poor learning performance of deep learning models and their inability to detect water depth.
[0103] Figure 6 This is a schematic diagram of another embodiment of the water accumulation detection device of the present invention. The water accumulation detection device 600 of the present invention includes, but is not limited to:
[0104] The acquisition module 601 is used to acquire an image of a region to be detected in infrared mode. The region to be detected is covered with fluorescent stickers used as scales, and each fluorescent sticker is associated with a sticker identifier and position information.
[0105] The image block acquisition module 602 is used to traverse the position information of the fluorescent sticker in the image to acquire multiple image blocks;
[0106] The conversion module 603 is used to perform color space conversion on the acquired multiple image blocks.
[0107] The first calculation module 604 is used to calculate the number of target pixels in the image block, wherein the target pixels are pixels whose pixel values are within a first color threshold range;
[0108] The second calculation module 605 is used to calculate the ratio of the number of target pixels to the total number of pixels in the image block;
[0109] The occlusion determination module 606 is used to determine that the image block is not occluded when the calculated ratio is greater than or equal to the second ratio threshold.
[0110] The unoccluded determination module 607 is used to determine that the image block is occluded when the calculated ratio is less than the second ratio threshold.
[0111] The water level calculation module 608 is used to make the water level height of the area to be detected equal to the total number of scales minus the maximum scale of the obscured fluorescent sticker.
[0112] The alarm module 609 is used to generate a water accumulation alarm when the difference between the current water level in the area to be detected and the previous water level in the area to be detected is greater than a third preset threshold.
[0113] The implementation principle of the above modules can be found in the relevant introduction in the water accumulation detection method, and will not be repeated here.
[0114] Figure 5 and Figure 6 The water accumulation detection devices 500 and 600 provided by this invention are merely illustrative examples. Without departing from the inventive concept, the splitting, merging, and addition of modules are all within the scope of protection of this invention. The water accumulation detection devices 500 and 600 provided by this invention can be implemented by software, hardware, firmware, plugins, and any combination thereof; this invention is not limited thereto.
[0115] This invention also provides a water accumulation detection and processing device, including a processor and a memory storing executable instructions for the processor. The processor is configured to execute steps of a water accumulation detection method by executing the executable instructions.
[0116] As shown above, this embodiment of the water accumulation detection and processing device of the present invention, on the one hand, utilizes the reflective properties of fluorescent strips in the dark, enabling the invention to be used in dark environments; on the other hand, it utilizes the characteristic that the same fluorescent strip has a certain color range in the infrared mode of the camera, eliminating the need for frequent adjustments to the model color threshold and minimizing the impact of background color; furthermore, it uses the detection of fluorescent strips instead of deep learning, saving the steps of creating datasets and avoiding poor inference performance of deep learning models due to varying water accumulation shapes, shortening the development cycle, saving development resources, and reducing costs and increasing efficiency; furthermore, it uses a single water level rise depth verification method to calculate the water rise rate, thereby determining whether there is actual water accumulation or if the scale line is obscured, increasing the stability of the detection method and also allowing for the calculation of water level height; and finally, it eliminates the need to deploy a large number of additional IoT sensor devices. Therefore, it solves the problems of road water accumulation detection being unable to detect water accumulation in the dark, the need for frequent model threshold adjustments due to changes in water color with background and lighting, and the inability to exhaustively measure the vast differences in water accumulation shapes, leading to poor learning performance of deep learning models and their inability to detect water depth.
[0117] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "platform."
[0118] Figure 7 This is a structural schematic diagram of the water accumulation detection and treatment device of the present invention. See below for reference. Figure 7 To describe an electronic device 700 according to this embodiment of the present invention. Figure 7 The electronic device 700 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0119] like Figure 7 As shown, the electronic device 700 is presented in the form of a general-purpose computing device. The components of the electronic device 700 may include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different platform components (including storage unit 720 and processing unit 710), a display unit 740, etc.
[0120] The storage unit stores program code, which can be executed by the processing unit 710 to perform the steps described in the above-described water accumulation detection method section of this specification, according to various exemplary embodiments of the present invention. For example, the processing unit 710 can perform actions such as... Figure 2 The steps are shown in the figure.
[0121] Storage unit 720 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 7201 and / or cache memory 7202, and may further include a read-only memory (ROM) 7203.
[0122] The storage unit 720 may also include a program / utility 7204 having a set (at least one) program module 7205, such program module 7205 including but not limited to: an operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.
[0123] Bus 730 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0124] Electronic device 700 can also communicate with one or more external devices 7001 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 700, and / or with any device that enables electronic device 700 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 950. Furthermore, electronic device 700 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 960. Network adapter 960 can communicate with other modules of electronic device 700 via bus 730. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0125] This invention also provides a computer-readable storage medium for storing a program, which, when executed, implements the steps of a water accumulation detection method. In some possible implementations, various aspects of this invention can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to perform the steps described in the above-described water accumulation detection method section of this specification according to various exemplary embodiments of the invention.
[0126] As shown above, the computer-readable storage medium used in this embodiment for performing water accumulation detection, on the one hand, utilizes the reflective properties of fluorescent strips in the dark, enabling the invention to be used in dark environments; on the other hand, it utilizes the characteristic that the same fluorescent strip has a certain color range in the infrared mode of the camera, eliminating the need for frequent adjustments to the model color threshold and minimizing the impact of background color; furthermore, it uses the detection of fluorescent strips instead of deep learning, saving the steps of creating datasets, avoiding poor inference performance of deep learning models due to varying water accumulation shapes, shortening the development cycle, saving development resources, and reducing costs while increasing efficiency; furthermore, it uses a single water level rise depth verification method to calculate the water rise rate, thereby determining whether there is actual water accumulation or if the scale line is obscured, increasing the stability of the detection method and also allowing for the calculation of water level height; and finally, it eliminates the need to deploy a large number of additional IoT sensor devices. Therefore, it solves the problems of road water accumulation detection being unable to detect water accumulation in the dark, the need for frequent model threshold adjustments due to changes in water color with background and lighting, and the inability to exhaustively measure the vast differences in water accumulation shapes, leading to poor learning performance of deep learning models and their inability to detect water depth.
[0127] Figure 8 This is a schematic diagram of the structure of the computer-readable storage medium of the present invention. (Reference) Figure 8 As shown, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described. This product may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0128] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0129] Computer-readable storage media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable storage medium may also be any readable medium other than a readable storage medium that can transmit, propagate, or transfer a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0130] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0131] In summary, this application addresses several key issues. First, by utilizing the reflective properties of fluorescent strips in darkness, the invention can be used in dark environments. Second, by leveraging the consistent color range of the same fluorescent strip in the camera's infrared mode, frequent adjustments to the model's color threshold are unnecessary, minimizing the impact of background color. Third, by replacing deep learning with fluorescent strip detection, the process of creating datasets is saved, avoiding the poor inference performance of deep learning models due to varying water morphologies, thus shortening the development cycle, saving development resources, and reducing costs while increasing efficiency. Fourth, by employing a single-instance water level rise depth verification method to calculate the water level rise rate, the method can determine whether water accumulation is genuine or if the scale lines are obscured, increasing the stability of the detection method and allowing for the calculation of water level height. Fifth, it eliminates the need to deploy numerous additional IoT sensor devices. Therefore, this invention solves the problems of road surface water detection being unable to detect water accumulation in darkness, the need for frequent model threshold adjustments due to changes in water color with background and lighting, and the inability to exhaustively measure the vast differences in water morphologies, leading to poor learning performance of deep learning models and their inability to detect water depth.
[0132] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A water accumulation detection method characterized by comprising: The method comprises the following steps: Infrared mode is used to collect images of the detection area, and the detection area is attached with fluorescent stickers as scales, each of which is associated with a sticker identifier and position information; In the image, the position information of the fluorescent stickers is traversed to obtain a plurality of image blocks, and the obtained plurality of image blocks are color space converted; The traversal of the position information of the fluorescent stickers includes: starting from a set position according to the scale of the fluorescent stickers, traversing the position information of the fluorescent stickers, wherein the traversal direction is determined according to whether the fluorescent stickers at the set position are blocked; if the fluorescent stickers at the set position are blocked, the direction from the set position to the small scale is taken as the traversal direction; if the fluorescent stickers at the set position are not blocked, the direction from the set position to the large scale is taken as the traversal direction; According to the pixel values of each pixel point of the obtained image block, it is determined whether the corresponding fluorescent sticker of each image block is blocked; According to whether each fluorescent sticker is blocked, the water level height of the detection area is calculated.
2. The water accumulation detection method according to claim 1, characterized by, According to the pixel values of each pixel point of the obtained image block, it is determined whether the corresponding fluorescent sticker of each image block is blocked: The number of target pixel points in the image block is calculated, the target pixel point being a pixel point with a pixel value within a first color threshold range; The ratio of the number of target pixel points to the total number of pixel points in the image block is calculated; When the calculated ratio is greater than or equal to a second proportion threshold, it is determined that the image block is not blocked; When the calculated ratio is less than the second proportion threshold, it is determined that the image block is blocked.
3. The water accumulation detection method according to claim 1, wherein The water level height of the detection area is equal to the total number of scales minus the maximum scale of the blocked fluorescent sticker.
4. The water accumulation detection method according to claim 1, characterized by, Further comprising: If the difference between the current water level height of the detection area and the previous water level height of the detection area is greater than a third set threshold, waterlogging warning information is generated.
5. A water accumulation detecting apparatus characterized by comprising: The method comprises the following steps: The acquisition module is configured to collect images of the detection area in infrared mode, and the detection area is attached with fluorescent stickers as scales, each of which is associated with a sticker identifier and position information; The image block acquisition module is configured to traverse the position information of the fluorescent stickers in the image to obtain a plurality of image blocks, and to color space convert the obtained plurality of image blocks; The traversal of the position information of the fluorescent stickers includes: starting from a set position according to the scale of the fluorescent stickers, traversing the position information of the fluorescent stickers, wherein the traversal direction is determined according to whether the fluorescent stickers at the set position are blocked; if the fluorescent stickers at the set position are blocked, the direction from the set position to the small scale is taken as the traversal direction; if the fluorescent stickers at the set position are not blocked, the direction from the set position to the large scale is taken as the traversal direction; The blocking determination module is configured to determine whether the corresponding fluorescent sticker of each image block is blocked according to the pixel values of each pixel point of the obtained image block; The blocking determination module is configured to determine whether the corresponding fluorescent sticker of each image block is blocked according to the pixel values of each pixel point of the obtained image block; The waterlogging level calculation module is configured to calculate the waterlogging level of the detection area according to whether each of the fluorescent stickers is blocked.
6. An accumulated water detection processing apparatus characterized by comprising: The method comprises the following steps: a processor; a memory, wherein executable instructions of the processor are stored; wherein the processor is configured to execute the steps of the waterlogging detection method according to any one of claims 1 to 4 by executing the executable instructions.
7. A computer readable storage medium for storing a program, characterized in that, The program is executed by the processor to implement the steps of the waterlogging detection method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Horizontal plane identifying and real-time water level measuring method based on image processing
CN107833203A
Water level measurement method
CN108759973A
Water level monitoring method based on image processing, equipment, medium and water level monitoring system
CN112085753A
Improve water level alarm device of structure
CN206479232U