Structural facility deformation monitoring method and system based on machine vision

By performing subblocking processing and subpixel positioning on the image data, combining multi-dimensional geometric parameters and Harris algorithm, the image accuracy and adaptability problems of machine vision in complex environments are solved, and high-precision dynamic monitoring of structural facilities such as dams and slopes is realized.

CN120070418BActive Publication Date: 2025-08-29ZHEJIANG HUADONG SURVEYING MAPPING & GEOINFORMATION +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510525430.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-29
Estimated Expiration
2045-04-25

AI Technical Summary

Technical Problem

The existing structural facility deformation monitoring technology based on machine vision has insufficient accuracy and adaptability when processing image data in complex environments (such as light changes, texture interference, noise, etc.), which is difficult to ensure the synchronous optimization of the global contrast and local details of the image. It is also low in capturing sensitivity for slight changes in cracks and landslides, making it difficult to meet the high-precision dynamic monitoring needs of structural facilities such as dams and slopes.

Method used

By dividing the image data into non-overlapping sub-blocks, calculating the grayscale histogram and cumulative distribution functions of each sub-block, constructing a grayscale mapping function for grayscale distribution mapping, performing high-frequency enhancement processing, extracting feature points and performing sub-pixel-level positioning, filtering the region of interest, and combining multi-dimensional geometric parameters and Harris algorithm for abnormal judgment.

Benefits of technology

The global contrast and local details of the image are synchronously optimized, which significantly improves the capture sensitivity and deformation monitoring accuracy of tiny changing areas such as cracks and landslides, improves the reliability and regional targeting of feature point extraction, reduces data storage and transmission pressure, and provides a more reliable data foundation and real-time risk warning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070418B_ABST
    Figure CN120070418B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of machine vision technology, and more particularly to a method and system for monitoring deformation of structural facilities based on machine vision. The method comprises: dividing image data into sub-blocks and independently processing grayscale histograms to enhance contrast details in local areas; calculating cumulative distribution functions and target cumulative distribution functions and constructing grayscale mapping functions to achieve global brightness and contrast adjustment of image data; then performing high-frequency enhancement processing on the image to achieve simultaneous optimization of global contrast and local details of the monitored image, thereby providing a reliable data basis for subsequent image analysis; calculating the multi-dimensional geometric characteristics of connected components and constructing comprehensive rules for screening regions of interest; performing sub-pixel positioning of feature points and focusing on regions of interest to significantly improve the reliability and regional specificity of feature points; and performing abnormality judgment on the extracted sub-pixel feature points to improve the capture sensitivity of regions with small changes and the deformation monitoring accuracy of structural facilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine vision, and in particular to a method and system for monitoring deformation of structural facilities based on machine vision. Background Art

[0002] Traditional dam and slope deformation monitoring technologies mostly rely on measurements using physical sensors (such as displacement meters and total stations). While these methods offer a certain degree of measurement accuracy, they suffer from technical challenges such as complex deployment, poor real-time performance, limited coverage, and insufficient response to dynamic changes. With the rapid development of industrial automation and intelligent technologies, machine vision-based monitoring and measurement technologies are gaining application in the safety assessment and deformation monitoring of structural facilities such as dams and slopes. Compared to traditional technical solutions, machine vision technology, through the combination of image acquisition equipment and computer algorithms, can efficiently collect and analyze structural surface deformation information of structural facilities in a non-contact manner, achieving precise deformation measurement.

[0003] However, existing machine vision-based structural facility deformation monitoring technologies still have technical problems of insufficient accuracy and adaptability when processing image data in complex environments (such as lighting changes, texture interference, noise, etc.). Specifically, on the one hand, during the image acquisition and preprocessing process, affected by lighting conditions, weather influences and interference from complex on-site environments, existing technologies often find it difficult to ensure the simultaneous optimization of the global contrast and local details of the image, resulting in a significant reduction in the reliability of subsequent image analysis. On the other hand, during the feature extraction and anomaly detection process, existing technologies have low sensitivity in capturing small change areas such as cracks and landslides, especially for sub-pixel feature point positioning and change monitoring capabilities, making it difficult to meet the needs of high-precision dynamic monitoring of structural facilities such as dams and slopes. Summary of the Invention

[0004] In response to the above technical problems, the present invention proposes a structural facility deformation monitoring method and system based on machine vision, which aims to simultaneously optimize the global contrast and local details of the monitoring image, providing a more reliable data basis for subsequent image analysis, while achieving sub-pixel positioning of feature points and focusing on areas of interest, greatly improving the capture sensitivity of small change areas such as cracks and landslides, as well as the deformation monitoring accuracy of structural facilities such as dams and slopes.

[0005] In a first aspect, the present application provides a method for monitoring deformation of structural facilities based on machine vision, comprising the following steps:

[0006] Collect image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain image data of each sub-block;

[0007] Calculate the cumulative distribution function corresponding to each sub-block and the target cumulative distribution function based on the image data of each sub-block;

[0008] Constructing a grayscale mapping function based on the cumulative distribution function and the target cumulative distribution function, and performing grayscale distribution mapping on the image data of each sub-block based on the grayscale mapping function to obtain an adjusted grayscale image of each sub-block;

[0009] Performing high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block;

[0010] Binarize the high-frequency enhanced image of each sub-block to obtain binary image data of each sub-block, define connected components of the binary image data, and calculate multi-dimensional geometric parameters of each connected component;

[0011] Based on the multidimensional geometric parameters of each connected component, the region of interest is screened;

[0012] Extract feature points from high-frequency enhanced images based on regions of interest;

[0013] Perform sub-pixel positioning on each feature point and filter out the sub-pixel feature point set located in the area of ​​interest;

[0014] Anomaly judgment is performed on each sub-pixel feature point to obtain the deformation monitoring results of the structural facilities.

[0015] Preferably, calculating the cumulative distribution function corresponding to each sub-block and the target cumulative distribution function based on the image data of each sub-block includes:

[0016] Based on the image data of each sub-block, the frequency distribution of each gray value in each sub-block image is counted as the gray histogram of each sub-block;

[0017] Based on the grayscale histogram of each sub-block, calculate the cumulative distribution function corresponding to each sub-block;

[0018] Determine the ideal number of pixels of each gray value in each sub-block image with uniform distribution as the goal;

[0019] Based on the ideal number of pixels of the grayscale value in each sub-block image, the ideal frequency distribution of each grayscale value in each sub-block image is counted as the target histogram of each sub-block;

[0020] Based on the target histogram of each sub-block, the target cumulative distribution function corresponding to each sub-block is calculated.

[0021] Preferably, a grayscale mapping function is constructed based on the cumulative distribution function and the target cumulative distribution function, and grayscale distribution mapping is performed on the image data of each sub-block based on the grayscale mapping function to obtain an adjusted grayscale image of each sub-block, including:

[0022] A grayscale mapping function is constructed with the goal of finding a target grayscale value that minimizes the difference between the cumulative distribution function of each grayscale value and the target cumulative distribution function;

[0023] The grayscale value of each pixel in the image data of each sub-block is input into the grayscale mapping function, and the adjusted grayscale value of each pixel is output to form the adjusted grayscale image of each sub-block.

[0024] Preferably, performing high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block includes:

[0025] Calculate the Laplacian operator of each pixel in the grayscale image after adjustment of each sub-block as the high-frequency component of each pixel;

[0026] Determine a high-frequency region threshold based on the high-frequency components of the pixels in the grayscale image after adjustment of each sub-block;

[0027] Based on the high-frequency region threshold, a high-frequency mask region is extracted from the grayscale image adjusted for each sub-block;

[0028] The grayscale value of each pixel in the high-frequency mask area is input into the grayscale mapping function, and the adjusted grayscale value of each pixel is output to form the grayscale image of each sub-block after secondary adjustment, which is used as the high-frequency enhanced image of each sub-block.

[0029] Preferably, defining connected components of binary image data and calculating multidimensional geometric parameters of each connected component include:

[0030] Define the connected component as a set of pixels in binary image data whose values ​​of all adjacent pixels are 1;

[0031] Count the number of boundary pixels of each connected component to obtain the perimeter parameters of each connected component;

[0032] Count the number of pixels contained in each connected component to obtain the area parameter of each connected component;

[0033] Determine the centroid coordinates of each connected component based on the area geometric parameters of each connected component;

[0034] Based on the centroid coordinates of each connected component, the principal component analysis method is used to calculate the direction angle parameters of each connected component.

[0035] Preferably, based on the multi-dimensional geometric parameters of each connected component, the region of interest is screened and obtained, including:

[0036] Get historical area parameters;

[0037] An area threshold is calculated based on the historical area parameter. When the area parameter of a connected component is greater than the area threshold, the connected component is determined to be an area screening area.

[0038] The ratio of the square of the perimeter parameter to the area parameter is used as the shape parameter to obtain the historical shape parameter;

[0039] A shape threshold is calculated based on the historical shape parameters. When the shape parameter of a connected component is greater than the shape threshold, the connected component is determined to be a shape screening area.

[0040] Obtain historical crack data;

[0041] The direction angle threshold range is calculated based on historical crack data. When the direction parameter of the connected component is within the direction angle threshold range, the connected component is judged as the direction angle screening area;

[0042] The collection of all area screening regions, shape screening regions, and direction angle screening regions is taken as the region of interest.

[0043] Preferably, extracting feature points from the high-frequency enhanced image based on the region of interest includes:

[0044] Based on the pixel coordinates of the region of interest, determining the grayscale value of the corresponding pixel coordinates in the high-frequency enhanced image;

[0045] Harris algorithm is used to calculate the feature point response value of each pixel based on the second-order statistical characteristics of the gray gradient changes around each pixel in the high-frequency enhanced image;

[0046] A minimum response threshold is preset, and when the feature point response value of a pixel point is greater than the minimum response threshold, the pixel point is determined to be a feature point.

[0047] Preferably, each feature point is positioned at the sub-pixel level, and a set of sub-pixel feature points located in the region of interest is screened out, including:

[0048] The sub-pixel coordinates of each feature point are calculated using quadratic interpolation;

[0049] The sub-pixel coordinates of all feature points are screened based on the pixel coordinates of the region of interest to obtain the sub-pixel coordinates of the feature points located in the region of interest, and the set of sub-pixel coordinates of all feature points located in the region of interest is used as the sub-pixel feature point set.

[0050] Preferably, abnormality judgment is performed on each sub-pixel feature point to obtain deformation monitoring results of structural facilities, including:

[0051] Obtaining the actual physical size of the collected image data;

[0052] Determine the dynamic scale correction coefficient of each sub-pixel feature point based on the ratio of the actual physical size of the image data to the coordinates of the sub-pixel feature points;

[0053] Correcting the coordinates of each sub-pixel feature point based on the dynamic scale correction coefficient to obtain corrected sub-pixel feature point coordinates, and a set of all corrected sub-pixel feature point coordinates is used as a correction feature point set;

[0054] Based on the correction feature point set, determining the local window coordinates of each feature point in the correction feature point set;

[0055] When a feature point in the correction feature point set is outside the local window coordinates, the feature point is judged as abnormal and marked, and abnormal warning data is generated.

[0056] In a second aspect, the present application provides a machine vision-based structural facility deformation monitoring system, comprising:

[0057] The image acquisition module is used to acquire image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain image data of each sub-block;

[0058] an image preprocessing module, configured to calculate a cumulative distribution function and a target cumulative distribution function corresponding to each sub-block based on the image data of each sub-block, construct a grayscale mapping function based on the cumulative distribution function and the target cumulative distribution function, perform grayscale distribution mapping on the image data of each sub-block based on the grayscale mapping function, obtain an adjusted grayscale image of each sub-block, and perform high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block;

[0059] The region of interest screening module is used to perform binarization processing on the high-frequency enhanced image of each sub-block to obtain binary image data of each sub-block, define connected components of the binary image data, calculate the multidimensional geometric parameters of each connected component, and screen the region of interest based on the multidimensional geometric parameters of each connected component;

[0060] The feature point detection module is used to extract feature points from the high-frequency enhanced image based on the region of interest, and perform sub-pixel positioning on each feature point to screen out the sub-pixel feature point set located in the region of interest;

[0061] The anomaly detection module is used to judge the anomaly of each sub-pixel feature point and obtain the deformation monitoring results of the structural facilities.

[0062] The beneficial technical effects of the present invention include at least:

[0063] 1. A structural facility deformation monitoring method and system based on machine vision is adopted. First, the image data is divided into non-overlapping sub-blocks and the grayscale histogram of each sub-block is calculated. Each sub-block is processed independently to enhance the contrast details of the local area. Secondly, the overall characteristics of the grayscale value from the darkest to the brightest are quantified by calculating the cumulative distribution function. The target cumulative distribution function is calculated to provide a standardized distribution model for the algorithm. The grayscale mapping function is constructed by combining the cumulative distribution function and the target cumulative distribution function. The grayscale distribution of the original image is mapped to the target cumulative distribution function to achieve uniform distribution and adjust the global brightness and contrast of the image data. Then, the image micro-image is significantly improved through high-frequency enhancement. The visibility of details achieves simultaneous optimization of the global contrast and local details of the monitored images, providing a more reliable data foundation for subsequent image analysis. Then, by combining the multidimensional geometric characteristics of connected components, a comprehensive screening rule is constructed, which can quickly extract areas of interest such as cracks and landslides on the surface of dams or slopes. Then, by sub-pixel positioning of feature points and focusing on the area of ​​interest, the reliability and regional targeting of feature point extraction are significantly improved. Finally, anomaly judgment is performed on the extracted sub-pixel feature points, which can greatly improve the capture sensitivity of small change areas such as cracks and landslides, as well as the deformation monitoring accuracy of structural facilities such as dams and slopes.

[0064] 2. By dividing the image data into non-overlapping sub-blocks and calculating the grayscale histogram of each sub-block, each sub-block is processed independently, enhancing the contrast details of the local area. At the same time, the grayscale histogram provides an intuitive statistical description of the brightness and contrast of the grayscale image, which helps to quickly analyze the image quality. The sub-block processing combined with the grayscale histogram helps to improve the speed of subsequent analysis of abnormal areas such as cracks on the dam surface and slope sliding. Moreover, through grayscale value statistics, complex image data is quantified into a simple frequency distribution, reducing the pressure of data storage and transmission. Secondly, the overall characteristics of the grayscale value from darkest to brightest are quantified through the cumulative distribution function, which can effectively reflect the uneven distribution of pixel brightness in the image data. Then, the target histogram assumes that the grayscale values ​​are uniformly distributed, that is, the number of pixels at each grayscale value is equal, providing an ideal model for optimizing image brightness and contrast. The calculation process of the target cumulative distribution function can directly provide a standardized distribution model for the algorithm, reducing human intervention, improving the consistency and efficiency of image processing, and also improving the accuracy of image processing.

[0065] 3. By calculating the second-order derivative of grayscale changes through the Laplace operator, the edges and high-frequency areas, such as crack edges or small deformations, are accurately captured. Then, the visibility of small details is significantly improved through high-frequency image enhancement, which lays a higher-precision data foundation for subsequent feature point detection and abnormal area screening. Compared with the sharpening methods commonly used in the existing technology (such as first-order gradient enhancement, etc.), which are easy to amplify noise or lose the overall brightness information of the image, the high-frequency enhancement processing scheme proposed in this application can more accurately enhance the characteristics of the target area, while suppressing excessive processing of non-target areas. Moreover, through local analysis of high-frequency components, the target area can be enhanced instead of global homogenization processing, which improves the adaptability to specific targets (such as crack edges). The histogram equalization operation performed on the high-frequency mask area further enhances the local contrast, making high-frequency features (such as crack edges or subtle deformations) more prominent. Since the high-frequency mask area is concentrated in the target area, local equalization can avoid the problem of detail loss that may be introduced by overall equalization, making the information in the key area clearer. From global equalization to local enhancement, and then to histogram equalization of high-frequency mask, each step of this application optimizes different levels of the image, achieving refined image processing. The combination of high-frequency mask and histogram equalization makes target features such as cracks, landslides, and edges more prominent in complex backgrounds, thereby improving the recognition accuracy of key features and the detectability of subsequent abnormal features.

[0066] 4. By binarizing the high-frequency enhanced image of each sub-block, the region division of the binary image is achieved, separating the target area from the background area, reducing the computational effort of the full image pixels, and optimizing processing efficiency. Secondly, the area parameter calculation can quantify the scale of the connected component, directly reflecting the size of the target area (such as the area of ​​a crack or the coverage of a deformation area). The perimeter parameter describes the boundary length of the connected component and can assist in determining the shape characteristics of the target area (such as the elongated shape of a crack). The azimuth parameter calculated using the principal component analysis method proposed in this application can intuitively reflect the extension direction of the target area and is particularly suitable for analyzing target areas with significant directionality, such as cracks or landslides. Then, by combining area, shape, and azimuth screening rules, regions of interest are screened from a multidimensional feature perspective, significantly improving the reliability and accuracy of the feature regions. Compared to the single geometric feature (such as area) screening scheme commonly used in the prior art, this application constructs comprehensive screening rules by combining area, shape, and azimuth characteristics, thereby enabling rapid extraction of regions of interest, such as cracks and landslides, on the surface of a dam or slope, providing a good foundation for subsequent anomaly monitoring.

[0067] 5. The Harris algorithm calculates the feature point response value of each pixel based on the second-order statistical characteristics of the grayscale gradient changes around each pixel in the high-frequency enhanced image, and based on this, it quickly screens out feature points. It can effectively identify pixels with significant changes (such as edge points and corner points) and capture significant geometric shapes in the image (such as corner points and edges) through gradient changes. This can highlight the endpoints and corner areas of cracks in dam and slope monitoring images, providing key data for subsequent anomaly analysis.

[0068] 6. By using quadratic interpolation to locate feature points at the sub-pixel level, it is possible to effectively capture small deformations or displacement changes in the image (such as the gradual expansion of cracks or slight sliding of slopes). This greatly improves the sensitivity of capturing small changes in areas such as cracks and landslides in dam and slope monitoring. The screening step within the region of interest excludes feature points that are not related to the target, making the remaining feature points more reliable in describing regional anomalies. Compared with the redundant processing of full-image operations by feature point detection commonly used in the prior art, this application significantly improves the reliability and regional targeting of feature points by combining region of interest screening and focusing on the target area. The feature point detection commonly used in the prior art usually stops at pixel-level accuracy, while this application achieves sub-pixel precision positioning of feature points through quadratic interpolation, which is particularly suitable for detecting small changes in structural facilities (such as the gradual expansion of cracks or slight sliding of slopes);

[0069] 7. The sub-pixel feature point coordinates in the pixel space are mapped to the actual physical space through the dynamic scale correction coefficient, providing the feature points with location information with clear physical meaning. The scale differences of different collected images are corrected by the dynamic correction coefficient to ensure that the sub-pixel feature point coordinates in the image can accurately reflect the position in the actual physical space even under different shooting conditions, and ensure the consistency of the data collected multiple times in the physical coordinate system, so that the correction feature point set can adapt to the analysis requirements of different scales, such as the refined detection of cracks or large-scale deformation analysis of slopes, etc. At the same time, the correction feature point set can quantify the dynamic changes between feature points (such as the distance and direction changes between adjacent feature points). , providing a key basis for long-term monitoring of crack expansion trends or slope sliding rates. Furthermore, since the sub-pixel feature points obtained in each monitoring process have been calibrated, this application proposes a solution based on this, which uses a local window to quickly screen abnormal feature points, and marks the feature points beyond the local window as abnormal points, thereby achieving accurate positioning of potential risk areas such as cracks and landslides, which can significantly reduce misjudgments and missed judgments, and is more suitable for scenarios such as sudden changes in crack endpoints and local anomalies in slope sliding. It is particularly effective in capturing small changes in the early stages of crack expansion. When it is detected that the feature points exceed the local window range, the system can immediately generate abnormal warning data to provide real-time risk prompts for monitoring personnel.

[0070] Other features and advantages of the present invention will be disclosed in detail in the following specific embodiments and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] The present invention will be further described below with reference to the accompanying drawings:

[0072] Figure 1 This is a flow chart of a method for monitoring deformation of structural facilities based on machine vision according to an embodiment of the present invention.

[0073] Figure 2 Schematic diagram of the structure of a structural facility deformation monitoring system based on machine vision according to an embodiment of the present invention. DETAILED DESCRIPTION

[0074] The following is an explanation and description of the technical solutions of the embodiments of the present invention in conjunction with the drawings of the embodiments of the present invention. However, the following embodiments are only preferred embodiments of the present invention and are not exhaustive. Based on the embodiments in the implementation manner, other embodiments obtained by those skilled in the art without creative work are all within the scope of protection of the present invention.

[0075] In the following description, terms such as "inside", "outside", "up", "down", "left", "right", etc. that indicate directions or positional relationships are only used to facilitate the description of the embodiments and simplify the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operate in a specific direction. Therefore, they should not be understood as limiting the present invention.

[0076] Please see the attached Figure 1 , Figure 1 A flow chart of a method for monitoring deformation of structural facilities based on machine vision provided in one embodiment of this specification is shown.

[0077] like Figure 1 As shown, the structural facility deformation monitoring method based on machine vision may include at least the following steps:

[0078] S1. Collect image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain image data of each sub-block;

[0079] Specifically, step S1 may be implemented as follows: first, image data of structural facilities is collected based on a CCD camera, and image data with precise positioning can be collected for slopes, dams, and the like through physical targets (such as a checkerboard), thereby establishing a mapping relationship between image pixel coordinates and actual physical world coordinates, while reducing pixel position deviations of images collected at different times and improving the accuracy of visual measurement; then, the collected image data is converted into a grayscale image; and then, the grayscale image is divided into a number of sub-blocks, where the number of image sub-blocks can be determined based on experience, to achieve non-overlapping sub-block division of the grayscale image and obtain image data of each sub-block.

[0080] S2. Calculate the cumulative distribution function corresponding to each sub-block and the target cumulative distribution function based on the image data of each sub-block.

[0081] Furthermore, in this embodiment, the cumulative distribution function corresponding to each sub-block and the target cumulative distribution function are calculated based on the image data of each sub-block, including:

[0082] S21 , based on the image data of each sub-block, counting the frequency distribution of each grayscale value in each sub-block image as a grayscale histogram of each sub-block.

[0083] Specifically, the method for calculating the frequency distribution of each grayscale value in each sub-block image is as follows:

[0084]

[0085] Where g represents the grayscale value, which can be any integer from 0 (black) to 255 (white), H(g) represents the number of pixels with grayscale value g in the current sub-block image, M represents the horizontal number of pixels in the current sub-block image, N represents the vertical number of pixels in the current sub-block image, (x, y) represents the pixel coordinates of the current sub-block image, and I(x, y) represents the grayscale value of the pixel (x, y) in the current sub-block image. represents the Delta indicator function;

[0086] Then, the frequency distribution of each gray value in the sub-block image can be counted according to H(g) to form a gray histogram. The horizontal axis of the gray histogram represents the gray value, and the vertical axis represents the number of pixels of the gray value.

[0087] S22, calculating the cumulative distribution function corresponding to each sub-block based on the grayscale histogram of each sub-block.

[0088] Specifically, the cumulative distribution function can be expressed as:

[0089]

[0090] Where H(i) and H(j) represent the number of pixels with grayscale values ​​i and j, respectively, and 255 represents the grayscale value range from 0 to 255. It can be understood that the cumulative distribution function C(g) represents the proportion of pixels with grayscale values ​​less than or equal to g.

[0091] S23, determining the ideal number of pixels of each gray value in each sub-block image with uniform distribution as the goal.

[0092] Specifically, the ideal number of pixels with gray value g can be expressed as:

[0093]

[0094] Wherein, M represents the horizontal number of pixels of the current sub-block image, N represents the vertical number of pixels of the current sub-block image, and 256 represents a total of 256 grayscale value ranges from 0 to 255.

[0095] S24, based on grayscale values The ideal number of pixels in each sub-block image is calculated, and the ideal frequency distribution of each gray value in each sub-block image is counted as the target histogram of each sub-block.

[0096] S25 , calculating the target cumulative distribution function corresponding to each sub-block based on the target histogram of each sub-block.

[0097] Specifically, the target cumulative distribution function can be expressed as:

[0098]

[0099] in, and Respectively represent the number of pixels with grayscale values ​​i and j in the target histogram.

[0100] This embodiment first divides the image data into non-overlapping sub-blocks and calculates the grayscale histogram of each sub-block. Each sub-block is processed independently, thereby enhancing the contrast details of local areas. Furthermore, the grayscale histogram provides an intuitive statistical description of the brightness and contrast of the grayscale image, facilitating rapid analysis of image quality. The combination of sub-block processing and the grayscale histogram helps speed up subsequent analysis of abnormal areas such as cracks on the dam surface and slope slip. Furthermore, through grayscale value statistics, complex image data is quantified into a simple frequency distribution, reducing the burden on data storage and transmission. Secondly, the cumulative distribution function quantifies the overall characteristics of grayscale values ​​from darkest to brightest, effectively reflecting the uneven distribution of pixel brightness in the image data (for example, if the cumulative distribution function C(g) increases rapidly in the low grayscale range, it indicates that the image is generally dark). Next, the target histogram assumes a uniform distribution of grayscale values, i.e., the number of pixels at each grayscale value is equal. This provides an ideal model for optimizing image brightness and contrast. The calculation of the target cumulative distribution function directly provides a standardized distribution model for the algorithm, reducing human intervention, improving the consistency and efficiency of image processing, and enhancing the accuracy of image processing.

[0101] S3. Construct a grayscale mapping function based on the cumulative distribution function and the target cumulative distribution function, and perform grayscale distribution mapping on the image data of each sub-block based on the grayscale mapping function to obtain an adjusted grayscale image of each sub-block.

[0102] Furthermore, in this embodiment, a grayscale mapping function is constructed based on the cumulative distribution function and the target cumulative distribution function, and grayscale distribution mapping is performed on the image data of each sub-block based on the grayscale mapping function to obtain an adjusted grayscale image of each sub-block, including:

[0103] A grayscale mapping function is constructed with the goal of finding a target grayscale value that minimizes the difference between the cumulative distribution function of each grayscale value and the target cumulative distribution function;

[0104] The grayscale value of each pixel in the image data of each sub-block is input into the grayscale mapping function, and the adjusted grayscale value of each pixel is output to form the adjusted grayscale image of each sub-block.

[0105] Specifically, the grayscale mapping function can be expressed as:

[0106]

[0107] Among them, T(g) represents the target grayscale value corresponding to the grayscale value g , Represents grayscale value The value in the target cumulative distribution function.

[0108] This embodiment constructs a grayscale mapping function by combining the cumulative distribution function and the target cumulative distribution function, mapping the grayscale distribution of the original image data to the target cumulative distribution function. For high-brightness or low-brightness scenes (such as shadow areas or strong light reflection areas), the grayscale value mapping function can adaptively adjust the brightness to achieve uniform distribution processing, adjust the global brightness and contrast of the image data, and ensure overall image balance. The entire equalization process does not rely on manual parameter adjustment and is more suitable for scenarios where real-time automatic monitoring of structural facility deformation is required.

[0109] S4. Perform high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block.

[0110] Furthermore, in this embodiment, high-frequency enhancement processing is performed on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block, including:

[0111] S41 , calculating the Laplacian operator of each pixel in the grayscale image after adjustment of each sub-block as the high-frequency component of each pixel.

[0112] Specifically, the high-frequency component of a pixel can be expressed as:

[0113]

[0114]

[0115] Where (x, y) represents the pixel coordinates of the grayscale image after the current sub-block is adjusted, and I(x, y) represents the grayscale value of the pixel (x, y) of the grayscale image after the current sub-block is adjusted. Represents the high-frequency component of the pixel (x, y), represents the sub-block image after preliminary high-frequency enhancement, Indicates the high-frequency enhancement coefficient preset based on historical experience.

[0116] S42 , determining a high-frequency region threshold based on the high-frequency components of the pixels in the grayscale image after adjustment of each sub-block.

[0117] For example, the high frequency region threshold can be expressed as:

[0118]

[0119] S43 , extracting a high-frequency mask area from the grayscale image after adjustment of each sub-block based on the high-frequency area threshold.

[0120] Specifically, the high-frequency mask area can be expressed as:

[0121]

[0122] S44, inputting the grayscale value of each pixel in the high-frequency mask area into the grayscale mapping function, outputting the adjusted grayscale value of each pixel, forming a secondary adjusted grayscale image of each sub-block as the high-frequency enhanced image of each sub-block.

[0123] It can be understood that this embodiment performs histogram equalization on the high-frequency mask area again, outputs the grayscale value after contrast enhancement, and forms a high-frequency enhanced image after secondary adjustment of each sub-block.

[0124] This embodiment first calculates the second-order derivative of grayscale changes through the Laplace operator to accurately capture edges and high-frequency areas, such as crack edges or small deformations, and then significantly improves the visibility of small details through high-frequency image enhancement, laying a higher-precision data foundation for subsequent feature point detection and abnormal area screening. Compared with the sharpening methods commonly used in the prior art (such as first-order gradient enhancement, etc.), which easily amplify noise or lose the overall brightness information of the image, the high-frequency enhancement processing scheme proposed in this embodiment can more accurately enhance the characteristics of the target area while suppressing excessive processing of non-target areas. Moreover, through local analysis of high-frequency components, it can enhance the target area instead of global uniformity processing, thereby improving the focus on specific targets (such as crack edges). Adaptability: The histogram equalization operation performed on the high-frequency mask area further enhances the local contrast, making high-frequency features (such as crack edges or subtle deformations) more prominent. Since the high-frequency mask area is concentrated in the target area, local equalization can avoid the detail loss problem that may be introduced by overall equalization, making the information in the key area clearer. From global equalization to local enhancement, and then to histogram equalization of the high-frequency mask, each step of this embodiment optimizes different levels of the image, achieving refined image processing. The combination of high-frequency mask and histogram equalization makes target features such as cracks, landslides, and edges more prominent against a complex background, thereby improving the recognition accuracy of key features and the detectability of subsequent abnormal features.

[0125] S5. Binarize the high-frequency enhanced image of each sub-block to obtain binary image data of each sub-block, define connected components of the binary image data, and calculate multi-dimensional geometric parameters of each connected component.

[0126] Furthermore, in this embodiment, connected components of binary image data are defined, and multi-dimensional geometric parameters of each connected component are calculated, including:

[0127] S51, defining a connected component as a set of pixels in the binary image data whose adjacent pixel values ​​are all 1;

[0128] S52, counting the number of boundary pixels of each connected component to obtain the perimeter parameter of each connected component;

[0129] S53, counting the number of pixels contained in each connected component to obtain the area parameter of each connected component.

[0130] Specifically, the area parameter of each connected component can be expressed as:

[0131]

[0132] Among them, (x, y) represents the coordinates of the connected components, represents the i-th connected component.

[0133] S54, determining the centroid coordinates of each connected component based on the area geometric parameters of each connected component.

[0134] Specifically, the centroid coordinates of each connected component can be expressed as:

[0135]

[0136]

[0137] in, and Respectively represent the coordinate values ​​of the centroid of the i-th connected component in the x-direction and y-direction.

[0138] S55, based on the centroid coordinates of each connected component, a principal component analysis method is used to calculate the direction angle parameters of each connected component.

[0139] Specifically, in this embodiment, the direction angle parameters of each connected component calculated using the principal component analysis method can be expressed as:

[0140]

[0141]

[0142] in, represents the (p, q)-order central moment of the i-th connected component, where p and q represent the powers of x and y respectively, and are non-negative integers. Indicates p=1, q=1, summing the products of the deviations from the center of mass in the x and y directions, Indicates p=2, q=0, summing the squares of the deviations from the center of mass in the x direction, Indicates p=0, q=2, summing the squares of deviations from the center of mass in the y direction, Represents the direction angle of the i-th connected component.

[0143] S6. Based on the multidimensional geometric parameters of each connected component, the region of interest is screened.

[0144] Furthermore, in this embodiment, based on the multi-dimensional geometric parameters of each connected component, the region of interest is screened and obtained, including:

[0145] S61, obtaining historical area parameters;

[0146] S62: Calculate an area threshold based on the historical area parameter. When the area parameter of the connected component is greater than the area threshold, determine that the connected component is an area screening area.

[0147] Specifically, the area threshold is calculated based on the historical area parameters as follows: first calculate the mean of the historical area parameters, then calculate the standard deviation of the historical area parameters. The standard deviation measures the degree of deviation between the parameters and the mean. Finally, the calculated mean and standard deviation are added together to obtain the area threshold.

[0148] S63, taking the ratio of the square of the perimeter parameter to the area parameter as a shape parameter to obtain a historical shape parameter;

[0149] S64, calculating a shape threshold based on the historical shape parameters, and when the shape parameter of the connected component is greater than the shape threshold, determining that the connected component is a shape screening area.

[0150] The implementation method of calculating the shape threshold based on the historical shape parameters is similar to the implementation method of calculating the area threshold based on the historical area parameters, and will not be described in detail in this embodiment.

[0151] S65, obtain historical crack data;

[0152] S66, calculating a direction angle threshold range based on historical crack data, and when the direction parameter of the connected component is within the direction angle threshold range, determining that the connected component is a direction angle screening area.

[0153] Specifically, the implementation method of calculating the direction angle threshold range based on historical crack data is as follows:

[0154] First, the direction angle refers to the angle between the crack line and the horizontal axis (or vertical axis), which can be determined by the main direction of the crack or the gradient direction of the edge, thereby obtaining the direction angle parameter of the historical crack data;

[0155] Secondly, the mean of the orientation angle parameters of the historical crack data is calculated;

[0156] Next, the standard deviation of the orientation angle parameters of the historical crack data is calculated to measure the degree of dispersion of the data;

[0157] Finally, based on the standard deviation and the mean, the direction angle threshold range is set. The direction angle threshold range can be the standard deviation of the mean plus or minus a certain multiple, and the multiple can be adjusted according to the specific situation.

[0158] S67: taking a collection of all area screening regions, shape screening regions, and direction angle screening regions as a region of interest.

[0159] This embodiment first performs binarization on the high-frequency enhanced image of each sub-block, thereby achieving regional segmentation of the binarized image, separating the target area from the background area, reducing the computational effort for all image pixels, and optimizing processing efficiency. Secondly, the area parameter is calculated to quantify the size of the connected component, directly reflecting the size of the target area (e.g., the area of ​​a crack or the coverage of a deformed area). The perimeter parameter describes the boundary length of the connected component and can assist in determining the shape characteristics of the target area (e.g., the elongated shape of a crack). The azimuth parameter calculated using principal component analysis proposed in this embodiment can intuitively reflect the extension direction of the target area and is particularly suitable for analyzing target areas with significant directionality, such as cracks or landslides. Then, by integrating area, shape, and azimuth screening rules, regions of interest are screened from a multidimensional feature perspective, significantly improving the reliability and accuracy of the feature regions. Compared to the single geometric feature (e.g., area) screening scheme commonly used in existing technologies, this embodiment constructs comprehensive screening rules by combining area, shape, and azimuth characteristics. This allows for rapid extraction of regions of interest, such as cracks and landslides, on dam or slope surfaces, providing a sound foundation for subsequent anomaly monitoring.

[0160] S7. Extract feature points from the high-frequency enhanced image based on the region of interest.

[0161] Furthermore, in this embodiment, extracting feature points from the high-frequency enhanced image based on the region of interest includes:

[0162] S71 , based on the pixel coordinates of the region of interest, determining the grayscale value corresponding to the pixel coordinates in the high-frequency enhanced image.

[0163] Specifically, according to the pixel coordinates of each connected component in the set of regions of interest, the grayscale value of the pixel coordinates corresponding to the connected component is determined in the high-frequency enhanced image.

[0164] S72, using the Harris algorithm, calculates the feature point response value of each pixel based on the second-order statistical characteristics of the grayscale gradient change around each pixel in the high-frequency enhanced image.

[0165] Specifically, in this embodiment, the Harris algorithm is used to calculate the feature point response value of each pixel based on the second-order statistical characteristics of the grayscale gradient change around each pixel in the high-frequency enhanced image, which can be expressed as:

[0166]

[0167]

[0168]

[0169]

[0170] Among them, (x, y) represents the pixel point in the high-frequency enhanced image, M(x, y) represents the second-order statistical characteristic matrix of the grayscale gradient change around the pixel point, and Represent the gradient values ​​of the high-frequency enhanced image in the x and y directions, Represents the gradient distribution characteristic value of the pixel point, Represents the sum of the eigenvalues ​​of the matrix M(x, y), which is used to reflect the total change in the gradient. R(x, y) represents the response value of the feature point of the pixel. Indicates the preset empirical coefficient determined based on historical data.

[0171] S73, presetting a minimum response threshold, when the feature point response value of a pixel point is greater than the minimum response threshold, determining that the pixel point is a feature point.

[0172] This embodiment uses the Harris algorithm to calculate the feature point response value of each pixel based on the second-order statistical characteristics of the grayscale gradient changes around each pixel in the high-frequency enhanced image, and quickly screens out feature points based on this. It can effectively identify pixels with significant changes (such as edge points, corner points, etc.) and capture significant geometric shapes in the image (such as corner points and edges) through gradient changes. This can highlight the endpoints and corner areas of cracks in dam and slope monitoring images, providing key data for subsequent anomaly analysis.

[0173] S8. Perform sub-pixel positioning on each feature point, and filter out a set of sub-pixel feature points located in the region of interest.

[0174] Furthermore, in this embodiment, sub-pixel positioning is performed on each feature point to screen out a set of sub-pixel feature points located in the region of interest, including:

[0175] S81, using quadratic interpolation to calculate the sub-pixel coordinates of each feature point.

[0176] Specifically, in this embodiment, the sub-pixel coordinates of the feature points calculated using the quadratic interpolation method can be expressed as:

[0177]

[0178]

[0179] in, and Represent the sub-pixel coordinate values ​​of the feature points, and Represent the first-order derivatives of the feature points in the x and y directions, respectively. and Represent the second-order derivatives of the feature points in the x and y directions, It represents the sum of the joint changes of the feature point's gradients in the x and y directions.

[0180] S82, filtering the sub-pixel coordinates of all feature points based on the pixel coordinates of the region of interest to obtain the sub-pixel coordinates of the feature points located in the region of interest, and the set of the sub-pixel coordinates of all feature points located in the region of interest is used as the sub-pixel feature point set.

[0181] This embodiment uses quadratic interpolation to perform sub-pixel positioning of feature points, which can effectively capture tiny deformations or displacement changes in the image (such as the gradual expansion of cracks or slight sliding of slopes). It greatly improves the capture sensitivity of areas with small changes such as cracks and landslides in dam and slope monitoring, and excludes feature points unrelated to the target in the screening step within the region of interest, making the remaining feature points more reliable in describing regional anomalies. Compared with the redundant processing of full-image operations by feature point detection commonly used in the prior art, this embodiment combines region of interest screening with focusing on the target area, significantly improving the reliability and regional targeting of feature points. The feature point detection commonly used in the prior art usually stops at pixel-level accuracy, while this embodiment achieves sub-pixel precision positioning of feature points through quadratic interpolation, which is particularly suitable for detecting tiny changes in structural facilities (such as the gradual expansion of cracks or slight sliding of slopes).

[0182] S9. Perform abnormality judgment on each sub-pixel feature point to obtain deformation monitoring results of the structural facilities.

[0183] Furthermore, in this embodiment, anomaly determination is performed on each sub-pixel feature point to obtain deformation monitoring results of the structural facility, including:

[0184] S91, obtaining the actual physical size of the collected image data.

[0185] The actual physical size can be obtained by measuring a physical target, which is similar to the method of obtaining the actual physical size of an image in the prior art, and will not be described in detail in this embodiment.

[0186] S92 , determining a dynamic scale correction coefficient for each sub-pixel feature point based on a ratio of an actual physical size of the image data to the coordinates of the sub-pixel feature point.

[0187] It is understandable that the collected image data may change in proportion due to various factors (such as lens distortion, shooting angle, distance, etc.). Therefore, this embodiment obtains a proportion correction coefficient by the ratio of the actual physical size of the image data to the sub-pixel feature point coordinates, and dynamically adjusts this proportion correction coefficient in each deformation monitoring to adapt to different images, thus serving as a dynamic proportion correction coefficient.

[0188] S93, correcting the coordinates of each sub-pixel feature point based on the dynamic scale correction coefficient to obtain corrected sub-pixel feature point coordinates, and a set of all corrected sub-pixel feature point coordinates is used as a corrected feature point set.

[0189] Specifically, the coordinates of each sub-pixel feature point are corrected based on the dynamic scale correction coefficient as follows:

[0190]

[0191]

[0192] in, and Respectively represent the coordinate values ​​of the i-th sub-pixel feature point after coordinate correction, and Represent the coordinates of the i-th sub-pixel feature point, and Represent the dynamic scale correction coefficients of the i-th sub-pixel feature point on the x-axis and y-axis respectively, and They represent the dynamic scale correction coefficients of the i-1th sub-pixel feature point (i.e., adjacent feature point) on the x-axis and y-axis respectively.

[0193] S94 , based on the correction feature point set, determining the local window coordinates of each feature point in the correction feature point set.

[0194] Specifically, the local window coordinates can be expressed as:

[0195]

[0196]

[0197] in, and Respectively represent the sub-pixel feature point coordinates recorded during the last monitoring process, and Respectively represent the maximum offset of the feature point in the x-axis and y-axis directions based on scene deformation, which are obtained according to the preset.

[0198] S95: When a feature point in the correction feature point set is outside the local window coordinates, the feature point is determined to be abnormal and marked, and abnormal warning data is generated.

[0199] This embodiment maps the sub-pixel feature point coordinates in the pixel space to the actual physical space through a dynamic scale correction coefficient, providing the feature points with location information with clear physical meaning. The dynamic correction coefficient is used to correct the scale differences of different collected images, ensuring that the sub-pixel feature point coordinates in the image can accurately reflect the position in the actual physical space even under different shooting conditions, and ensuring the consistency of the data collected multiple times in the physical coordinate system. This allows the corrected feature point set to adapt to analysis requirements at different scales, such as refined crack detection or large-scale deformation analysis of slopes, and at the same time enables the corrected feature point set to quantify dynamic changes between feature points (such as the distance and direction changes between adjacent feature points). , providing a key basis for long-term monitoring of crack expansion trends or slope sliding rates. Furthermore, since the sub-pixel feature points obtained in each monitoring process have been calibrated, this embodiment proposes a solution based on this, which uses a local window to quickly screen abnormal feature points. Feature points that exceed the local window are marked as abnormal points, thereby achieving accurate positioning of potential risk areas such as cracks and landslides, which can significantly reduce misjudgments and missed judgments. It is more suitable for scenarios such as sudden changes in crack endpoints and local abnormalities in slope sliding, and is particularly effective in capturing small changes in the early stages of crack expansion. When it is detected that a feature point exceeds the local window range, the system can immediately generate abnormal warning data to provide real-time risk prompts for monitoring personnel.

[0200] Furthermore, this embodiment can also construct a set of abnormal feature points through abnormal warning data, clarify the location of the abnormal area through the coordinate data of the abnormal feature points, provide maintenance personnel with accurate positioning information, and combine geometric parameters such as the area, perimeter and direction angle of the connected components to provide a full-scale description of the abnormal area, which is convenient for maintenance personnel to quickly judge the degree of abnormality. Through wireless communication technology, the abnormal warning information is sent to the maintenance personnel terminal in real time, shortening the time from discovering the abnormality to responding and processing, and improving the efficiency of emergency response.

[0201] Furthermore, this embodiment can also generate an abnormality report by combining the coordinate data of the abnormal feature points with the geometric parameters such as the area, perimeter and direction angle of the corresponding connected components through a report generation tool. Maintenance personnel can further analyze the specific properties of the abnormality (such as crack shape, direction, etc.) based on the abnormality report to provide support for subsequent maintenance decisions. The abnormality report is transmitted to the maintenance terminal and system database via the wireless network for backup storage, providing a complete data foundation for subsequent historical data analysis and trend prediction.

[0202] In order to verify the beneficial effects of the structural facility deformation monitoring method based on machine vision proposed in the embodiment of this specification, the specific operation process of the embodiment of this specification will be demonstrated through specific experimental examples below:

[0203] The pixel size of the collected image data is 300*300. After conversion to a grayscale image, the pixel grayscale value range is [0,255].

[0204] The image data is divided into 10*10 sub-blocks, and the frequency distribution of each gray value in each sub-block image is counted and a gray histogram is drawn. The data in the gray histogram is shown in Table 1 below:

[0205] Table 1

[0206]

[0207] Based on the grayscale histogram, the corresponding cumulative distribution function is calculated, which is expressed as follows when the grayscale value is 120 and 121:

[0208]

[0209]

[0210] Traverse each grayscale value and calculate the cumulative distribution function of all grayscale values;

[0211] Calculate the ideal number of pixels of each gray value in each sub-block image, and calculate the target cumulative distribution function, which is expressed as:

[0212]

[0213]

[0214] A grayscale mapping function is used to calculate the target grayscale value of each pixel in the image data of each sub-block after mapping, to form an adjusted grayscale image of each sub-block;

[0215] The Laplacian operator of each pixel in the grayscale image after each sub-block adjustment is calculated, and the pixel value of the sub-block image after preliminary high-frequency enhancement is obtained. The data is shown in Table 2 below:

[0216] Table 2

[0217]

[0218] Based on the extracted high-frequency mask area, grayscale mapping is performed again on the high-frequency mask area to achieve secondary histogram equalization, and a high-frequency enhanced image with enhanced contrast is output;

[0219] The high-frequency enhanced image of each sub-block is binarized, the connected components of the binary image data are defined, and the multi-dimensional geometric parameters of each connected component are calculated, including area parameters, perimeter parameters, and direction angle parameters. The calculation results are shown in Table 3 below:

[0220] Table 3

[0221]

[0222] Based on the multidimensional geometric parameters of each connected component, the region of interest is screened;

[0223] Based on the pixel coordinates of the region of interest, the grayscale value of the corresponding pixel coordinates in the high-frequency enhanced image is determined, and the connected components around the pixel point (1,1) in the high-frequency enhanced image are calculated. The second-order statistical characteristics of the gray gradient change are used to calculate the feature point response value of the pixel (1,1), which is expressed as:

[0224]

[0225]

[0226] The feature point response values ​​are screened according to the minimum response threshold, and the sub-pixel coordinates of the screened feature points are calculated. The calculation results are shown in Table 4 below:

[0227] Table 4

[0228]

[0229] The dynamic scale correction coefficient of each sub-pixel feature point is determined, and the coordinates of each sub-pixel feature point are corrected based on the dynamic scale correction coefficient to obtain the corrected sub-pixel feature point coordinates. The calculation results are shown in Table 5 below:

[0230] Table 5

[0231]

[0232] Based on the sub-pixel feature point coordinates recorded during the last monitoring process and the maximum offset of the monitoring and early warning of the slope dam, a local window is defined to check whether the corrected feature points are abnormal, and an early warning operation is performed based on the inspection results.

[0233] Please see the attached Figure 2 , Figure 2 A schematic diagram of the structure of a machine vision-based structural facility deformation monitoring system provided in one embodiment of this specification.

[0234] like Figure 2As shown, the machine vision-based structural facility deformation monitoring system may include at least an image acquisition module 1, an image preprocessing module 2, a region of interest screening module 3, a feature point detection module 4, and an anomaly detection module 5, wherein:

[0235] Image acquisition module 1, used to acquire image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain image data of each sub-block;

[0236] Image preprocessing module 2, configured to calculate the cumulative distribution function and the target cumulative distribution function corresponding to each sub-block based on the image data of each sub-block, construct a grayscale mapping function based on the cumulative distribution function and the target cumulative distribution function, perform grayscale distribution mapping on the image data of each sub-block based on the grayscale mapping function, obtain an adjusted grayscale image of each sub-block, and perform high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block;

[0237] The region of interest screening module 3 is used to perform binarization processing on the high-frequency enhanced image of each sub-block to obtain binary image data of each sub-block, define connected components of the binary image data, calculate the multidimensional geometric parameters of each connected component, and screen the region of interest based on the multidimensional geometric parameters of each connected component;

[0238] Feature point detection module 4 is used to extract feature points from the high-frequency enhanced image based on the region of interest, and perform sub-pixel positioning on each feature point to screen out a set of sub-pixel feature points located in the region of interest;

[0239] The anomaly detection module 5 is used to perform anomaly judgment on each sub-pixel feature point to obtain deformation monitoring results of the structural facilities.

[0240] It is understandable that the technical concept of the machine vision-based structural facility deformation monitoring system provided in this embodiment is similar to the technical concept of the aforementioned machine vision-based structural facility deformation monitoring method, and this embodiment will not be repeated here.

[0241] Another embodiment of this specification provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps of the aforementioned machine vision-based structural facility deformation monitoring method embodiment. If the components of the aforementioned electronic device are implemented as software functional units and used as independent downstream task prediction or utilization, they can be stored in the computer-readable storage medium.

[0242] When the functions in the above embodiments are implemented as software functional units and sold or used as standalone products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, or the portion that contributes to the prior art, or the portion of the technical solution, can be implemented in whole or in part through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions. When loaded and executed on a computer, the computer program instructions fully or partially produce the processes or functions described in the embodiments of this specification. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in or transmitted via a computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, or a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0243] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0244] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, and then editing, interpreting, or processing in another suitable manner as necessary, and then storing it in a computer memory.

[0245] The above description is merely a description of the preferred embodiments disclosed in this application and the technical principles employed. Those skilled in the art should understand that the scope of protection provided by this disclosure is not limited to technical solutions formed by a specific combination of the aforementioned technical features, but also encompasses other technical solutions formed by any combination of the aforementioned technical features or their equivalents without departing from the scope of the disclosure. For example, a technical solution formed by replacing the aforementioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0246] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

Claims

1. A method for monitoring deformation of structural facilities based on machine vision, characterized in that: The following steps are involved: Collect image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain image data of each sub-block; Calculate the cumulative distribution function corresponding to each sub-block and the target cumulative distribution function based on the image data of each sub-block; Constructing a grayscale mapping function based on the cumulative distribution function and the target cumulative distribution function, and performing grayscale distribution mapping on the image data of each sub-block based on the grayscale mapping function to obtain an adjusted grayscale image of each sub-block; Performing high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block; Binarizing the high-frequency enhanced image of each sub-block to obtain binary image data of each sub-block, defining connected components of the binary image data, and calculating multidimensional geometric parameters of each connected component, wherein the multidimensional geometric parameters include perimeter parameters, area parameters, and direction angle parameters; Based on the multidimensional geometric parameters of each connected component, the region of interest is screened; Based on the pixel coordinates of the region of interest, determining the grayscale value of the corresponding pixel coordinates in the high-frequency enhanced image; Harris algorithm is used to calculate the feature point response value of each pixel based on the second-order statistical characteristics of the gray gradient changes around each pixel in the high-frequency enhanced image; When the feature point response value of a pixel point is greater than the preset minimum response threshold, the pixel point is determined to be a feature point; The quadratic interpolation method is used to locate each feature point at the sub-pixel level, and the sub-pixel feature point set located in the region of interest is screened out; Obtaining the actual physical size of the collected image data; Determine the dynamic scale correction coefficient of each sub-pixel feature point based on the ratio of the actual physical size of the image data to the coordinates of the sub-pixel feature points; Correcting the coordinates of each sub-pixel feature point based on the dynamic scale correction coefficient to obtain corrected sub-pixel feature point coordinates, and a set of all corrected sub-pixel feature point coordinates is used as a correction feature point set; Based on the correction feature point set, determining the local window coordinates of each feature point in the correction feature point set; When a feature point in the correction feature point set is outside the local window coordinates, the feature point is judged as abnormal and marked, and abnormal warning data is generated; Among them, based on the multidimensional geometric parameters of each connected component, the region of interest is screened, including: When the area parameter of a connected component is greater than the area threshold, the connected component is judged as an area screening area; The ratio of the square of the perimeter parameter to the area parameter is used as the shape parameter. When the shape parameter of the connected component is greater than the shape threshold, the connected component is judged to be a shape screening area. When the direction angle parameter of the connected component is within the direction angle threshold range, the connected component is determined to be a direction angle screening area.

2. The method for monitoring deformation of structural facilities based on machine vision according to claim 1, characterized in that: Calculating the cumulative distribution function corresponding to each sub-block and the target cumulative distribution function based on the image data of each sub-block includes: Based on the image data of each sub-block, the frequency distribution of each gray value in each sub-block image is counted as the gray histogram of each sub-block; Based on the grayscale histogram of each sub-block, calculate the cumulative distribution function corresponding to each sub-block; Determine the ideal number of pixels of each gray value in each sub-block image with uniform distribution as the goal; Based on the ideal number of pixels of the grayscale value in each sub-block image, the ideal frequency distribution of each grayscale value in each sub-block image is counted as the target histogram of each sub-block; Based on the target histogram of each sub-block, the target cumulative distribution function corresponding to each sub-block is calculated.

3. The method for monitoring deformation of structural facilities based on machine vision according to claim 1, wherein: A grayscale mapping function is constructed based on the cumulative distribution function and the target cumulative distribution function, and grayscale distribution mapping is performed on the image data of each sub-block based on the grayscale mapping function to obtain an adjusted grayscale image of each sub-block, including: A grayscale mapping function is constructed with the goal of finding a target grayscale value that minimizes the difference between the cumulative distribution function of each grayscale value and the target cumulative distribution function; The grayscale value of each pixel in the image data of each sub-block is input into the grayscale mapping function, and the adjusted grayscale value of each pixel is output to form the adjusted grayscale image of each sub-block.

4. The method for monitoring deformation of structural facilities based on machine vision according to claim 3, wherein: Perform high-frequency enhancement processing on the adjusted grayscale image to obtain high-frequency enhanced images of each sub-block, including: Calculate the Laplacian operator of each pixel in the grayscale image after adjustment of each sub-block as the high-frequency component of each pixel; Determine a high-frequency region threshold based on the high-frequency components of the pixels in the grayscale image after adjustment of each sub-block; Based on the high-frequency region threshold, a high-frequency mask region is extracted from the grayscale image adjusted for each sub-block; The grayscale value of each pixel in the high-frequency mask area is input into the grayscale mapping function, and the adjusted grayscale value of each pixel is output to form the grayscale image of each sub-block after secondary adjustment, which is used as the high-frequency enhanced image of each sub-block.

5. The method for monitoring deformation of structural facilities based on machine vision according to claim 1, wherein: Define the connected components of binary image data and calculate the multidimensional geometric parameters of each connected component, including: Define the connected component as a set of pixels in binary image data whose values ​​of all adjacent pixels are 1; Count the number of boundary pixels of each connected component to obtain the perimeter parameters of each connected component; Count the number of pixels contained in each connected component to obtain the area parameter of each connected component; Determine the centroid coordinates of each connected component based on the area geometric parameters of each connected component; Based on the centroid coordinates of each connected component, the principal component analysis method is used to calculate the direction angle parameters of each connected component.

6. The method for monitoring deformation of structural facilities based on machine vision according to claim 1, wherein: Based on the multidimensional geometric parameters of each connected component, the region of interest is screened, including: Get historical area parameters; An area threshold is calculated based on the historical area parameter. When the area parameter of a connected component is greater than the area threshold, the connected component is determined to be an area screening area. The ratio of the square of the perimeter parameter to the area parameter is used as the shape parameter to obtain the historical shape parameter; A shape threshold is calculated based on the historical shape parameters. When the shape parameter of a connected component is greater than the shape threshold, the connected component is determined to be a shape screening area. Obtain historical crack data; The direction angle threshold range is calculated based on historical crack data. When the direction angle parameter of the connected component is within the direction angle threshold range, the connected component is judged as the direction angle screening area. The collection of all area screening regions, shape screening regions, and direction angle screening regions is taken as the region of interest.

7. The method for monitoring deformation of structural facilities based on machine vision according to claim 1, wherein: Perform sub-pixel positioning on each feature point and filter out the sub-pixel feature point set within the region of interest, including: The sub-pixel coordinates of each feature point are calculated using quadratic interpolation; The sub-pixel coordinates of all feature points are screened based on the pixel coordinates of the region of interest to obtain the sub-pixel coordinates of the feature points located in the region of interest, and the set of sub-pixel coordinates of all feature points located in the region of interest is used as the sub-pixel feature point set.

8. The structural facility deformation monitoring system based on machine vision is characterized by: include: The image acquisition module is used to acquire image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain image data of each sub-block; an image preprocessing module, configured to calculate a cumulative distribution function and a target cumulative distribution function corresponding to each sub-block based on the image data of each sub-block, construct a grayscale mapping function based on the cumulative distribution function and the target cumulative distribution function, perform grayscale distribution mapping on the image data of each sub-block based on the grayscale mapping function, obtain an adjusted grayscale image of each sub-block, and perform high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block; A region of interest screening module is used to perform binarization processing on the high-frequency enhanced image of each sub-block to obtain binary image data of each sub-block, define connected components of the binary image data, calculate multidimensional geometric parameters of each connected component, the multidimensional geometric parameters including perimeter parameters, area parameters, and direction angle parameters, and screen out the region of interest based on the multidimensional geometric parameters of each connected component; The feature point detection module is used to extract feature points from the high-frequency enhanced image based on the region of interest, and use the quadratic interpolation method to perform sub-pixel positioning on each feature point to screen out the sub-pixel feature point set located in the region of interest; The anomaly detection module is used to judge the anomaly of each sub-pixel feature point and obtain the deformation monitoring results of the structural facilities; The region of interest screening module is used to perform the following steps: When the area parameter of a connected component is greater than the area threshold, the connected component is judged as an area screening area; The ratio of the square of the perimeter parameter to the area parameter is used as the shape parameter. When the shape parameter of the connected component is greater than the shape threshold, the connected component is judged to be a shape screening area. When the direction angle parameter of the connected component is within the direction angle threshold range, the connected component is judged to be a direction angle screening area; The feature point detection module is used to perform the following steps: Based on the pixel coordinates of the region of interest, determining the grayscale value of the corresponding pixel coordinates in the high-frequency enhanced image; Harris algorithm is used to calculate the feature point response value of each pixel based on the second-order statistical characteristics of the gray gradient changes around each pixel in the high-frequency enhanced image; When the feature point response value of a pixel point is greater than the preset minimum response threshold, the pixel point is determined to be a feature point; The anomaly detection module is used to perform the following steps: Obtaining the actual physical size of the collected image data; Determine the dynamic scale correction coefficient of each sub-pixel feature point based on the ratio of the actual physical size of the image data to the coordinates of the sub-pixel feature points; Correcting the coordinates of each sub-pixel feature point based on the dynamic scale correction coefficient to obtain corrected sub-pixel feature point coordinates, and a set of all corrected sub-pixel feature point coordinates is used as a correction feature point set; Based on the correction feature point set, determining the local window coordinates of each feature point in the correction feature point set; When a feature point in the correction feature point set is outside the local window coordinates, the feature point is judged as abnormal and marked, and abnormal warning data is generated.

Citation Information

Patent Citations

  • Vein imaging method and device based on deep learning

    CN111178229A

  • Metal part surface text recognition method and system based on contour feature enhancement

    CN114973228A