Dry beach detection method, system and storage medium
Through camera shooting and AI recognition technology, combined with laser ranging, the problems of large errors and construction difficulties in dry beach detection in tailings ponds are solved, and high-precision and low-cost dry beach detection are achieved.
Patent Information
- Application Number
- CN202111415579.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-11-25
AI Technical Summary
The existing technology has problems of large errors and construction difficulties in the detection of dry beaches of tailings ponds. The traditional ultrasonic calculation methods have large errors and rely on manual judgment, making it difficult to deploy and maintain markers.
Using a dry beach detection method based on camera shooting and AI recognition, we can obtain pictures of the dry beach area, edge recognition and water accumulation area recognition, calculate the minimum distance between pixel points in the trapezoidal area and the dam body, and combine laser distance measurement and presets. Algorithm to achieve accurate measurement of dry beach length.
It improves the accuracy of dry beach inspection, reduces inspection costs, is widely applicable, reduces construction and maintenance difficulties, and improves inspection accuracy.
Smart Images

Figure CN114120119B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of dry beach monitoring, and in particular to a dry beach detection method, system and storage medium based on camera shooting and AI dry beach identification. Background Art
[0002] A tailings pond is a place built by building a dam to block the valley mouth or enclosing land, used to store tailings or other industrial waste discharged after ore sorting from metal or non-metal mines. A tailings pond is a man-made debris flow hazard source with high potential energy and there is a risk of dam breach. Once a failure occurs, it is likely to cause serious or major accidents.
[0003] To ensure the safety of tailings ponds, the state has a series of mandatory safety standards for tailings ponds. Among them, the monitoring of dry beaches is one of the important indicators of tailings pond safety.
[0004] like Figure 1 As shown in the figure, the discharge of ore sand forms a slope, namely the dry beach. The bottom of the dry beach will form one or more waterlogging areas in the low-lying areas. The minimum distance between the water surface and the dam body is called the dry beach length. When the dry beach length is too small, it means that the water surface is too close to the dam body, which poses a serious threat to the stability of the dam body. Therefore, it is necessary to monitor the changes in the water surface at all times and obtain the dry beach distance.
[0005] In traditional tailings dam detection schemes, the following methods are generally used:
[0006] 1. Ultrasonic detection
[0007] like Figure 2 As shown, two ultrasonic sensors are deployed at monitoring points 1 and 2 on the dry beach slope. The sensor positions are fixed. During construction and installation, the altitudes H1 and H2 of the two sensors and the horizontal distance between the two sensors are measured and input into the system for storage and subsequent calculation.
[0008] The ultrasonic sensor emits ultrasonic waves and returns them. The distances L1 and L2 from the sensor to the dry beach ground and the altitude of the sensor installation minus the distance from the sensor to the beach surface are obtained to obtain the altitudes h1 and h2 of the slopes at monitoring points 1 and 2, where:
[0009] h1 = altitude H1-L1 of monitoring point 1;
[0010] h2 = altitude of monitoring point 2 H2-L2;
[0011] Safety overheight = dam crest elevation - water surface elevation;
[0012] According to the principle of similar triangles: slope ratio = (h1-h2) / horizontal distance from monitoring point 1 to monitoring point 2 = safety superelevation / beach length.
[0013] In the above equation, the distance from monitoring point 1 to monitoring point 2 is a fixed value, which is measured during construction; the elevation of the dam top is a fixed value; and the water surface height is measured by other sensors. Calculate the dry beach length.
[0014] The ultrasonic method of calculating the dry beach length has two main disadvantages. The first is that the error is large. Its core algorithm regards the dry beach as a uniform triangle hypotenuse and estimates the dry beach length through similar triangles. In fact, the slope formed by the discharge of ore sand from the tailings pond will be quite different from the ideal triangle hypotenuse depending on the terrain and the discharge port. Secondly, the calculated length only represents the length of the dry beach at the section where the sensor is located. Since the surface of the accumulated water is not a regular straight line, in actual projects, it is generally necessary to deploy at least two groups of measuring equipment (each group contains 1 or 2 ultrasonic sensors).
[0015] 2. Dry beach construction + camera + manual judgment
[0016] On the dry beach slope, a row of markers is inserted at a certain distance (for example, a row of flags of different colors or cement piles of different colors are inserted every 5 meters). The camera takes pictures of the dry beach water surface, and the pictures taken are manually observed. The length of the dry beach is roughly estimated by which row of flags the water surface overflows. This method has high accuracy. In theory, as long as the markers are deployed densely enough, the accuracy is sufficient to meet the project requirements. The disadvantage is that the construction and subsequent maintenance are difficult. The tailings pond ore sand is highly corrosive, and the markers are difficult to deploy. With the discharge of sand and the passage of time, the markers are easily buried or damaged, and they rely on manual judgment to input and save data, which is easy to cause data loss. Summary of the invention
[0017] The main purpose of the present invention is to propose a dry beach detection method, system and storage medium based on camera shooting and AI identification of dry beaches, aiming to reduce the cost of dry beach detection and improve the accuracy of dry beach detection.
[0018] To achieve the above object, the present invention provides a dry beach detection method, which comprises the following steps:
[0019] Obtain a picture covering the entire tailings dry beach area taken by a pre-deployed camera, the range of the trapezoidal area that the dry beach may actually reach in the picture, and the actual length of the upper side and the actual length of the lower side of the trapezoidal area, as initial values for subsequent calculations, wherein one side of the trapezoidal area uses the dam body straight line as the cutoff area, and the picture includes the dam body, the dry beach and the accumulated water surface;
[0020] Perform edge recognition processing on the image taken by the camera to obtain an edge curve, and perform recognition processing on the water accumulation area based on AI to obtain the water accumulation surface area;
[0021] According to the actual length of the upper side and the actual length of the lower side of the trapezoidal area, a preset method is used to calculate the minimum distance from the pixel points on the trapezoidal area, the edge curve and the water surface area to the dam body.
[0022] A further technical solution of the present invention is that the step of obtaining a picture covering the entire tailings dry beach area taken by a pre-deployed camera, the range of the trapezoidal area that the dry beach may actually reach in the picture, and the actual length of the upper side and the actual length of the lower side of the trapezoidal area comprises:
[0023] The coordinates of the lower left corner of the image are calibrated as (0,0), and the coordinates of the four points in the trapezoidal area are calibrated as (x0, y0), (x1, y1), (x2, y2), (x3, y3) in sequence, where the x value is the number of pixels from the point to the leftmost side of the image, and the y value is the number of pixels from the point to the bottommost side of the image;
[0024] By laser ranging, the actual length of the upper side and the actual length of the lower side of the trapezoidal area are measured, wherein the actual length S1 of the upper side is equal to the actual physical distance from the point (x0, y0) to the point (x1, y1), and the actual length S2 of the lower side is equal to the actual physical distance from the point (x2, y2) to the point (x3, y3).
[0025] A further technical solution of the present invention is that each pixel in the picture taken by the camera covering the entire tailings dry beach area is actually stored as 3 bytes, which respectively represent the values of the three primary colors of red, green and blue. The step of performing edge recognition processing on the picture taken by the camera to obtain the edge curve includes:
[0026] Get the RGB difference between two adjacent pixels;
[0027] Comparing the RGB difference with a preset threshold;
[0028] If the RGB difference is greater than or equal to the threshold, the two adjacent pixels are determined to be boundary values.
[0029] A further technical solution of the present invention is that the step of identifying and processing the waterlogged area based on AI includes:
[0030] Determine whether AI has successfully identified the waterlogged area;
[0031] If successful, the step of calculating the minimum distance from points on the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner based on the actual length of the upper side and the actual length of the lower side of the trapezoidal area is executed.
[0032] A further technical solution of the present invention is that the step of judging whether the AI has successfully identified the waterlogged area comprises:
[0033] The array returned after receiving AI recognition includes masks of all pixel points in the water surface area, wherein the mask of the water surface area is 1, and the mask of the pixel points in the non-water surface area is 0.
[0034] A further technical solution of the present invention is that before the step of calculating the minimum distance from the pixel points on the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner according to the actual length of the upper side and the actual length of the lower side of the trapezoidal area, it also includes:
[0035] Determine whether the pixel point is located in the trapezoidal area, the edge curve and the water surface area at the same time;
[0036] If so, execute the step of calculating the minimum distance from the pixel points in the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner based on the actual length of the upper side and the actual length of the lower side of the trapezoidal area.
[0037] A further technical solution of the present invention is that the step of calculating the minimum distance from the pixel points on the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner according to the actual length of the upper side and the actual length of the lower side of the trapezoidal area comprises:
[0038] Compare the current value calculated this time with the minimum value calculated last time;
[0039] If the current value calculated is greater than the minimum value calculated last time, continue to determine the next pixel point;
[0040] If the calculated current value is less than or equal to the previously calculated minimum value, the previously calculated minimum value is replaced by the current value, and the current value and the corresponding coordinate (x, y) values are saved.
[0041] A further technical solution of the present invention is that after the step of determining whether the AI has successfully identified the waterlogged area, the step further includes:
[0042] If this is unsuccessful, the water level monitoring and calculation strategy is used for dry beach detection;
[0043] The steps of using the water level monitoring calculation strategy to perform dry beach detection include:
[0044] The dam elevation in the initial state is set to h, the water surface elevation is set to h1, and the distance from the dam to the water surface is s1. The water surface elevation is monitored by an ultrasonic sensor. Assuming that the water surface elevation is h2 at a certain moment, the distance from the dry beach to the dam is approximately calculated by the principle of similar triangles: s2 / (h-h2)=s1 / (h-h1):
[0045] To achieve the above object, the present invention further proposes a dry beach detection system, which includes a memory, a processor, and a dry beach detection program stored on the processor, and the dry beach detection program executes the steps of the above method when executed by the processor.
[0046] To achieve the above object, the present invention further proposes a computer-readable storage medium, on which a dry beach detection program is stored. When the dry beach detection program is executed by a processor, the steps of the above method are executed.
[0047] The beneficial effects of the dry beach detection method, system and storage medium of the present invention are as follows: the present invention obtains, through the above technical scheme, a picture covering the entire tailings dry beach area taken by a pre-deployed camera, the range of the trapezoidal area that the dry beach may actually reach in the picture, and the actual length of the upper side and the actual length of the lower side of the trapezoidal area as initial values for subsequent calculations, wherein one side of the trapezoidal area uses the dam body straight line as the cutoff area, and the picture includes the dam body, the dry beach and the accumulated water surface; the picture taken by the camera is edge-recognized to obtain an edge curve, and the accumulated water area is identified based on AI to obtain the accumulated water surface area; according to the actual length of the upper side and the actual length of the lower side of the trapezoidal area, a preset method is used to calculate the minimum distance from the pixel points in the trapezoidal area, the edge curve and the accumulated water surface area to the dam body at the same time, and the accuracy of dry beach detection is improved by combining image edge recognition and AI recognition, the cost of dry beach detection is reduced, and the applicability is wide. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0049] Figure 1 This is a schematic diagram of the dry beach of the tailings pond;
[0050] Figure 2 This is a schematic diagram of dry beach length calculated by ultrasonic wave;
[0051] Figure 3 It is a flow chart of a preferred embodiment of the dry beach detection method of the present invention;
[0052] Figure 4 This is a schematic diagram of dry beach shooting;
[0053] Figure 5 This is a photo of the actual dry beach before edge identification;
[0054] Figure 6 It is a boundary curve graph obtained by edge recognition of the image;
[0055] Figure 7 This is a schematic diagram of the result of water surface area recognition on the image;
[0056] Figure 8 It is a schematic diagram for calculating the distance from the specified point E to the dam body (straight line AD);
[0057] Fig. 9 It is a schematic diagram of the overall process of the dry beach detection method of the present invention;
[0058] Fig.10 It is AI recognition monitoring and calculation of dry beach length and display schematic diagram;
[0059] Fig.11 It is a schematic diagram of the area above the water that cannot be identified in the pictures of the dry beach taken at night;
[0060] Fig.12 This is a schematic diagram of the water surface and dry beach.
[0061] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0062] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0063] In order to solve the problems of inaccurate calculation of dry beach water surface distance and difficult construction in the prior art tailings pond safety detection project, the present invention proposes a dry beach detection method.
[0064] like Figure 3 As shown, the present invention proposes a dry beach detection method. In addition to being applicable to dry beach calculation and detection of tailings ponds, the present invention can also be applied to water surface monitoring calculations in similar occasions such as rivers / slopes / dams.
[0065] The preferred embodiment of the dry beach detection method of the present invention comprises the following steps:
[0066] Step S10, obtaining a picture covering the entire tailings dry beach area taken by a pre-deployed camera, the range of the trapezoidal area that the dry beach may actually reach in the picture, and the actual length of the upper side and the actual length of the lower side of the trapezoidal area, as initial values for subsequent calculations, wherein one side of the trapezoidal area uses the dam body straight line as the cutoff area, and the picture includes the dam body, the dry beach and the accumulated water surface.
[0067] Among them, the range of the trapezoidal area that the dry beach in the picture may actually reach can be set in the picture based on practical experience.
[0068] In this embodiment, a camera can be pre-installed on one side of the tailings dry beach area near the center line, or at other locations, and the captured images can cover the entire tailings dry beach area.
[0069] Wherein, the step S10 specifically includes the following steps:
[0070] The coordinates of the lower left corner of the image are calibrated as (0,0), and the coordinates of the four points in the trapezoidal area are calibrated as (x0, y0), (x1, y1), (x2, y2), (x3, y3) in sequence, where the x value is the number of pixels from the point to the leftmost side of the image, and the y value is the number of pixels from the point to the bottommost side of the image;
[0071] By laser ranging, the actual length of the upper side and the actual length of the lower side of the trapezoidal area are measured, wherein the actual length S1 of the upper side is equal to the actual physical distance from the point (x0, y0) to the point (x1, y1), and the actual length S2 of the lower side is equal to the actual physical distance from the point (x2, y2) to the point (x3, y3).
[0072] Step S20, performing edge recognition processing on the image taken by the camera to obtain an edge curve, and performing recognition processing on the water accumulation area based on AI to obtain the water accumulation surface area.
[0073] It is worth mentioning that in the present embodiment, the edge recognition processing and the water accumulation area recognition processing can be performed on the picture taken by the camera simultaneously, or the edge recognition processing can be performed first and then the water accumulation area recognition processing, or the water accumulation area recognition processing can be performed first and then the edge recognition processing, and the present embodiment does not limit this.
[0074] Specifically, each pixel in the picture taken by the camera covering the entire tailings dry beach area is actually stored as 3 bytes, which respectively represent the values of the three primary colors of red, green and blue. The step of performing edge recognition processing on the picture taken by the camera to obtain the edge curve includes:
[0075] Get the RGB difference between two adjacent pixels;
[0076] Comparing the RGB difference with a preset threshold;
[0077] If the RGB difference is greater than or equal to the threshold, the two adjacent pixels are determined to be boundary values.
[0078] In this embodiment, the step of identifying the waterlogged area based on AI includes:
[0079] Determine whether AI has successfully identified the waterlogged area.
[0080] Specifically, the step of judging whether AI has successfully identified the waterlogged area in this embodiment includes: receiving an array returned by AI after identification, wherein the array includes masks of all pixel points in the waterlogged water surface area, wherein the mask of the waterlogged water surface area is 1, and the mask of the pixel points in the non-water surface area is 0.
[0081] If successful, the step of calculating the minimum distance from points on the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner based on the actual length of the upper side and the actual length of the lower side of the trapezoidal area is executed.
[0082] If this is unsuccessful, the water level monitoring calculation strategy is used for dry beach detection.
[0083] Specifically, the steps of using the water level monitoring calculation strategy to perform dry beach detection include:
[0084] The dam elevation in the initial state is set to h, the water surface elevation is set to h1, and the distance from the dam to the water surface is s1. The water surface elevation is monitored by an ultrasonic sensor. Assuming that the water surface elevation is h2 at a certain moment, the distance from the dry beach to the dam is approximately calculated by the principle of similar triangles: s2 / (h-h2)=s1 / (h-h1):
[0085] Step S30, according to the actual length of the upper side and the actual length of the lower side of the trapezoidal area, a preset method is used to calculate the minimum distance from the pixel points in the trapezoidal area, the edge curve and the water surface area to the dam body.
[0086] Specifically, this embodiment includes before step S30:
[0087] Determine whether the pixel point is located in the trapezoidal area, the edge curve and the water surface area at the same time;
[0088] If so, execute the step of calculating the minimum distance from the pixel points in the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner based on the actual length of the upper side and the actual length of the lower side of the trapezoidal area.
[0089] The present embodiment does not limit the order of identifying whether the pixel point is in the trapezoidal area, the edge curve, and the water surface area.
[0090] The step S30 specifically includes:
[0091] Compare the current value calculated this time with the minimum value calculated last time;
[0092] If the current value calculated is greater than the minimum value calculated last time, continue to determine the next pixel point;
[0093] If the calculated current value is less than or equal to the previously calculated minimum value, the previously calculated minimum value is replaced by the current value, and the current value and the corresponding coordinate (x, y) values are saved.
[0094] The following combination Figures 4 to 12 The dry beach detection of the present invention is further elaborated in detail.
[0095] 1. Picture shooting and project initial value setting
[0096] (1) The camera is installed on one side of the dry beach of the tailings pond, near the center line. The captured images can cover the entire dry beach area of the tailings pond, including the dam body, dry beach, and water surface. The images are uploaded to the server system via the network.
[0097] (2) The effective area of the dry beach is a trapezoidal area, with the dam body straight line on the left as the cutoff area, and the trapezoidal area on the right is the actual possible area of the dry beach. The coordinates of the lower left corner of the image are (0, 0), and the coordinates of the four points in the trapezoidal area are calibrated as (x0, y0), (x1, y1), (x2, y2), and (x3, y3) in sequence. The x value is the number of pixels from the point to the leftmost side of the image, and the y value is the number of pixels from the point to the bottom of the image. The effective area is calibrated in the image and saved to the system as the initialization setting.
[0098] (3) At the tailings pond site, the actual length of the upper and lower sides of the trapezoidal area are measured by laser ranging and other methods. The unit is meter. The upper length S1 = the actual physical distance from point (x0, y0) to point (x1, y1), and the lower actual length S2 is the actual physical distance from point (x2, y2) to point (x3, y3). S1 and S2 need to be saved to the system as the initial values for subsequent calculations.
[0099] 2. Edge recognition and water surface area recognition
[0100] (1) Edge recognition
[0101] Each pixel of the image is actually stored as 3 bytes in the memory, representing the values of the three primary colors of red, green and blue respectively. The basic principle of boundary monitoring is to set a boundary threshold. If the RGB difference of adjacent pixels reaches or exceeds the threshold, the two adjacent pixels are judged to be boundary values. Figure 5 and Figure 6 shown.
[0102] (2) Water surface recognition
[0103] The images obtained by edge recognition contain a lot of interference. Figure 7 As shown in the figure, in addition to the boundary between the water surface and the dry beach, there are also trees, cracks in the dry beach, etc., which will be identified as edge curves. It is impossible to obtain the pixel coordinate value of the closest point to the dam by edge recognition alone. It is necessary to further combine AI recognition to obtain the water surface area.
[0104] After the water surface area is identified, an array will be returned, which contains the masks of all water surface areas. The mask of the pixel point in the non-water surface area is 0, and the mask of the water surface area is 1.
[0105] 3. Calculation of the distance from a single pixel to the dam
[0106] like Figure 8 As shown, the rectangular area is the entire image range, with the lower left corner as the coordinate origin (0, 0), and the maximum x value and y value are the length and height pixels of the captured image respectively. The trapezoid ABCD is set by the user and represents the effective range of the dry beach. The effective range of the dry beach refers to all possible ranges that the water surface of the dry beach may reach in the actual project. By setting the effective area of the dry beach, pixels in invalid areas such as the dam body, mountain body, and dry beach can be excluded. These invalid pixels will not participate in subsequent judgment operations, improve program recognition efficiency, and reduce operation time and CPU / memory usage. Straight line AD is the dam. The coordinates of the four vertices of the trapezoid are represented as (x0, y0), (x1, y1), (x2, y2), and (x3, y3). The actual physical distance S1 of AB and the actual physical distance S2 of CD are measured during construction deployment and entered into the system for storage.
[0107] The formula of line AD is:
[0108] The formula for line BC is:
[0109] E is the point to be calculated, with coordinates (x5, y5). Draw a parallel line through E, which intersects with lines AD and BC at E1 (x6, y6) and E2 (x7, y7). Among them, y5 = y6 = y7. According to the straight line formula, the x-axis coordinates of points E1 and E2 can be calculated as follows:
[0110]
[0111]
[0112] The pixel distance of line segment E1E2 is: x7-x6
[0113] The actual physical distance corresponding to line segment E1E2 is:
[0114] Then the distance from point E to the dam is:
[0115] 4. Dry beach detection algorithm and process
[0116] like Fig. 9 As shown, (1) after the system is started, it is initialized and the following data is read: picture length and height pixel number.
[0117] The coordinate values of the four vertices of the trapezoidal area of the dry beach are set as (x0, y0), (x1, y1), (x2, y2), and (x3, y3). The actual distance S1 to the top and S2 to the bottom of the dry beach are measured by a laser rangefinder or the like.
[0118] (2) For the dry beach image uploaded by the camera, edge recognition processing is first performed, and the identified edge pixel map is read into the memory.
[0119] (3) Perform AI recognition on the dry beach image to obtain the water surface area. The mask in the water surface area is 1, and the mask in the non-water surface area is 0. The mask is read into the memory. If AI recognition fails, for example, the water surface cannot be distinguished in the night photo, the current dry beach length is calculated based on the water level.
[0120] (4) For each edge point obtained in step 2, first determine whether it belongs to the water surface area (mask is 1). If it is not the water surface area, continue to determine the next point.
[0121] (5) If the edge point belongs to the water surface area, determine whether it is within the dry beach trapezoidal area. If it does not belong to the dry beach trapezoidal area, return to step 2 and continue to determine the next point.
[0122] (6) If the edge point is in the water surface area and is within the dry beach range, calculate the distance from the point to the dam. If this is the first calculation, the minimum value is equal to the current value. If this is not the first calculation, compare the previous minimum value and the current value. If the current value is larger than the minimum value, return to step 2 and continue to determine the next point; if the current value is smaller than the minimum value, replace the minimum value with the current value, and save the minimum value and the x, y coordinates of the corresponding point.
[0123] (7) Repeat steps 2-6 until all edge pixels are calculated. Finally, the minimum distance of the dry beach and the point position corresponding to the minimum distance are obtained based on the actual length of the upper side and the actual length of the lower side of the trapezoidal area and the minimum value. The final display effect diagram is shown in Figure 10.
[0124] 5. Water level monitoring algorithm and image recognition supplement
[0125] like Fig.11 As shown, compared with the traditional dry beach monitoring method, the image recognition algorithm has the advantages of simple and fast construction, low cost, high accuracy, and intuitiveness. However, for some tailings ponds with insufficient artificial lighting conditions, pictures taken at night may not be able to normally identify the water surface. Therefore, the present invention introduces water level monitoring calculation as a supplementary method when recognition fails.
[0126] Specifically, Fig.12 As shown, the dry beach slope is approximated as a triangle hypotenuse, and the slope ratio of the triangle can be obtained during on-site engineering construction. For example, in the initial state, the dam elevation is measured to be h, the water surface elevation is h1, and the distance from the dam to the water surface is s1. The water surface elevation is monitored by an ultrasonic sensor. Assuming that the water surface elevation is h2 at a certain moment, the dry beach length at this time is approximately obtained by the principle of similar triangles: s2 / (h-h2)=s1 / (h-h1):
[0127] The dry beach length calculated by the present invention through water surface monitoring is less accurate than the image AI recognition monitoring, but it can be used as a supplement under special conditions to make the monitoring application scope of the present invention wider.
[0128] The beneficial effects of the dry beach detection method of the present invention are as follows: the present invention obtains, through the above technical scheme, a picture covering the entire tailings dry beach area taken by a pre-deployed camera, the range of the trapezoidal area that the dry beach may actually reach in the picture, and the actual length of the upper side and the actual length of the lower side of the trapezoidal area as initial values for subsequent calculations, wherein one side of the trapezoidal area uses the dam body straight line as the cutoff area, and the picture includes the dam body, the dry beach and the accumulated water surface; the picture taken by the camera is edge-recognized to obtain an edge curve, and the accumulated water area is identified based on AI to obtain the accumulated water surface area; according to the actual length of the upper side and the actual length of the lower side of the trapezoidal area, a preset method is used to calculate the minimum distance from the pixel points in the trapezoidal area, the edge curve and the accumulated water surface area to the dam body at the same time, and the accuracy of dry beach detection is improved by combining image edge recognition and AI recognition, the cost of dry beach detection is reduced, and the applicability is wide.
[0129] To achieve the above objectives, the present invention further proposes a dry beach detection system, which includes a memory, a processor, and a dry beach detection program stored on the processor. The dry beach detection program is executed by the processor to perform the steps of the method described in the above embodiment, which will not be repeated here.
[0130] To achieve the above object, the present invention further proposes a computer-readable storage medium, on which a dry beach detection program is stored. When the dry beach detection program is executed by a processor, the steps of the method described in the above embodiment are executed, which will not be repeated here.
[0131] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. A dry beach detection method, characterized in that: The method comprises the following steps: Obtain a picture covering the entire tailings dry beach area taken by a pre-deployed camera, the trapezoidal area range actually reached by the dry beach in the picture, and the actual length of the upper side and the actual length of the lower side of the trapezoidal area as initial values for subsequent calculations, wherein one side of the trapezoidal area uses the dam body straight line as the cutoff area, and the picture includes the dam body, the dry beach and the accumulated water surface; Performing edge recognition processing on the image taken by the camera to obtain an edge curve, and performing recognition processing on the water accumulation area based on Al to obtain the water accumulation water surface area; According to the actual length of the upper side and the actual length of the lower side of the trapezoidal area, a preset method is used to calculate the minimum distance from the pixel points on the trapezoidal area, the edge curve and the water surface area to the dam body; The step of obtaining a picture covering the entire tailings dry beach area taken by a pre-deployed camera, the range of the trapezoidal area actually reached by the dry beach in the picture, and the actual length of the upper side and the actual length of the lower side of the trapezoidal area comprises: The coordinates of the lower left corner of the image are calibrated as (0, 0), and the coordinates of the four points in the trapezoidal area are calibrated as (x0, y0), (x1, y1), (x2, y2), (x3, y3) in sequence, where the x value is the number of pixels from the point to the leftmost side of the image, and the y value is the number of pixels from the point to the bottommost side of the image; The actual length of the upper side and the actual length of the lower side of the trapezoidal area are measured by laser ranging, wherein the actual length S1 of the upper side is equal to the actual physical distance from the point (x0, y0) to the point (x1, y1), and the actual length S2 of the lower side is equal to the actual physical distance from the point (x2, y2) to the point (x3, y3); The step of identifying the waterlogged area based on Al includes: Determine whether Al has successfully identified the waterlogged area; If successful, the step of calculating the minimum distance from the point on the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner according to the actual length of the upper side and the actual length of the lower side of the trapezoidal area is executed; The step of judging whether A1 has successfully identified the waterlogged area comprises: Receive an array returned after Al identification, wherein the array includes masks of all pixel points in the water surface area, wherein the mask of the water surface area is 1, and the mask of the pixel points in the non-water surface area is 0; The step of calculating the minimum distance from the pixel points on the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner according to the actual length of the upper side and the actual length of the lower side of the trapezoidal area comprises: Compare the current value calculated this time with the minimum value calculated last time; If the current value calculated is greater than the minimum value calculated last time, continue to determine the next pixel point; If the calculated current value is less than or equal to the previously calculated minimum value, the previously calculated minimum value is replaced by the current value, and the current value and the corresponding coordinate (x, y) values are saved.
2. The dry beach detection method according to claim 1, characterized in that: Each pixel in the picture covering the entire tailings dry beach area captured by the camera is actually stored as 3 bytes, representing the values of the three primary colors of red, green and blue respectively. The step of performing edge recognition processing on the picture captured by the camera to obtain an edge curve includes: Get the RGB difference between two adjacent pixels; Comparing the RGB difference with a preset threshold; If the RGB difference is greater than or equal to the threshold, the two adjacent pixels are determined to be boundary values.
3. The dry beach detection method according to claim 2, characterized in that: Before the step of calculating the minimum distance from the pixel points on the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner according to the actual length of the upper side and the actual length of the lower side of the trapezoidal area, the following step is further included: Determine whether the pixel point is located in the trapezoidal area, the edge curve and the water surface area at the same time; If so, execute the step of calculating the minimum distance from the pixel points in the trapezoidal area, the edge curve and the water surface area to the dam body in a preset manner based on the actual length of the upper side and the actual length of the lower side of the trapezoidal area.
4. The dry beach detection method according to claim 1, characterized in that: After the step of determining whether A1 successfully identifies the waterlogged area, the following steps are further included: If this is unsuccessful, the water level monitoring and calculation strategy is used for dry beach detection; The steps of using the water level monitoring calculation strategy to perform dry beach detection include: The dam elevation in the initial state is set to h, the water surface elevation is set to h1, and the distance from the dam to the water surface is s1. The water surface elevation is monitored by an ultrasonic sensor. Assuming that the water surface elevation is h2 at a certain moment, the distance from the dry beach to the dam is calculated by the principle of similar triangles: s2 / (h-h2)=s1 / (h-h1):
5. A dry beach detection system, characterized in that: The system comprises a memory, a processor, and a dry beach detection program stored on the processor, wherein the dry beach detection program executes the steps of the method according to any one of claims 1 to 4 when executed by the processor.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a dry beach detection program, and when the dry beach detection program is executed by the processor, the steps of the method according to any one of claims 1 to 4 are executed.
