Method for enhancing slope displacement monitoring precision
By performing grayscale processing and edge detection algorithm on slope monitoring images, the target profile information is extracted, and the problem of unclear target recognition in complex environments is solved, which significantly improves the accuracy and reliability of slope displacement monitoring.
Patent Information
- Application Number
- CN202510020897.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, in complex environments and inclerical weather, the accuracy and stability of slope monitoring are difficult to guarantee, especially the monitoring accuracy caused by unclear target recognition is affected.
By obtaining the original image and monitoring image of the target position on the slope, greyscale processing is performed, and the edge detection algorithm is used to extract the contour information of the target to generate the pixel matrix of the target area. Specific steps include Gaussian smoothing processing, Sobe l operator gradient analysis, dual threshold algorithm and boundary connection technology to optimize the fineness of the target boundary.
It significantly improves the target recognition ability in complex environments such as rain and fog, effectively improves the accuracy and reliability of slope displacement monitoring, and reduces the impact of variable light, water mist and electronic interference.
Smart Images

Figure CN119941767A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of image edge detection, and in particular, relates to a method for enhancing the accuracy of slope displacement monitoring. Background Art
[0002] In order to prevent landslides, it is necessary to monitor the mountain in real time, and monitor the targets or prisms on the slopes through monitoring instruments and record them in real time to prevent the deformation of the slopes and loose soil from causing landslides, mudslides, etc. However, the existing technology still has some shortcomings in practical applications, especially in complex environments and bad weather, the accuracy and stability of slope monitoring are difficult to guarantee.
[0003] Traditional slope displacement monitoring methods usually rely on observations between targets and monitoring equipment (such as laser rangefinders and machine vision algorithms), but there are the following problems:
[0004] For example, the slope monitoring system in the patent document No. CN115311624B "A slope displacement monitoring method, device, electronic device and storage medium" matches the pixel matrix, determines the target displacement value, and corrects the target displacement value to obtain the overall displacement change of the entire slope. However, no effective solution is provided for the situation that the target recognition is unclear due to complex environments such as rain and fog in slope monitoring, which may affect the monitoring accuracy.
[0005] In addition, the pattern design of traditional targets is often not optimized for complex scenarios. At the same time, the technical advantages of image processing algorithms cannot be fully combined, resulting in low target recognition accuracy and large errors. Summary of the invention
[0006] In order to solve the technical problems of unclear target identification in complex environments, which affects monitoring accuracy, and insufficient target pattern design in the prior art, the present invention provides a method for enhancing slope displacement monitoring accuracy.
[0007] The purpose of the present invention can be achieved through the following technical solutions:
[0008] A method for enhancing slope displacement monitoring accuracy comprises the following steps:
[0009] S1) obtaining an original image and a monitoring image of the target position on the slope;
[0010] Preferably, the pattern of the target is a black circle divided by an inner white cross shape, and two circular rings, one white and one black, are arranged on the outer circumference of the black circle to enhance the recognition effect in rainy and foggy weather.
[0011] Preferably, a plurality of targets are set at different points on the slope; and a fixed camera or a camera is used outside the slope to capture original images and monitoring images of the targets.
[0012] S2) graying the original image and the monitoring image;
[0013] Preferably, the specific process of the grayscale processing includes:
[0014] The original image and the monitored image are converted into grayscale images. The grayscale value of each pixel in the grayscale image is between 0 and 255, indicating different degrees from black to white.
[0015] S3) using an edge detection algorithm to extract the contour information of the target in the grayscale image, and then generating a pixel matrix of the target area;
[0016] Preferably, the specific process of extracting the contour information of the target in the grayscale image using the edge detection algorithm includes:
[0017] S31) performing Gaussian smoothing on the image;
[0018] S32) using the Sobel operator to calculate the gradient of the grayscale value of each pixel of the image in the horizontal (x) and vertical (y) directions, and obtaining the horizontal gradient value Gx and the vertical gradient value Gy of the pixel of the image;
[0019] S33) combining the horizontal gradient value and the vertical gradient value to obtain the gradient value of the image pixel;
[0020] S34) determining the boundary position of the target in the image according to the gradient value of each pixel point of the image, and the area with a larger gradient value is the boundary of the target;
[0021] S35) Calculate the gradient direction, which represents the direction information of the boundary; (If the angle is zero, it means that the image has a vertical boundary at that location, and the left side is darker than the right side) In this way, the contour information of the target is extracted, that is, the gradient value and gradient direction.
[0022] Preferably, step S36) is further included to perform non-maximum suppression on the gradient value, and the specific process thereof includes:
[0023] The gradient direction of each pixel point on the target boundary is approximated to one of 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315°, that is, the up, down, left, right and 45-degree directions of the pixel point;
[0024] Compare the gradient values of the current pixel and its two neighboring pixels in the gradient direction; if the current pixel has the largest gradient value, it is retained, otherwise it is suppressed.
[0025] Preferably, the step S37 is also included to detect and determine the strong boundary and the weak boundary using a dual threshold algorithm; the specific process includes:
[0026] Set an upper threshold h2 and a lower threshold h1, where h1 = 0.4*h2.
[0027] If the gradient value of a pixel is greater than the upper threshold h2, the pixel is considered to be a strong boundary.
[0028] If the gradient value of a pixel point is less than the lower threshold h1, it is considered that the pixel point is definitely not a boundary.
[0029] If the gradient value of a pixel is between the upper threshold h2 and the lower threshold h1, the pixel is considered to be a weak boundary.
[0030] Preferably, the method further includes step S38) improving the boundary link according to the classified pixels of the strong boundary and the weak boundary; the specific process includes:
[0031] The pixels whose gradient values are between h1 and h2 are marked as weak boundaries, and the remaining pixels are set to 0 to obtain a weak boundary image;
[0032] Pixels with gradient values greater than h2 are marked as strong boundaries, and the remaining pixels are set to 0 to obtain a strong boundary image;
[0033] Based on the strong boundary image, weak boundaries are tracked; that is, starting from each strong boundary point, its eight neighboring pixels are checked; if there is a weak boundary point in the neighborhood, it is added to the final boundary; the expansion and connection of the boundary are completed recursively;
[0034] Integrate strong and weak boundaries to obtain fine contour information.
[0035] Preferably, the pixel matrix of the target area is a two-dimensional grayscale value array of all pixels within the target contour.
[0036] S4) matching the pixel matrix of the original image with the pixel matrix of the monitoring image, and calculating the target displacement value.
[0037] Beneficial effects of the present invention:
[0038] 1. The present invention realizes the demand for slope displacement monitoring through a series of technical processes such as image grayscale processing, edge detection and pixel matrix generation. In order to adapt to noise interference in complex environments, the Sobel operator gradient analysis, double threshold algorithm and boundary connection technology are fully utilized to gradually optimize the precision of the target boundary, significantly improving the target recognition ability in complex environments such as rain and fog, and effectively improving the accuracy and reliability of slope displacement monitoring.
[0039] 2. Through the dual threshold algorithm and boundary connection processing, the target boundary pixels can be effectively extracted in different complex environments and electronic interference, greatly eliminating the influence of noise such as variable lighting, water mist and electronic interference.
[0040] 3. By optimizing the target pattern design, the edge features and recognition effects under complex weather conditions are enhanced; at the same time, the significant jumps in grayscale values are better used as the basis for boundary judgment; and the errors caused by environmental and other noise influences are reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0042] Figure 1 This is a schematic diagram of the arrangement of multiple targets on a slope according to Example 1 of the present invention.
[0043] Figure 2 Schematic diagram of graying a target image with grayscale values of 0 and 255 respectively according to Example 1 of the present invention.
[0044] Figure 3 This is a flowchart of the overall steps of Example 1 of the present invention.
[0045] Figure 4 This is a flow chart of the edge detection algorithm in step S3) of embodiment 2 of the present invention.
[0046] Figure 5 This is a schematic diagram of the improved design structure of the target pattern of Example 3 of the present invention.
[0047] Figure 6 Schematic diagram of the grayscale value of the target pattern of Example 3 of the present invention. DETAILED DESCRIPTION
[0048] 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.
[0049] Example 1
[0050] See also Figure 1-Figure 3 As shown, a method for enhancing the accuracy of slope displacement monitoring includes the following steps:
[0051] S1) obtaining an original image and a monitoring image of the target position on the slope;
[0052] Furthermore, multiple targets are set at different points on the slope; a fixed camera or a camera is used outside the slope to capture the original image and monitoring image of the target; the pattern of the target is a black circle divided by an inner white cross shape.
[0053] Specifically, the original position photos of all targets on the slope are taken by a camera or a camera head, that is, the original image, and used as a reference. When the camera or the camera head does not change, the monitoring position photos are taken again, that is, the monitoring image.
[0054] Use the optical zoom function of the camera or camcorder to capture high-resolution images to ensure image quality. Specifically, you can choose a surveillance camera with 20-25x zoom and 3-5mm lens focal length; and shoot in fixed parameter mode. Ensure that the original image and the monitored image are clear and consistent to avoid image blur affecting subsequent recognition.
[0055] S2) graying the original image and the monitoring image;
[0056] Furthermore, the specific process of the grayscale processing includes:
[0057] The original image and the monitored image are converted into grayscale images. The grayscale value of each pixel in the grayscale image is between 0 and 255, indicating different degrees from black to white.
[0058] Specifically, color images captured by a camera or a webcam are usually stored in RGB format, and each pixel consists of three channels: red (R), green (G), and blue (B).
[0059] The method of image grayscale processing is to convert the values of the three RGB channels into a single channel grayscale value by weighted averaging. The grayscale value reflects the degree of black and white of the image.
[0060] A specific example can be used using the cv2.imread method of the OpenCV library. By reading a color image, the RGB image is converted to a grayscale image using the cv2.cvtColor function provided by OpenCV. The converted grayscale image has only one channel, and the value of each pixel is between 0 and 255. The original image is usually stored in the int8 data type (each pixel occupies 8 bits and ranges from 0 to 255). After grayscale processing, the image data type should be consistent to avoid subsequent processing exceptions.
[0061] The grayscale image can be directly used for subsequent processing (boundary detection, contour information extraction, etc.). Grayscale converts the color image into a single-channel grayscale value, greatly reducing the amount of data and making subsequent boundary detection and contour extraction more efficient. The grayscale value directly reflects the brightness distribution of the image, which is conducive to the identification of target boundaries and feature extraction. In some cases, the grayscale image may need further optimization, including: histogram equalization to enhance the contrast of the image; and denoising, using Gaussian filters to reduce noise interference.
[0062] Specifically, the grayscale processing in step S2) is a basic step in image processing. By converting the color image into a single-channel grayscale image, the data complexity is simplified, and the necessary preprocessing conditions are provided for subsequent boundary detection and target contour extraction. In conjunction with other enhancement and denoising operations, the grayscale image can significantly improve the accuracy and robustness of target recognition in slope monitoring.
[0063] S3) using an edge detection algorithm to extract the contour information of the target in the grayscale image, and then generating a pixel matrix of the target area;
[0064] Furthermore, the specific process of extracting the contour information of the target in the grayscale image using the edge detection algorithm includes:
[0065] S31) performing Gaussian smoothing on the image;
[0066] S32) using the Sobel operator to calculate the gradient of the grayscale value of each pixel of the image in the horizontal (x) and vertical (y) directions, and obtaining the horizontal gradient value Gx and the vertical gradient value Gy of the pixel of the image;
[0067] Among them, the Sobel operator uses two 3×3 convolution kernels to calculate the horizontal gradient and the vertical gradient respectively; the convolution kernel K of the horizontal gradient is x It is expressed as:
[0068]
[0069] The convolution kernel K of the vertical gradient y It is expressed as:
[0070]
[0071] Use Sobel's convolution kernel to perform two-dimensional convolution with the grayscale image to calculate the gradient values Gx and Gy respectively;
[0072] G x (i,j)=K x I(i,j);
[0073] G y (i,j)=K yI(i,j);
[0074] In the formula, K x , K y They are the convolution kernels of the horizontal gradient and the vertical gradient, respectively. I is the grayscale value of the input image; (i, j) is the coordinate of the current pixel.
[0075] S33) combining the horizontal gradient value and the vertical gradient value to obtain the gradient value of the image pixel;
[0076] In the specific implementation process, in order to improve the calculation efficiency, the approximate formula is often used: G≈|G x ∣+∣G y ∣;
[0077] S34) determining the boundary position of the target in the image according to the gradient value of each pixel point of the image, and the area with a larger gradient value is the boundary of the target;
[0078] S35) Calculate the gradient direction, which represents the direction information of the boundary; (If the angle is zero, it means that the image has a vertical boundary at that location, and the left side is darker than the right side) In this way, the contour information of the target is extracted, that is, the gradient value and gradient direction.
[0079] Specifically, the calculation formula of the gradient direction is:
[0080] Where θ is the angle value of the gradient direction; G x , G y They are the horizontal and vertical gradient values of the image respectively.
[0081] In the specific implementation process, the OpenCV library can be used to implement it; the example is as follows:
[0082] The prototype of the Sobel operator function is as follows:
[0083] dst=cv2.Sobel(src,ddepth,dx,dy[,dst[,ksize[,scale[,delta[,borderType]]]]])
[0084] Parameter explanation: The first four are required parameters: dst represents the output boundary map, whose size and number of channels are the same as the input image; src represents the image to be processed; ddepth represents the depth of the image, -1 represents the same depth as the original image. The depth of the target image must be greater than or equal to the depth of the original image; dx and dy represent the order of the derivative, dx represents the differential order in the x direction, which takes a value of 1 or 0, and dy represents the differential order in the y direction, which takes a value of 1 or 0. 0 means no derivative in this direction, usually 0 or 1. Then there are optional parameters: ksi ze is the size of the operator, whose value must be a positive and odd number, usually 1, 3, 5, or 7. scale is the proportional constant of the scaling derivative, and there is no scaling factor by default; delta is an optional increment that will be added to the final dst. Similarly, no additional value is added to dst by default; borderType is the mode for determining the image boundary. The default value of this parameter is cv2.BORDER_DEFAULT.
[0085] After the operator processing, you need to call the convertScaleAbs() function to calculate the absolute value and convert the image to an 8-bit image for display. The reason is that when the Sobel operator is derived, white to black is a positive number, but black to white is a negative number. All negative numbers will be truncated to 0, so the absolute value must be taken.
[0086] convertScaleAbs() function prototype:
[0087] dst=convertSca l eAbs(src[,dst[,alpha[,beta]]]);
[0088] src represents the original array; dst represents the output array with a depth of 8 bits; alpha represents the scale factor; beta represents the value added after the elements of the original array are scaled proportionally.
[0089] Specifically, step S3) is a Sobel (discrete differential) operator for boundary detection, which combines Gaussian smoothing and differential derivation. This operator is used to calculate the approximate value of the brightness of the image. According to the brightness next to the image boundary, specific points in the area exceeding a certain number are recorded as boundaries. This method adds the concept of weight, assuming that the distance between adjacent points has different effects on the current pixel point, and the closer the distance, the greater the influence of the corresponding pixel on the current pixel, thereby achieving image sharpening and highlighting the boundary contour information.
[0090] Example 2
[0091] It should be noted that when noise appears in the image, the following methods can be used to further remove noise and obtain more detailed boundary contour information; noise often appears in the image as an isolated pixel or pixel block that causes a strong visual effect. Generally, the noise signal is irrelevant to the object to be studied. It appears in the form of useless information and disrupts the observable information of the image. In layman's terms, noise makes the image unclear. There are two main sources of noise:
[0092] (1) Image acquisition process: During the image acquisition process, two commonly used types of image sensors, CCD and CMOS, will introduce various noises due to the influence of the working environment and electronic components. For example, in complex environments such as rainy and foggy weather, a layer of white fog will appear when the camera takes a picture of the target, making it blurry; thermal noise caused by resistors; photon noise and light response non-uniformity noise, etc.
[0093] (2) During the transmission of image signals: Due to the imperfections of transmission media and recording equipment, digital images are often contaminated by various noises during their transmission and recording. In addition, in certain links of image processing, when the input object is not as expected, noise will also be introduced into the resulting image.
[0094] See also Figure 4 As shown, based on Example 1, a method for enhancing the accuracy of slope displacement monitoring is provided, in step S3), an edge detection algorithm is used to extract the contour information of the target in the grayscale image; and step S36) is also included to perform non-maximum suppression on the gradient value, and the specific process includes:
[0095] The gradient direction of each pixel point on the target boundary is approximated to one of 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315°, that is, the up, down, left, right and 45-degree directions of the pixel point;
[0096] Compare the gradient values of the current pixel and its two neighboring pixels in the gradient direction; if the current pixel has the largest gradient value, it is retained, otherwise it is suppressed.
[0097] Specifically, non-boundary pixels are filtered out through non-maximum suppression, making the blurred boundary clear. This process retains the maximum gradient value at each pixel and filters out other values.
[0098] Furthermore, the method further includes step S37) using a dual threshold algorithm to detect and determine strong boundaries and weak boundaries; the specific process includes:
[0099] Set an upper threshold h2 and a lower threshold h1, where h1 = 0.4*h2.
[0100] If the gradient value of a pixel is greater than the upper threshold h2, the pixel is considered to be a strong boundary.
[0101] If the gradient value of a pixel point is less than the lower threshold h1, it is considered that the pixel point is definitely not a boundary.
[0102] If the gradient value of a pixel is between the upper threshold h2 and the lower threshold h1, the pixel is considered to be a weak boundary.
[0103] Specifically, after non-maximum suppression, there are still many noise points in the grayscale image, which needs to be processed by the double threshold method.
[0104] Furthermore, the method further includes step S38) improving the boundary link according to the classified pixels of the strong boundary and the weak boundary; the specific process includes:
[0105] The pixels whose gradient values are between h1 and h2 are marked as weak boundaries, and the remaining pixels are set to 0 to obtain a weak boundary image;
[0106] Pixels with gradient values greater than h2 are marked as strong boundaries, and the remaining pixels are set to 0 to obtain a strong boundary image;
[0107] Based on the strong boundary image, weak boundaries are tracked; that is, starting from each strong boundary point, its eight neighboring pixels are checked; if there is a weak boundary point in the neighborhood, it is added to the final boundary; the expansion and connection of the boundary are completed recursively;
[0108] Integrate strong and weak boundaries to obtain fine contour information.
[0109] Specifically, since the threshold of the strong boundary image is high, most of the noise is removed, but at the same time, useful edge information is lost. The threshold of the weak boundary image is low, and more information is retained. We can use the strong boundary image as the basis and the weak boundary image as a supplement to link the boundaries of the image; the specific example is as follows:
[0110] Scan the strong boundary image, and when encountering a non-zero grayscale pixel p(x,y), trace the contour line starting from p(x,y) until the end point q(x,y) of the contour line.
[0111] Consider the eight neighboring pixel regions of the point s(x,y) in the strong boundary image that corresponds to the position of the point (x,y) in the weak boundary image.
[0112] If there is a non-zero pixel s(x,y) in the eight-neighboring pixel region of the point s(x,y), it is included in the strong boundary image as the point r(x,y).
[0113] Starting from r(x,y), we recursively repeat the next boundary pixel until we cannot proceed in both the strong boundary image and the weak boundary image. When we have completed the connection of the contour line containing p(x,y), we mark this contour line as visited.
[0114] Find the next contour line. Repeat the above recursive steps until all contour lines are completed. At this point, a more refined edge detection is completed.
[0115] Furthermore, the pixel matrix of the target area is a two-dimensional grayscale value array of all pixels within the target contour.
[0116] S4) matching the pixel matrix of the original image with the pixel matrix of the monitoring image, and calculating the target displacement value.
[0117] Specifically, the pixel matrix of the original image and the pixel matrix of the monitoring image are multiplied to obtain each matching matrix; each matching matrix is normalized to obtain each target matching matrix; each target matching matrix is merged to obtain a merged matrix; the target position is determined based on the eigenvalue of the merged matrix; the target position is calculated according to the predetermined pixel side length to obtain the target displacement value. An example is as follows:
[0118] The matrix is n*n according to the number of pixels in the target image, and can be simplified to a 4*4 matrix; since there are a total of 4 matrices from A1 to A4, the 4 matrices are merged into a merged matrix, and the maximum value is taken at the same position in the merged matrix, so the final matched target position will have 4 1s in the middle. At this time, the target is matched. The target size is a fixed value. According to the number of pixels of each target on the original image, the side length of each pixel is calculated. According to the position of the target matched by the original image and the monitoring image before and after, the pixel difference of the target in the two images can be calculated to obtain the target displacement value. By calculating the target displacement value, the slope displacement can be monitored as a whole, and the monitoring efficiency is improved.
[0119] Example 3
[0120] See also Figure 5 and Figure 6 As shown, based on Example 1 or Example 2, a method for enhancing the accuracy of slope displacement monitoring is provided. In step S1), the pattern of the target is a black circle divided by an inner white cross shape, and two circular rings, one white and one black, are arranged on the outer circumference of the black circle; so as to enhance the recognition effect in rainy and foggy weather.
[0121] In rainy and foggy weather, when the camera takes pictures of the target, a layer of white fog will appear, blurring the picture, increasing the recognition error and affecting the accuracy. In view of this situation, the present invention enhances the target recognition. The main implementation method is to improve the pattern of the basic target, and a high-contrast boundary pattern of a white ring and a black ring is set on the outer periphery of the black circle of the target; a relatively large grayscale jump will occur to identify the boundary of the target. In this way, the significant jump of the grayscale value can be better utilized as the basis for boundary judgment. That is, the area where the grayscale of the captured image jumps is the target boundary position. Therefore, the images taken in complex weather can achieve the same recognition effect as normal weather.
[0122] The captured original image and monitoring image are converted to black and white photos after grayscale conversion, which is the process of changing the grayscale value of the pixel points on the image to between 0 and 255, that is, the whole image presents an obvious black and white effect. Due to interference such as white fog, the grayscale value of the white part of the target cannot be the theoretical value of 255, and the black part cannot be 0. The grayscale value of the target and its surroundings is as follows Figure 6 shown.
[0123] The present invention provides a method for enhancing the accuracy of slope displacement monitoring. By introducing a series of optimization technical processes, including grayscale processing, Sobel operator gradient analysis, double threshold algorithm and boundary connection methods, the method effectively solves the problem that complex weather conditions such as rain, fog, and light changes will significantly reduce the visibility of the target, resulting in blurred target edges or the inability to accurately identify and extract target edge contour information.
[0124] In addition, the target design is optimized to enhance the contrast characteristics and edge features in rainy and foggy weather, improve the target's recognizability, and meet the accuracy and stability requirements of slope displacement monitoring in complex scenarios. The reliability and adaptability of the slope displacement monitoring system in complex environments are significantly improved, providing more accurate and stable technical support for geological disaster early warning.
[0125] Those skilled in the art should understand that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0126] In the several embodiments provided in this application, it should be understood that the disclosed methods, steps and processes can be implemented in other ways. For example, the device embodiments described above are only illustrative. The above processes can be implemented in the form of hardware or in the form of software functional units.
[0127] The above contents are merely examples and explanations of the structure of the present invention. The technicians in this technical field may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the structure of the invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.
Claims
1. A method for enhancing slope displacement monitoring accuracy, characterized by: The following steps are involved: S1) obtaining an original image and a monitoring image of the target position on the slope; S2) graying the original image and the monitoring image; S3) using an edge detection algorithm to extract the contour information of the target in the grayscale image, and then generating a pixel matrix of the target area; S4) matching the pixel matrix of the original image with the pixel matrix of the monitoring image, and calculating the target displacement value.
2. A method for enhancing slope displacement monitoring accuracy according to claim 1, characterized in that: In step S1), a plurality of targets are set at different points on the slope; and original images and monitoring images of the targets are captured by a fixed camera or a camera outside the slope.
3. A method for enhancing slope displacement monitoring accuracy according to claim 1, characterized in that: In step S2), the specific process of the grayscale processing includes: The original image and the monitored image are converted into grayscale images. The grayscale value of each pixel in the grayscale image is between 0 and 255, indicating different degrees from black to white.
4. The method for enhancing slope displacement monitoring accuracy according to claim 1, characterized in that: In step S3), the specific process of extracting the contour information of the target in the grayscale image using the edge detection algorithm includes: S31) performing Gaussian smoothing on the image; S32) using the Sobel operator to calculate the gradient of the grayscale value of each pixel of the image in the horizontal and vertical directions, and obtaining the horizontal gradient value Gx and the vertical gradient value Gy of the pixel of the image; S33) combining the horizontal gradient value and the vertical gradient value to obtain the gradient value of the image pixel; S34) determining the boundary position of the target in the image according to the gradient value of each pixel point of the image, and the area with a larger gradient value is the boundary of the target; S35) Calculate the gradient direction, which represents the direction information of the boundary; thus, the contour information of the target is extracted.
5. A method for enhancing slope displacement monitoring accuracy according to claim 4, characterized in that: The step S36 is also included to perform non-maximum suppression on the gradient value, and the specific process includes: The gradient direction of each pixel point on the target boundary is approximated to one of 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315°, that is, the up, down, left, right and 45-degree directions of the pixel point; Compare the gradient values of the current pixel and its two neighboring pixels in the gradient direction; if the current pixel has the largest gradient value, it is retained, otherwise it is suppressed.
6. A method for enhancing slope displacement monitoring accuracy according to claim 5, characterized in that: The step S37 also includes using a dual threshold algorithm to detect and determine strong boundaries and weak boundaries; the specific process includes: Set an upper threshold h2 and a lower threshold h1, where h1 = 0.4*h2; If the gradient value of a pixel is greater than the upper threshold h2, the pixel is considered to be a strong boundary; If the gradient value of a pixel is less than the lower threshold h1, the pixel is considered not to be a boundary; If the gradient value of a pixel is between the upper threshold h2 and the lower threshold h1, the pixel is considered to be a weak boundary.
7. A method for enhancing slope displacement monitoring accuracy according to claim 6, characterized in that: The process also includes step S38) improving the boundary link according to the classified pixels of the strong boundary and the weak boundary; the specific process includes: The pixels whose gradient values are between h1 and h2 are marked as weak boundaries, and the remaining pixels are set to 0 to obtain a weak boundary image; Pixels with gradient values greater than h2 are marked as strong boundaries, and the remaining pixels are set to 0 to obtain a strong boundary image; Based on the strong boundary image, weak boundaries are tracked; that is, starting from each strong boundary point, its eight neighboring pixels are checked; if there is a weak boundary point in the neighborhood, it is added to the final boundary; the expansion and connection of the boundary are completed recursively; Integrate strong and weak boundaries to obtain fine contour information.
8. The method for enhancing slope displacement monitoring accuracy according to claim 1, characterized in that: In step S4), the pixel matrix of the target area is a two-dimensional gray value array of all pixels within the target contour.
9. A method for enhancing slope displacement monitoring accuracy according to any one of claims 1 to 7, characterized in that: The pattern of the target is a black circle divided by an inner white cross shape, and two circular rings, one white and one black, are arranged on the outer circumference of the black circle.
Citation Information
Patent Citations
A method, device, electronic equipment and storage medium for slope displacement monitoring
CN115311624B