Mud level equipment alarm judgment method and system based on image comparison
By comparing images of the mud level equipment before and after the alarm using image processing technology, and using texture and color indicators to identify differences, the problem of false alarms in the mud level equipment was solved, and the monitoring accuracy and effectiveness of the equipment were improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- AEROSPACE SCI & IND INERTIA TECH CO LTD
- Filing Date
- 2024-10-24
- Publication Date
- 2026-04-24
AI Technical Summary
Mud level monitoring equipment is susceptible to environmental influences, which can lead to false alarms. Frequent false alarms can reduce the early warning effectiveness of the monitoring equipment and affect residents' safety.
By comparing on-site images before and after the alarm using image processing technology, and using texture and color indicators to identify differences, the authenticity of the debris flow alarm can be determined.
It improves the accuracy of debris flow equipment alarms, reduces false alarms, saves manpower, and expands its application to monitoring scenarios of fixed image acquisition equipment.
Smart Images

Figure CN121921907A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of mud level equipment information processing technology, specifically relating to a mud level equipment alarm judgment method and system based on image comparison. Background Technology
[0002] Debris flows are a natural disaster caused by rainfall. When they occur, they are a special kind of flood that carries a large amount of solid materials such as mud, sand, rocks and boulders in gullies or hillsides. Their impact and destructive power can destroy surrounding buildings and even threaten the lives and property of residents. Therefore, it is essential to monitor debris flow-prone areas.
[0003] Currently, debris flow disaster monitoring equipment mainly consists of mud level sensors. These sensors are easily affected by the surrounding environment (such as rainfall and river vegetation growth), causing data fluctuations and triggering alarms. Such alarms are called false alarms. Frequent false alarms can lead to distrust of mud level sensors among local residents and disaster prevention personnel, and can also reduce the early warning effectiveness of the monitoring equipment when a real disaster occurs, failing to guarantee the safety of life and property of people in the surrounding area. Therefore, it is necessary to determine the accuracy of alarm information from mud level sensors.
[0004] On-site images provide the most direct reflection of the surrounding situation and effectively supplement the environmental information of traditional monitoring equipment. Therefore, installing cameras to acquire monitoring images is the most effective method for alarm judgment. However, debris flow monitoring equipment is installed in the field, and the equipment is limited by power supply and signal strength, resulting in very limited image resolution and acquisition frequency. Therefore, when using images for false alarm judgment, it is necessary to ensure the timeliness and accuracy of the equipment's alarms despite the limited image acquisition frequency.
[0005] Field monitoring equipment is generally stationary, so the angles and compositions of the images taken at the scene are usually quite similar. Therefore, by comparing the images before and after the alarm, it is possible to determine if the alarm is triggered. Summary of the Invention
[0006] To address the technical problem of false alarms in existing mud level equipment, this invention provides a method and system for judging mud level equipment alarms based on image comparison. By using image processing technology to compare on-site images before and after the alarm, the alarm information of mudflow is judged, thus solving the problem of false alarms in mud level equipment.
[0007] The technical solution adopted by the present invention to solve the above-mentioned technical problems is as follows:
[0008] This invention provides a method for determining mud level equipment alarms based on image comparison, comprising the following steps:
[0009] S1. The camera device acquires at least one reference image, wherein the reference image is an image in which no mudslide has occurred;
[0010] S2. Based on the alarm signal issued by the mud level equipment, control the camera equipment to collect at least one alarm image;
[0011] S3. Compare the alarm image with the baseline image to determine if there are any differences between the two images, and mark the locations of the differences.
[0012] S4. Compare the number of discrepancies with the alarm threshold to determine whether the mud level equipment alarm is a false alarm and whether an alarm message should be sent.
[0013] Furthermore, step S3 specifically includes the following steps:
[0014] S31. Establish several pairs of corresponding comparison points in the alarm image and the reference image respectively;
[0015] S32. Calculate the texture and color indices of each comparison point between the alarm image and the baseline image;
[0016] S33. Calculate the texture index distance and color index distance between the comparison points at the same location on the alarm image and the reference image;
[0017] S34. Compare the texture index distance and color index distance of each comparison point with the set texture threshold and color threshold respectively, and determine whether the comparison point on the alarm image is a difference point or a similar point.
[0018] S35. Determine the number of differences.
[0019] Furthermore, the comparison point is a square comparison unit, and the side length size of the comparison unit is:
[0020]
[0021] Where w is the base image width. This indicates rounding down to the nearest integer.
[0022] Furthermore, the method for establishing the comparison points is as follows: in the alarm image or the reference image, comparison points are uniformly selected in the region from size to w_size horizontally and from size to h_size vertically, where size is the side length of the comparison unit, w is the width of the reference image, and h is the height of the reference image.
[0023] Further, in step S32, the texture index is calculated using the feature vector of the SIFT descriptor on the grayscale image, and the calculation scale value of the SIFT descriptor is size;
[0024] In step S32, the color index is calculated as follows:
[0025]
[0026] Where R, G, and B are the values of the red, green, and blue color channels at a certain contrast point, respectively; μ R μ G μ B The average value of the red, green, and blue color channels within an m size*m size square centered at the comparison point, where m is a positive integer between 2 and 5;
[0027] In step S33, the method for calculating the texture index distance and color index distance between comparison points at the same location on the alarm image and the reference image is as follows:
[0028]
[0029]
[0030] Where, d t (u, v) represents the texture index distance, d c (u, v) represents the color index distance, where u and v are the comparison points at the same location on the alarm image and the reference image, respectively. Let u be the i-th dimension texture index value of the comparison point u on the alarm image. The i-th dimension texture index value of the comparison point v on the baseline image. Let j be the color index value of the j-th channel of the comparison point u in the alarm image. Let be the color index value of the j-th channel of the comparison point v on the baseline image, and I be the dimension of the texture index feature vector.
[0031] In step S34, the method for determining whether a comparison point on the alarm image is a difference point or a similar point is as follows:
[0032]
[0033] Where Dt is the texture threshold, D c This is the color threshold.
[0034] Furthermore, in step S34, the methods for setting the texture threshold and color threshold are as follows:
[0035] Image recognition is performed on alarm images and reference images to identify mud, water, soil, stones, grass, trees, snow, and unidentified monitoring areas in the output images;
[0036] The monitoring areas for mud and water are designated as key monitoring areas, the monitoring areas for soil and rocks are designated as secondary monitoring areas, and the monitoring areas for grass, trees, snow, and unidentified monitoring areas are designated as non-monitoring areas.
[0037] Set texture and color thresholds for key monitoring areas, secondary monitoring areas, and non-monitoring areas respectively.
[0038] Furthermore, when the comparison points are located in the key monitoring areas of the reference image and the key monitoring areas of the alarm image, the texture threshold and color threshold are 350:20; when the comparison points are located in the key monitoring areas of the reference image and the secondary monitoring areas of the alarm image, the texture threshold and color threshold are 360:25; when the comparison points are located in the key monitoring areas of the reference image and the non-monitoring areas of the alarm image, the texture threshold and color threshold are 370:30; when the comparison points are located in the secondary monitoring areas of the reference image and the key monitoring areas of the alarm image, the texture threshold and color threshold are 350:20; when the comparison points are located in the secondary monitoring areas of the reference image and the secondary monitoring areas of the alarm image, the texture threshold and color threshold are 350:20. When monitoring a specific area, the texture threshold and color threshold are 380:450 respectively; when the comparison points are in the secondary monitoring area of the reference image and the non-monitoring area of the alarm image, the texture threshold and color threshold are 2000:450 respectively; when the comparison points are in the non-monitoring area of the reference image and the key monitoring area of the alarm image, the texture threshold and color threshold are 370:30 respectively; when the comparison points are in the secondary monitoring area of the reference image and the secondary monitoring area of the alarm image, the texture threshold and color threshold are 2000:450 respectively; when the comparison points are in the non-monitoring area of the reference image and the non-monitoring area of the alarm image, the texture threshold and color threshold are 2000:450 respectively.
[0039] Furthermore, the method for determining the number of difference points in step S35 is as follows:
[0040] Perform cluster analysis on the differences in the alarm images. Cluster the differences in the alarm images with a distance less than q×size, discard the classes with less than or equal to p differences, and calculate the number of remaining differences n.
[0041] If the number of discrepancies n exceeds the alarm threshold, the mud level equipment alarm is a real alarm; otherwise, it is a false alarm.
[0042] Where q takes values from 3 to 6, and p takes values from 2 to 4.
[0043] Furthermore, the mud level equipment alarm judgment method also includes a step of classifying the alarm data step by step based on the alarm data of the mud level equipment;
[0044] The alarm data is classified hierarchically in ascending order into Level 1, Level 2...Z, where Z is a positive integer.
[0045] In step S4, the alarm threshold is set separately for each level of alarm data. The alarm threshold corresponding to level Z alarm data is denoted as n. z ;
[0046] In step S4, when determining whether the alarm of the mud level equipment is a false alarm, the number of discrepancies is compared with the alarm threshold of the corresponding alarm data level.
[0047] Furthermore, the alarm data of the mud level device is divided into small, medium and large mud level alarms. The small mud level alarm includes water level height alarm data of 0 to 30 mm, the medium mud level alarm includes water level height alarm data of 30 to 50 mm, and the large mud level alarm includes water level height alarm data of more than 50 mm.
[0048] The alarm threshold for the small mud level alarm is 10, the alarm threshold for the medium mud level alarm is 20, and the alarm threshold for the large mud level alarm is 40.
[0049] The present invention also provides an image comparison-based alarm judgment system for mud level equipment, comprising:
[0050] Mud level equipment and camera equipment;
[0051] The image acquisition module is used to control the camera to acquire at least one alarm image based on the alarm signal issued by the mud level equipment, and send the alarm data and alarm image to the alarm data analysis module.
[0052] The image comparison module is used to compare the collected alarm images with the reference images, determine whether there are differences between the two images, mark the location of the differences, and send the comparison results to the warning and storage module.
[0053] The early warning and storage module is used to determine whether to send an alarm message based on the comparison results, and to store alarm data and alarm images.
[0054] Furthermore, the mud level equipment alarm judgment system also includes:
[0055] The alarm data analysis module is used to classify alarm data step by step based on the alarm data from the mud level equipment.
[0056] The segmentation and recognition model is used to output alarm images and reference images containing mud, water, soil, stones, grass, trees, snow, and unidentified monitoring areas, dividing them into key monitoring areas, secondary monitoring areas, and non-monitoring areas. It also sets texture thresholds and color thresholds for key monitoring areas, secondary monitoring areas, and non-monitoring areas.
[0057] The beneficial effects of this invention compared to the prior art are as follows:
[0058] 1. This invention can determine whether the debris flow monitoring area has changed by comparing the image at the time of the alarm with a reference image, thereby improving the accuracy of debris flow equipment alarms.
[0059] 2. This invention has a module that automatically acquires alarm images and automatically outputs judgment results through an image comparison algorithm, which are then sent to maintenance personnel, greatly saving human resources.
[0060] 3. The image comparison algorithm of this invention can be extended to monitoring scenarios of fixed image acquisition devices, and has broad application prospects. Attached Figure Description
[0061] The accompanying drawings, which form part of this specification, are provided to further illustrate embodiments of the invention and, together with the textual description, explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0062] Figure 1 This is a schematic diagram illustrating the principle of an image comparison-based mud level equipment alarm judgment system provided in a specific embodiment of the present invention. Detailed Implementation
[0063] Specific embodiments of the present invention will now be described in detail. In the following description, specific details are set forth for purposes of explanation and not limitation, in order to aid in a thorough understanding of the invention. However, it will be apparent to those skilled in the art that the invention may be practiced in other embodiments departing from these specific details.
[0064] It should be noted that, in order to avoid obscuring the invention with unnecessary details, only the device structure and / or processing steps closely related to the solution of the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0065] To address the false alarm problem in existing debris flow monitoring equipment, this invention provides a system and method for debris flow alarm judgment using image processing technology, particularly relating to field monitoring equipment, which enables alarm judgment of the debris flow monitoring environment under conditions of power and flow limitations.
[0066] This invention provides a method for determining mud level equipment alarms based on image comparison, comprising the following steps:
[0067] S1. The camera device acquires at least one reference image, wherein the reference image is an image in which no mudslide has occurred;
[0068] S2. Based on the alarm signal issued by the mud level equipment, the camera equipment shall capture at least one alarm image;
[0069] S3. Compare the alarm image with the baseline image to determine if there are any differences between the two images, and mark the locations of the differences.
[0070] S4. Compare the number of discrepancies with the alarm threshold to determine whether the mud level equipment alarm is a false alarm and whether an alarm message should be sent.
[0071] Furthermore, in step S3, the alarm image is compared with the reference image to determine whether there are differences between the two images. The specific method for marking the location of the differences is as follows:
[0072] S31. Establish several pairs of corresponding (i.e., one-to-one) comparison points in the alarm image and the reference image respectively;
[0073] S32. Calculate the texture and color indices of each comparison point between the alarm image and the baseline image;
[0074] S33. Calculate the texture index distance and color index distance between the comparison points at the same location on the alarm image and the reference image;
[0075] S34. Compare the texture index distance and color index distance of each comparison point with the set texture threshold and color threshold respectively, and determine whether the comparison point on the alarm image is a difference point or a similar point.
[0076] S35. Determine the number of differences.
[0077] This method of identifying difference points can identify changes between alarm images and reference images at the pixel level. The number of difference points indicates the magnitude of the change between the two images, and the location of the difference points directly identifies the area where the change occurred. Furthermore, by adjusting the rules for setting difference point thresholds, the monitoring accuracy between different areas can be adjusted, highlighting changes in the detection area and eliminating interference from changes in non-monitored areas.
[0078] Furthermore, the comparison point is a square comparison unit, and the side length size of the comparison unit is:
[0079]
[0080] Where w is the base image width. This indicates rounding down to the nearest integer.
[0081] Furthermore, the method for establishing the comparison points is as follows: in the alarm image or the reference image, comparison points are uniformly selected in the region from size to w_size horizontally and from size to h_size vertically, where size is the side length of the comparison unit, w is the width of the reference image, and h is the height of the reference image.
[0082] By using this method of taking comparison points, we can avoid setting comparison points at the edge of the image (the edge with a width of 1 size), which can improve the recognition accuracy.
[0083] Furthermore, in step S32, the texture index is calculated using the feature vector of the SIFT descriptor on the grayscale image, and the calculation scale value of the SIFT descriptor is size.
[0084] Furthermore, in step S32, the color index is calculated as follows:
[0085]
[0086] Where R, G, and B are the values of the red, green, and blue color channels at a certain contrast point, respectively; μ R μ G μ B The value of m is the average of the red, green, and blue color channels within a grid of size m centered at the comparison point, where m is a positive integer between 2 and 5.
[0087] Furthermore, the feature vector is 128-dimensional, and m takes the value of 2.
[0088] Furthermore, in step S33, the method for calculating the texture index distance and color index distance between comparison points at the same location on the alarm image and the reference image is as follows:
[0089]
[0090]
[0091] Where, d t (u, v) represents the texture index distance, d c (u, v) represents the color index distance, where u and v are the comparison points at the same location on the alarm image and the reference image, respectively. Let u be the i-th dimension texture index value of the comparison point u on the alarm image. The i-th dimension texture index value of the comparison point v on the baseline image. Let j be the color index value of the j-th channel of the comparison point u in the alarm image. Let be the color index value of the j-th channel of the comparison point v on the baseline image, and I be the dimension of the texture index feature vector.
[0092] Furthermore, in step S34, the method for determining whether a comparison point on the alarm image is a difference point or a similar point is as follows:
[0093]
[0094] Among them, D t D is the texture threshold. c This is the color threshold.
[0095] Furthermore, in step S34, the methods for setting the texture threshold and color threshold are as follows:
[0096] Image recognition is performed on alarm images and reference images to identify mud, water, soil, stones, grass, trees, snow, and unidentified monitoring areas in the output images;
[0097] The monitoring areas for mud and water are designated as key monitoring areas, the monitoring areas for soil and rocks are designated as secondary monitoring areas, and the monitoring areas for grass, trees, snow, and unidentified monitoring areas are designated as non-monitoring areas.
[0098] Set texture and color thresholds for key monitoring areas, secondary monitoring areas, and non-monitoring areas respectively.
[0099] This method of determining and setting texture and color thresholds simultaneously indicates whether color blocks have changed from both texture and color perspectives. The texture feature uses SIFT features, a classic image feature with invariance to rotation, scaling, and brightness, making it a very stable local feature. However, it is extracted from grayscale images, losing some color information. Therefore, a method combining texture and color features is used to enable the image comparison algorithm to identify changes in both texture and color.
[0100] Furthermore, when the comparison points u and v are respectively located in the key monitoring areas of the reference image and the key monitoring areas of the alarm image, the texture threshold and color threshold are 350:20; when the comparison points u and v are respectively located in the key monitoring areas of the reference image and the secondary monitoring areas of the alarm image, the texture threshold and color threshold are 360:25; when the comparison points u and v are respectively located in the key monitoring areas of the reference image and the non-monitoring areas of the alarm image, the texture threshold and color threshold are 370:30; when the comparison points u and v are respectively located in the secondary monitoring areas of the reference image and the key monitoring areas of the alarm image, the texture threshold and color threshold are 350:20; when the comparison points u and v are respectively located in the secondary monitoring areas of the reference image and the non-monitoring areas of the alarm image, the texture threshold and color threshold are 350:20; when the comparison points u and v are respectively located in the secondary monitoring areas of the reference image and the non-monitoring areas of the alarm image, the texture threshold and color threshold are 370:30; when the comparison points u and v are respectively located in the secondary monitoring areas of the reference image and the non-monitoring areas of the alarm image, the texture threshold and color threshold are 350:2 .... When the secondary monitoring area is in the primary monitoring area, the texture threshold and color threshold are 380:450 respectively; when the comparison points u and v are in the secondary monitoring area of the reference image and the non-monitoring area of the alarm image, respectively, the texture threshold and color threshold are 2000:450 respectively; when the comparison points u and v are in the non-monitoring area of the reference image and the primary monitoring area of the alarm image, respectively, the texture threshold and color threshold are 370:30 respectively; when the comparison points u and v are in the secondary monitoring area of the reference image and the secondary monitoring area of the alarm image, respectively, the texture threshold and color threshold are 2000:450 respectively; when the comparison points u and v are in the non-monitoring area of the reference image and the non-monitoring area of the alarm image, respectively, the texture threshold and color threshold are 2000:450 respectively.
[0101] Furthermore, the method for determining the number of difference points in step S35 is as follows:
[0102] Perform cluster analysis on the differences in the alarm images, cluster the differences in the alarm images whose distance is less than q×size, discard the classes with less than or equal to p differences, and calculate the number of remaining differences n.
[0103] If the number of discrepancies n exceeds the alarm threshold, the mud level equipment alarm is a real alarm; otherwise, it is a false alarm.
[0104] Where q takes values from 3 to 6, and p takes values from 2 to 4.
[0105] The advantage of this method for determining the number of discrepancies is that it can remove isolated discrepancies. Since the area affected by debris flow water level changes is very large, isolated discrepancies are essentially erroneous. This method effectively removes isolated discrepancies, better describes the overall regional changes, and increases the accuracy of image comparisons.
[0106] Furthermore, the mud level equipment alarm judgment method also includes a step of classifying the alarm data step by step based on the alarm data of the mud level equipment;
[0107] The alarm data is classified hierarchically in ascending order into Level 1, Level 2...Z, where Z is a positive integer.
[0108] In step S4, the alarm threshold is set separately for each level of alarm data. The alarm threshold corresponding to level Z alarm data is denoted as n. z ;
[0109] In step S4, when determining whether the alarm of the mud level equipment is a false alarm, the number of discrepancies is compared with the alarm threshold of the corresponding alarm data level.
[0110] This method of classifying alarm data and setting alarm thresholds can more effectively eliminate interference. Large alarms should exclude the possibility of small-scale variations, thus requiring a greater number of points of difference. Therefore, this classification method can improve the accuracy of alarm judgment, especially for large and medium-sized alarms.
[0111] Furthermore, the alarm data of the mud level device is divided into small, medium and large mud level alarms. The small mud level alarm includes water level height alarm data of 0 to 30 mm, the medium mud level alarm includes water level height alarm data of 30 to 50 mm, and the large mud level alarm includes water level height alarm data of more than 50 mm.
[0112] The alarm threshold for the small mud level alarm is 10, the alarm threshold for the medium mud level alarm is 20, and the alarm threshold for the large mud level alarm is 40.
[0113] Furthermore, the camera device captures multiple images, and each alarm image is compared with a reference image.
[0114] The present invention also provides an image comparison-based alarm judgment system for mud level equipment, comprising:
[0115] Mud level equipment and camera equipment;
[0116] The image acquisition module is used to control the camera to acquire at least one alarm image based on the alarm signal issued by the mud level equipment, and send the alarm data and alarm image to the alarm data analysis module.
[0117] The image comparison module is used to compare the collected alarm images with the reference images, determine whether there are differences between the two images, mark the location of the differences, and send the comparison results to the warning and storage module.
[0118] The early warning and storage module is used to determine whether to send an alarm message based on the comparison results, and to store alarm data and alarm images.
[0119] Furthermore, the mud level equipment alarm judgment system also includes:
[0120] The alarm data analysis module is used to classify alarm data step by step based on the alarm data from the mud level equipment.
[0121] The segmentation and recognition model is used to output alarm images and reference images containing mud, water, soil, stones, grass, trees, snow, and unidentified monitoring areas, dividing them into key monitoring areas, secondary monitoring areas, and non-monitoring areas. It also sets texture thresholds and color thresholds for key monitoring areas, secondary monitoring areas, and non-monitoring areas.
[0122] The technical solution of the present invention will be described in detail below with reference to a specific embodiment.
[0123] In this embodiment, in order to realize alarm judgment, a 2-megapixel camera with a supplementary light is configured near the mud level equipment to take pictures of the mudslide site, so that the pictures can clearly capture the mudslide site.
[0124] This embodiment provides a mud level equipment alarm judgment system based on image comparison, such as... Figure 1 As shown, it includes:
[0125] 1. Image Acquisition Module: Alarm-triggered image acquisition means that when the mud level equipment issues an alarm, the image acquisition module will immediately acquire a field image to determine the accuracy of the alarm and send it to the alarm data analysis module.
[0126] 2. Alarm Data Analysis Module: Acquires alarm data from mud level equipment and categorizes it as follows:
[0127] Table 1 Classification of Mud Level Equipment Alarm Data
[0128]
[0129] Alarm data from mud level monitoring equipment is generally classified into at least three categories. In this embodiment, it is classified into small, medium, and large mud level alarms. In other embodiments, the alarm types can be further refined as needed to improve the accuracy of alarm data analysis.
[0130] 3. Image Comparison Module: This module compares two images and calculates whether there are any differences between them. The two images, along with the annotation results, are then sent to the early warning and storage module. One image serves as the baseline image (shown when the equipment was installed before a mudslide occurred), and the other is the alarm image.
[0131] The image comparison module first establishes corresponding comparison points in the two comparison images. Assume the image size is w*h, where w is the image width (the number of pixels horizontally) and h is the image height. The size of the comparison unit is...
[0132]
[0133] Comparison points are taken evenly within the horizontal range from size to w_size and the vertical range from size to h_size.
[0134] For each comparison point, two comparison metrics are calculated: one is the texture metric, and the other is the color metric.
[0135] The texture metric uses the feature vector of the SIFT descriptor on the grayscale image, and uses size as the scale value for calculating the SIFT descriptor. In this embodiment, the feature vector has a total of 128 dimensions.
[0136] The other is the color index, which is calculated as follows:
[0137]
[0138] Where R, G, and B are the average values of the red (R), green (G), and blue (B) color channels of the comparison point, respectively. R μ G μ B This represents the average value of the three color channels (red, green, and blue) within an m size*m size square centered at the comparison point.
[0139] It should be noted that the calculation of μ R μ G μ B The number of contrast units within the grid can be selected as needed to effectively eliminate the influence of light and shadow changes. In this embodiment, it is selected as 2size*2size.
[0140] Calculate the distance between two metrics between comparison points at the same location on two images:
[0141]
[0142]
[0143] Where, d t (u, v) represents the distance between texture indices, d c (u, v) represents the distance between the color metrics. u and v are the comparison points at the same location on the two images. The dimension of the texture metric feature vector is 128, and the dimension of the color metric is 3.
[0144] D t and D c These are the texture threshold and the color threshold, respectively.
[0145]
[0146] D cand D t The rules for determining this are as follows:
[0147] Using a segmentation and recognition model, two images are divided into eight regions: mud, water, soil, stone, grass, tree, snow, and unidentified. These are further categorized into key, secondary, and non-monitored regions. Key monitoring regions include mud and water. Secondary monitoring regions include soil and stone. Non-monitored regions include grass, tree, snow, and unidentified. The rules are as follows:
[0148] Table 2. Rules for determining texture threshold and color threshold
[0149]
[0150] On the alarm image, cluster the differences between points less than 5 sizes away from the point, discarding classes with 4 or fewer differences. Calculate the number of remaining differences, which is n.
[0151] When n≥10, a small mud level alarm is considered a real alarm. When n≥20, a medium mud level alarm is considered a real alarm. When n≥40, a large mud level alarm is considered a real alarm. Otherwise, it is considered a false alarm.
[0152] 4. Early warning and storage module:
[0153] If the image comparison module determines that the compared image is a genuine alarm, it immediately sends an alarm to residents near the potential hazard point and stores it in the database. If the image comparison module determines that it is a false alarm, it stores the alarm image and alarm data in the database.
[0154] The features described and / or illustrated above with respect to one embodiment may be used in the same or similar manner in one or more other embodiments, and / or in combination with or in lieu of features in other embodiments.
[0155] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, whole, step, or component, but does not exclude the presence or addition of one or more other features, wholes, steps, components, or combinations thereof.
[0156] Many features and advantages of these embodiments are apparent from this detailed description, and therefore the appended claims are intended to cover all such features and advantages of these embodiments that fall within their true spirit and scope. Furthermore, since many modifications and alterations will readily occur to those skilled in the art, the embodiments of the invention are not intended to be limited to the precise structures and operations illustrated and described, but rather to encompass all suitable modifications and equivalents falling within their scope.
[0157] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0158] The parts of this invention not described in detail are techniques known to those skilled in the art.
Claims
1. A method for determining mud level equipment alarm based on image comparison, characterized in that, Includes the following steps: S1. The camera device acquires at least one reference image, wherein the reference image is an image in which no mudslide has occurred; S2. Based on the alarm signal issued by the mud level equipment, control the camera equipment to collect at least one alarm image; S3. Compare the alarm image with the baseline image to determine if there are any differences between the two images, and mark the locations of the differences. S4. Compare the number of discrepancies with the alarm threshold to determine whether the mud level equipment alarm is a false alarm and whether an alarm message should be sent.
2. The method for judging the alarm of mud level equipment according to claim 1, characterized in that, Step S3 specifically includes the following steps: S31. Establish several pairs of corresponding comparison points in the alarm image and the reference image respectively; S32. Calculate the texture and color indices of each comparison point between the alarm image and the baseline image; S33. Calculate the texture index distance and color index distance between the comparison points at the same location on the alarm image and the reference image; S34. Compare the texture index distance and color index distance of each comparison point with the set texture threshold and color threshold respectively, and determine whether the comparison point on the alarm image is a difference point or a similar point. S35. Determine the number of differences.
3. The method for judging the alarm of mud level equipment according to claim 2, characterized in that, The comparison point is a square comparison unit, and the side length of the comparison unit is: Where w is the base image width. Indicates rounding down; The method for establishing the comparison points is as follows: In the alarm image or the reference image, comparison points are uniformly selected in the area from size to w-size horizontally and from size to h-size vertically, where size is the side length of the comparison unit, w is the width of the reference image, and h is the height of the reference image. In step S32, the texture index is calculated using the feature vector of the SIFT descriptor on the grayscale image, and the calculation scale value of the SIFT descriptor is size. In step S32, the color index is calculated as follows: Where R, G, and B are the values of the red, green, and blue color channels at a certain contrast point, respectively; μ R μ G μ B The value of m is the average of the red, green, and blue color channels within a grid of size m centered at the comparison point, where m is a positive integer between 2 and 5. In step S33, the method for calculating the texture index distance and color index distance between comparison points at the same location on the alarm image and the reference image is as follows: Where, d t (u, v) represents the texture index distance, d c (u, v) represents the color index distance, where u and v are the comparison points at the same location on the alarm image and the reference image, respectively. Let u be the i-th dimension texture index value of the comparison point u on the alarm image. The i-th dimension texture index value of the comparison point v on the baseline image. Let j be the color index value of the j-th channel of the comparison point u in the alarm image. Let be the color index value of the j-th channel of the comparison point v on the baseline image, and I be the dimension of the texture index feature vector. In step S34, the method for determining whether the comparison points on the alarm image are difference points or similar points is as follows: Among them, D t D is the texture threshold. c This is the color threshold.
4. The method for judging the alarm of mud level equipment according to claim 2, characterized in that, In step S34, the methods for setting the texture threshold and color threshold are as follows: Image recognition is performed on alarm images and reference images to identify mud, water, soil, stones, grass, trees, snow, and unidentified monitoring areas in the output images; The monitoring areas for mud and water are designated as key monitoring areas, the monitoring areas for soil and rocks are designated as secondary monitoring areas, and the monitoring areas for grass, trees, snow, and unidentified monitoring areas are designated as non-monitoring areas. Set texture and color thresholds for key monitoring areas, secondary monitoring areas, and non-monitoring areas respectively.
5. The method for judging the alarm of mud level equipment according to claim 4, characterized in that, When the comparison points are located in the key monitoring areas of the reference image and the alarm image, respectively, the texture threshold and color threshold are 350:20; when the comparison points are located in the key monitoring areas of the reference image and the secondary monitoring areas of the alarm image, respectively, the texture threshold and color threshold are 360:25; when the comparison points are located in the key monitoring areas of the reference image and the non-monitoring areas of the alarm image, respectively, the texture threshold and color threshold are 370:30; when the comparison points are located in the secondary monitoring areas of the reference image and the key monitoring areas of the alarm image, respectively, the texture threshold and color threshold are 350:20; when the comparison points are located in the secondary monitoring areas of the reference image and the secondary monitoring areas of the alarm image, respectively, the texture threshold and color threshold are 350:
20. When the comparison points are in the secondary monitoring area of the reference image and the non-monitoring area of the alarm image, the texture threshold and color threshold are 380:450 respectively; when the comparison points are in the non-monitoring area of the reference image and the key monitoring area of the alarm image, the texture threshold and color threshold are 370:30 respectively; when the comparison points are in the secondary monitoring area of the reference image and the secondary monitoring area of the alarm image, the texture threshold and color threshold are 2000:450 respectively; when the comparison points are in the non-monitoring area of the reference image and the non-monitoring area of the alarm image, the texture threshold and color threshold are 2000:450 respectively.
6. The method for judging the alarm of mud level equipment according to claim 3, characterized in that, The method for determining the number of difference points in step S35 is as follows: Perform cluster analysis on the differences in the alarm images, cluster the differences in the alarm images whose distance is less than q×size, discard the classes with less than or equal to p differences, and calculate the number of remaining differences n. If the number of discrepancies n exceeds the alarm threshold, the mud level equipment alarm is a real alarm; otherwise, it is a false alarm. Where q takes values from 3 to 6, and p takes values from 2 to 4.
7. The method for judging the alarm of mud level equipment according to claim 1, characterized in that, The method for judging the alarm of the mud level equipment also includes the step of classifying the alarm data step by step according to the alarm data of the mud level equipment. The alarm data is classified hierarchically in ascending order into Level 1, Level 2...Z, where Z is a positive integer. In step S4, the alarm threshold is set separately for each level of alarm data. The alarm threshold corresponding to level Z alarm data is denoted as n. z ; In step S4, when determining whether the alarm of the mud level equipment is a false alarm, the number of discrepancies is compared with the alarm threshold of the corresponding alarm data level.
8. The method for judging the alarm of mud level equipment according to claim 7, characterized in that, The alarm data of the mud level equipment is divided into small, medium and large mud level alarms. Small mud level alarms include water surface height alarm data of 0 to 30 mm, medium mud level alarms include water surface height alarm data of 30 to 50 mm, and large mud level alarms include water surface height alarm data of more than 50 mm. The alarm threshold for the small mud level alarm is 10, the alarm threshold for the medium mud level alarm is 20, and the alarm threshold for the large mud level alarm is 40.
9. A mud level equipment alarm judgment system based on image comparison, characterized in that, include: Mud level equipment and camera equipment; The image acquisition module is used to control the camera to acquire at least one alarm image based on the alarm signal issued by the mud level equipment, and send the alarm data and alarm image to the alarm data analysis module. The image comparison module is used to compare the collected alarm images with the reference images, determine whether there are differences between the two images, mark the location of the differences, and send the comparison results to the warning and storage module. The early warning and storage module is used to determine whether to send an alarm message based on the comparison results, and to store alarm data and alarm images.
10. The mud level equipment alarm judgment system according to claim 9, characterized in that, The mud level equipment alarm judgment system also includes: The alarm data analysis module is used to classify alarm data step by step based on the alarm data from the mud level equipment. The segmentation and recognition model is used to output alarm images and reference images containing mud, water, soil, stones, grass, trees, snow, and unidentified monitoring areas, dividing them into key monitoring areas, secondary monitoring areas, and non-monitoring areas. It also sets texture thresholds and color thresholds for key monitoring areas, secondary monitoring areas, and non-monitoring areas.