Structural facility deformation monitoring method and system based on machine vision
By dividing the image data into sub-blocks and calculating the cumulative distribution function, building a grayscale mapping function and performing high-frequency enhancement processing, combining multi-dimensional geometric parameters to filter the region of interest and performing sub-pixel-level feature point positioning, the problem of insufficient image data processing accuracy and adaptability in the prior art is solved, and high-precision structural facility deformation monitoring is achieved.
Patent Information
- Application Number
- CN202510525430.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-04-25
AI Technical Summary
The existing structural facility deformation monitoring technology based on machine vision has problems of insufficient accuracy and adaptability when processing image data in complex environments. Especially under the influence of light changes, texture interference and noise, it is difficult to ensure the synchronous optimization of the global contrast and local details of the image, resulting in a reduced reliability of subsequent analysis.
By dividing the image data into non-overlapping sub-blocks, calculating the cumulative distribution function and target cumulative distribution function of each sub-block, constructing a grayscale mapping function, performing grayscale distribution mapping and high-frequency enhancement processing, and filtering the region of interest with the multi-dimensional geometric parameters of the connected components, and performing sub-pixel-level feature point positioning and abnormal judgment.
The global contrast and local details of the monitoring image are synchronously optimized, and the capture sensitivity of tiny changing areas such as cracks and landslides and the deformation monitoring accuracy of structural facilities such as dams and slopes is improved.
Smart Images

Figure CN120070418A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine vision, and particularly to a method and system for monitoring the deformation of structural facilities based on machine vision. Background Art
[0002] Most of the traditional dam and slope deformation monitoring technologies rely on the measurement of physical sensors (such as displacement gauges, total stations, etc.). Although these methods have certain measurement accuracies, they have technical problems such as complex layout, poor real-time performance, limited coverage, and insufficient response to dynamic changes. With the rapid development of industrial automation and intelligent technologies, the monitoring and measurement technologies based on machine vision have gradually been applied in the safety assessment and deformation monitoring of structural facilities such as dams and slopes. Compared with the traditional technical solutions, the machine vision technology can efficiently collect and analyze the structural surface deformation information of structural facilities in a non-contact manner through the combination of image acquisition devices and computer algorithms, and achieve accurate deformation measurement.
[0003] However, the 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 light changes, texture interference, noise, etc.). Specifically, on the one hand, during the process of image acquisition and preprocessing, affected by lighting conditions, weather, and the interference of the complex on-site environment, the existing technologies often have difficulty in ensuring the synchronous optimization of the global contrast and local details of the images, resulting in a significant reduction in the reliability of subsequent image analysis. On the other hand, during the process of feature extraction and anomaly detection, the existing technologies have low sensitivity to capturing small change regions such as cracks and landslides, especially lacking the ability of sub-pixel level feature point positioning and change monitoring, and it is difficult to meet the requirements of high-precision dynamic monitoring of structural facilities such as dams and slopes. Summary of the Invention
[0004] In view of the above technical problems, the present invention proposes a method and system for monitoring the deformation of structural facilities based on machine vision, aiming to synchronously optimize the global contrast and local details of the monitoring images, provide a more reliable data basis for subsequent image analysis, and at the same time achieve sub-pixel level positioning of feature points and focus on the regions of interest, greatly improving the sensitivity to capturing small change regions such as cracks and landslides and 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 the deformation of structural facilities based on machine vision, including the following steps: Collect image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain the image data of each sub-block; 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, and perform grayscale distribution mapping on the image data of each sub-block based on the grayscale mapping function to obtain the adjusted grayscale image of each sub-block; Perform high-frequency enhancement processing on the adjusted grayscale image to obtain the high-frequency enhanced image of each sub-block; Perform binarization processing on the high-frequency enhanced image of each sub-block to obtain the binary image data of each sub-block, define the connected components of the binary image data, and calculate the multi-dimensional geometric parameters of each connected component; Based on the multi-dimensional geometric parameters of each connected component, filter to obtain the region of interest; Extract feature points from the high-frequency enhanced image based on the region of interest; Perform sub-pixel positioning on each feature point, and filter out the set of sub-pixel feature points located in the region of interest; Perform anomaly judgment on each sub-pixel feature point to obtain the deformation monitoring result of the structural facility.
[0006] Preferably, calculating the cumulative distribution function and the target cumulative distribution function corresponding to each sub-block based on the image data of each sub-block includes: Based on the image data of each sub-block, statistically analyze the frequency distribution of each gray value in each sub-block image as the gray histogram of each sub-block; Based on the gray histogram of each sub-block, calculate the cumulative distribution function corresponding to each sub-block; Determine the ideal number of pixel points of each gray value in each sub-block image with a uniform distribution as the target; Based on the ideal number of pixel points of each gray value in each sub-block image, statistically analyze the ideal frequency distribution of each gray value in each sub-block image as the target histogram of each sub-block; Based on the target histogram of each sub-block, calculate the target cumulative distribution function corresponding to each sub-block.
[0007] Preferably, 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 the adjusted grayscale image of each sub-block includes: Construct a grayscale mapping function with the goal of finding the target gray value that minimizes the difference between the cumulative distribution function and the target cumulative distribution function of each gray value; Input the gray value of each pixel point in the image data of each sub-block into the grayscale mapping function, and output the adjusted gray value of each pixel point to form the adjusted grayscale image of each sub-block.
[0008] Preferably, performing high-frequency enhancement processing on the adjusted grayscale image to obtain the high-frequency enhanced image of each sub-block includes: Calculate the Laplacian operator for each pixel in the adjusted grayscale image of each sub-block as the high-frequency component of each pixel; Determine the high-frequency region threshold based on the high-frequency components of the pixels in the adjusted grayscale image of each sub-block; Extract the high-frequency mask region from the adjusted grayscale image of each sub-block based on the high-frequency region threshold; Input the grayscale value of each pixel in the high-frequency mask region into the grayscale mapping function, output the adjusted grayscale value of each pixel, and form the secondarily adjusted grayscale image of each sub-block as the high-frequency enhanced image of each sub-block.
[0009] Preferably, define the connected components of the binary image data and calculate the multi-dimensional geometric parameters of each connected component, including: Define the connected component as the set of pixels in the binary image data where all adjacent pixel values are 1; Count the number of boundary pixels of each connected component to obtain the perimeter parameter of each connected component; Count the number of pixels included 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 parameter of each connected component; Based on the centroid coordinates of each connected component, calculate the direction angle parameter of each connected component using the principal component analysis method.
[0010] Preferably, based on the multi-dimensional geometric parameters of each connected component, screen to obtain the region of interest, including: Obtain the historical area parameter; Calculate the 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 the area screening region; Take the ratio of the square of the perimeter parameter to the area parameter as the shape parameter and obtain the historical shape parameter; Calculate the shape threshold based on the historical shape parameter. When the shape parameter of the connected component is greater than the shape threshold, determine that the connected component is the shape screening region; Obtain the historical crack data; Calculate the direction angle threshold range based on the historical crack data. When the direction parameter of the connected component is within the direction angle threshold range, determine that the connected component is the direction angle screening region; Take the set of all area screening regions, shape screening regions, and direction angle screening regions as the region of interest.
[0011] Preferably, extract feature points from the high-frequency enhanced image based on the region of interest, including: Based on the pixel coordinates of the region of interest, determine the grayscale value of the corresponding pixel coordinates in the high-frequency enhanced image; Using the Harris algorithm, calculate the feature point response value of each pixel point based on the second-order statistical characteristics of the gray-scale gradient change around each pixel point in the high-frequency enhanced image; Preset a minimum response threshold. When the feature point response value of a pixel point is greater than the minimum response threshold, determine that the pixel point is a feature point.
[0012] Preferably, perform sub-pixel positioning on each feature point, and screen out the set of sub-pixel feature points located in the region of interest, including: Use the quadratic interpolation method to calculate the sub-pixel coordinates of each feature point; Based on the pixel coordinates of the region of interest, screen the sub-pixel coordinates of all feature points to obtain the sub-pixel coordinates of the feature points located in the region of interest. The set of sub-pixel coordinates of all feature points located in the region of interest is used as the set of sub-pixel feature points.
[0013] Preferably, perform anomaly judgment on each sub-pixel feature point to obtain the deformation monitoring result of the structural facility, including: Obtain the actual physical size of the collected image data; Based on the ratio of the actual physical size of the image data to the sub-pixel feature point coordinates, determine the dynamic ratio correction coefficient of each sub-pixel feature point; Based on the dynamic ratio correction coefficient, correct the coordinates of each sub-pixel feature point to obtain the corrected sub-pixel feature point coordinates. The set of all corrected sub-pixel feature point coordinates is used as the set of corrected feature points; Based on the set of corrected feature points, determine the local window coordinates of each feature point in the set of corrected feature points; When the feature point in the set of corrected feature points is outside the local window coordinates, determine that the feature point is abnormal and mark it to generate anomaly warning data.
[0014] In a second aspect, the present application provides a structural facility deformation monitoring system based on machine vision, including: An image acquisition module, configured to acquire image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain the image data of each sub-block; An image preprocessing module, 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 gray-scale mapping function based on the cumulative distribution function and the target cumulative distribution function, and perform gray-scale distribution mapping on the image data of each sub-block based on the gray-scale mapping function to obtain the adjusted grayscale image of each sub-block, and perform high-frequency enhancement processing on the adjusted grayscale image to obtain the high-frequency enhanced image of each sub-block; The region of interest screening module is used to perform binarization processing on the high-frequency enhanced images of each sub-block to obtain the binary image data of each sub-block, define the connected components of the binary image data, calculate the multi-dimensional geometric parameters of each connected component, and screen out the region of interest based on the multi-dimensional 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, perform sub-pixel positioning on each feature point, and screen out the set of sub-pixel feature points located in the region of interest; The anomaly detection module is used to perform anomaly judgment on each sub-pixel feature point to obtain the deformation monitoring result of the structural facility.
[0015] The beneficial technical effects of the present invention at least include: 1. By adopting the deformation monitoring method and system for structural facilities based on machine vision, first, the image data is divided into non-overlapping sub-blocks and the gray-scale histogram of each sub-block is calculated. Each sub-block is processed independently, enhancing the contrast details of the local area. Secondly, the overall characteristics from the darkest to the brightest gray-scale values are quantified through the calculation of the cumulative distribution function. The calculation of the target cumulative distribution function provides a standardized distribution model for the algorithm. Combining the cumulative distribution function and the target cumulative distribution function to construct a gray-scale mapping function, mapping the original image gray-scale distribution to the target cumulative distribution function to achieve uniform distribution, adjusting the global brightness and contrast of the image data. Then, the visibility of the tiny details of the image is significantly improved through high-frequency enhancement, realizing the synchronous optimization of the global contrast and local details of the monitoring image, providing a more reliable data basis for subsequent image analysis. Then, by combining the multi-dimensional geometric characteristics of the connected components, a comprehensive screening rule is constructed, which can quickly extract regions of interest such as cracks and landslides on the surface of the dam or slope. Then, through the sub-pixel positioning of the feature points and focusing on the region of interest, the reliability and regional pertinence of feature point extraction are significantly improved. Finally, anomaly judgment is performed on the extracted sub-pixel feature points, thereby greatly improving the capture sensitivity for tiny change regions such as cracks and landslides and the deformation monitoring accuracy for structural facilities such as dams and slopes; 2. By dividing the image data into non - overlapping sub - blocks and calculating the grayscale histograms of each sub - block, with each sub - block processed independently, the contrast details of local regions are enhanced. 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. Combining sub - block processing with the grayscale histogram helps to improve the speed of subsequent analysis of abnormal regions such as cracks on the dam surface and slope slides. 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 from the darkest to the brightest grayscale values are quantified through the cumulative distribution function, thus being able to effectively reflect the uneven distribution problem of pixel brightness in the image data. Then, by assuming a uniform distribution of grayscale values in the target histogram, that is, the number of pixel points for each grayscale value is equal, an ideal mode for optimizing image brightness and contrast is provided. 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; 3. By calculating the second - order derivative of the grayscale change using the Laplace operator, edges and high - frequency regions are accurately captured, such as crack edges or minute deformations. Then, the visibility of minute details is significantly enhanced through high - frequency enhanced images, laying a higher - precision data foundation for subsequent feature point detection and abnormal region screening. Compared with the sharpening methods commonly used in the prior art (such as first - order gradient enhancement, etc.) which are prone to amplifying noise or losing the overall brightness information of the image, the high - frequency enhancement processing scheme proposed in this application can more accurately enhance the features of the target region while suppressing over - processing of non - target regions. Moreover, through local analysis of high - frequency components, enhancement can be performed on the target region instead of global uniform processing, improving the adaptability to specific targets (such as crack edges). The local contrast is further enhanced through the histogram equalization operation performed on the high - frequency mask region, making high - frequency features (such as crack edges or minute deformations) more prominent. Since the high - frequency mask region is concentrated in the target region, local equalization can avoid the problem of detail loss that may be introduced by global equalization, making the information in the key region clearer. From global equalization to local enhancement, and then to histogram equalization of the high - frequency mask, each step of this application optimizes different levels of the image, achieving refined image processing. The combination of the high - frequency mask and histogram equalization makes target features such as cracks, landslides, and edges more prominently displayed in complex backgrounds, thereby improving the recognition accuracy of key features and the detectability of subsequent abnormal features; 4. By performing binarization processing on the high-frequency enhanced images of each sub-block, the regional division of the binary image is achieved, separating the target area from the background area, reducing the computational amount of all image pixels, and optimizing the processing efficiency. Secondly, by calculating the area parameter, the scale of the connected components can be quantified, directly reflecting the size of the target area (such as the area of a crack or the coverage range of a deformed area). The perimeter parameter describes the boundary length of the connected components and can assist in judging the shape characteristics of the target area (such as the slender shape of a crack). The direction angle parameter calculated by using the principal component analysis method proposed in this application can intuitively reflect the extension direction of the target area, especially suitable for the analysis of target areas with significant directionality such as cracks or landslides. Then, by combining the screening rules of area, shape, and direction angle, the region of interest is screened from the multi-dimensional feature perspective, greatly improving the reliability and accuracy of the feature region. Compared with the single geometric feature (such as area) screening scheme commonly used in the prior art, this application constructs a comprehensive screening rule by combining area, shape, and direction angle characteristics, so as to quickly extract regions of interest such as cracks and landslides on the surface of dams or slopes, providing a good foundation for subsequent anomaly monitoring; 5. By using the Harris algorithm to calculate the feature point response value of each pixel point based on the second-order statistical characteristics of the gray gradient change around each pixel point in the high-frequency enhanced image and quickly screening out the feature points based on this, it can effectively identify pixel points with significant changes (such as edge points, corner points, etc.) and capture significant geometric shapes (such as corner points and edges) in the image through gradient changes, so as to highlight the endpoint and corner regions of cracks in the dam and slope monitoring images and provide key data for subsequent anomaly analysis; 6. By using the quadratic interpolation method for sub-pixel positioning of feature points, it can effectively capture minute deformation or displacement changes in the image (such as the gradual expansion of a crack or the slight sliding of a slope), greatly improving the capture sensitivity for minute change regions such as cracks and landslides in dam and slope monitoring, and excluding feature points irrelevant 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 the feature point detection in the prior art that operates on the entire image, this application focuses on the target area by combining the screening of the region of interest, significantly improving the reliability and regional pertinence of the feature points. Moreover, the feature point detection commonly used in the prior art usually stops at the pixel-level accuracy, while this application achieves sub-pixel accuracy positioning of feature points through quadratic interpolation, especially suitable for the detection of minute changes (such as the gradual expansion of a crack or the slight sliding of a slope) in structural facilities; 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 through 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 the 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, the present 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.
[0016] 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
[0017] The present invention will be further described below in conjunction with the accompanying drawings: Figure 1 The present invention is a flowchart of a method for monitoring deformation of structural facilities based on machine vision according to an embodiment of the present invention.
[0018] Figure 2 Schematic diagram of the structure of a machine vision-based structural facility deformation monitoring system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The technical solutions of the embodiments of the present invention are explained and described below in conjunction with the drawings of the embodiments of the present invention, but the following embodiments are only preferred embodiments of the present invention, not all. Based on the embodiments in the implementation mode, other embodiments obtained by those skilled in the art without creative work are all within the protection scope of the present invention.
[0020] In the following description, terms such as "inner", "outer", "upper", "lower", "left", "right", etc., which indicate orientation or positional relationship, are only for the convenience of describing embodiments and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention.
[0021] Please refer to the attached Figure 1 , Figure 1 which shows a schematic flow chart of a structural facility deformation monitoring method based on machine vision provided by an embodiment of this specification.
[0022] As Figure 1 shown, the structural facility deformation monitoring method based on machine vision may at least include the following steps: S1. Collect image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain the image data of each sub-block; Specifically, the implementation manner of step S1 may be: First, collect the image data of the structural facility based on a CCD camera. Image data with accurate positioning can be collected for slopes, dams, etc. through physical targets (such as checkerboards), etc., so as to establish the mapping relationship between the image pixel coordinates and the actual physical world coordinates, and at the same time reduce the pixel position deviation of image collection at different times and improve the accuracy of visual measurement; then, convert the collected image data into a grayscale image; then, divide the grayscale image into several sub-blocks. The number of divided image sub-blocks can be determined according to experience to achieve non-overlapping sub-block division of the grayscale image and obtain the image data of each sub-block.
[0023] 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.
[0024] Furthermore, in this embodiment, 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: S21. Based on the image data of each sub-block, count the frequency distribution of each gray value appearing in each sub-block image as the gray histogram of each sub-block.
[0025] Specifically, the implementation manner of counting the frequency distribution of each gray value appearing in each sub-block image is: Among them, g represents the gray value, where g can be any integer from 0 (black) to 255 (white), H(g) represents the number of pixels with gray value g in the current sub-block image, M represents the number of horizontal pixels in the current sub-block image, N represents the number of vertical pixels in the current sub-block image, (x, y) represents the pixel coordinates in the current sub-block image, and I(x, y) represents the gray value of the pixel (x, y) in the current sub-block image. represents the Delta indicator function; Next, based on H(g), the frequency distribution of each gray value in the sub-block image can be counted as the gray histogram. The horizontal axis of the gray histogram represents the gray value, and the vertical axis represents the number of pixels with the gray value.
[0026] S22. Based on the gray histograms of each sub-block, calculate the cumulative distribution function corresponding to each sub-block.
[0027] Specifically, the cumulative distribution function can be expressed as: Among them, H(i) and H(j) respectively represent the number of pixels with gray values i and j, and 255 represents the gray value range from 0 to 255. It can be understood that the cumulative distribution function C(g) represents the pixel ratio with gray value less than or equal to g.
[0028] S23. Determine the ideal number of pixels for each gray value in each sub-block image with a uniform distribution as the goal.
[0029] Specifically, the ideal number of pixels with gray value g can be expressed as: Among them, M represents the number of horizontal pixels in the current sub-block image, N represents the number of vertical pixels in the current sub-block image, and 256 represents the gray value range of 256 in total from 0 to 255.
[0030] S24. Based on the ideal number of pixels for each gray value in each sub-block image, count the ideal frequency distribution of each gray value in each sub-block image as the target histogram of each sub-block.
[0031] S25. Based on the target histograms of each sub-block, calculate the target cumulative distribution function corresponding to each sub-block.
[0032] Specifically, the target cumulative distribution function can be expressed as: Among them, and respectively represent the number of pixels with gray values i and j in the target histogram.
[0033] In this embodiment, first, the image data is divided into non-overlapping sub-blocks and the grayscale histograms of each sub-block are calculated. 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. Combining the sub-block processing 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 the grayscale value statistics, the complex image data is quantified into a simple frequency distribution, reducing the pressure of data storage and transmission. Second, the overall characteristics from the darkest to the brightest grayscale values are quantified through the cumulative distribution function, so as to effectively reflect the problem of 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 overall image is darker). Then, by assuming a uniform distribution of grayscale values in the target histogram, that is, the number of pixel points for each grayscale value is equal, an ideal mode for optimizing the image brightness and contrast is provided. 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.
[0034] 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 the adjusted grayscale image of each sub-block.
[0035] Further, in this embodiment, 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 the adjusted grayscale image of each sub-block includes: Construct a grayscale mapping function with the goal of finding the target grayscale value that minimizes the difference between the cumulative distribution function of each grayscale value and the target cumulative distribution function; Input the grayscale value of each pixel point in the image data of each sub-block into the grayscale mapping function, and output the adjusted grayscale value of each pixel point to form the adjusted grayscale image of each sub-block.
[0036] Specifically, the grayscale mapping function can be expressed as: where T(g) represents the target grayscale value corresponding to the grayscale value g , represents the grayscale value in the target cumulative distribution function.
[0037] In this embodiment, a grayscale mapping function is constructed 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, adjusting the global brightness and contrast of the image data, ensuring the overall image balance. The entire equalization process does not rely on manual parameter adjustment and is more suitable for scenarios of real-time automated monitoring of the deformation of structural facilities.
[0038] S4. Perform high-frequency enhancement processing on the adjusted grayscale image to obtain the high-frequency enhanced images of each sub-block.
[0039] Furthermore, in this embodiment, performing high-frequency enhancement processing on the adjusted grayscale image to obtain the high-frequency enhanced images of each sub-block includes: S41. Calculate the Laplacian operator of each pixel point in the adjusted grayscale image of each sub-block as the high-frequency component of each pixel point.
[0040] Specifically, the high-frequency component of a pixel point can be expressed as: where (x, y) represents the pixel point coordinates of the adjusted grayscale image of the current sub-block, I(x, y) represents the grayscale value of the pixel point (x, y) in the adjusted grayscale image of the current sub-block, represents the high-frequency component of the pixel point (x, y), represents the sub-block image after preliminary high-frequency enhancement, represents the high-frequency enhancement coefficient preset based on historical experience.
[0041] S42. Determine the high-frequency region threshold based on the high-frequency components of the pixel points in the adjusted grayscale image of each sub-block.
[0042] Exemplarily, the high-frequency region threshold can be expressed as: S43. Extract the high-frequency mask region from the adjusted grayscale image of each sub-block based on the high-frequency region threshold.
[0043] Specifically, the high-frequency mask region can be expressed as: S44. Input the grayscale value of each pixel point in the high-frequency mask region into the grayscale mapping function, output the adjusted grayscale value of each pixel point, and form the grayscale image of each sub-block after secondary adjustment as the high-frequency enhanced image of each sub-block.
[0044] It can be understood that in this embodiment, histogram equalization is performed again on the high-frequency mask region, and the gray values after enhanced contrast are output to form a high-frequency enhanced image after secondary adjustment of each sub-block.
[0045] In this embodiment, first, the second derivative of the gray value change is calculated through the Laplace operator to accurately capture edges and high-frequency regions, such as crack edges or minute deformations. Then, the visibility of minute details is significantly improved through the high-frequency enhanced image, laying a higher-precision data foundation for subsequent feature point detection and abnormal region screening. Compared with the sharpening methods commonly used in the prior art (such as first-order gradient enhancement, etc.) that are prone to amplifying noise or losing the overall brightness information of the image, the high-frequency enhancement processing scheme proposed in this embodiment can more accurately enhance the features of the target region while suppressing over-processing of non-target regions. Moreover, through local analysis of high-frequency components, it can enhance the target region rather than performing global uniform processing, improving the adaptability to specific targets (such as crack edges). By performing histogram equalization operations on the high-frequency mask region, the local contrast is further enhanced, making high-frequency features (such as crack edges or minute deformations) more prominent. Since the high-frequency mask region is concentrated in the target region, local equalization can avoid the problem of detail loss that may be introduced by global equalization, making the information in the key region 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, realizing refined image processing. The combination of the high-frequency mask and histogram equalization makes target features such as cracks, landslides, and edges more prominently displayed in complex backgrounds, thereby improving the recognition accuracy of key features and the detectability of subsequent abnormal features.
[0046] S5. Binarize the high-frequency enhanced images of each sub-block to obtain binary image data of each sub-block, define the connected components of the binary image data, and calculate the multi-dimensional geometric parameters of each connected component.
[0047] Furthermore, in this embodiment, defining the connected components of the binary image data and calculating the multi-dimensional geometric parameters of each connected component include: S51. Define the connected component as a set of pixels in the binary image data where all adjacent pixel values are 1. S52. Count the number of boundary pixel points of each connected component to obtain the perimeter parameter of each connected component. S53. Count the number of pixel points included in each connected component to obtain the area parameter of each connected component.
[0048] Specifically, the area parameter of each connected component can be expressed as: where (x, y) represents the coordinates of the connected component. Denote the i-th connected component.
[0049] S54. Determine the centroid coordinates of each connected component based on the area geometric parameters of each connected component.
[0050] Specifically, the centroid coordinates of each connected component can be expressed as: Where, and respectively represent the coordinate values of the centroid of the i-th connected component in the x-direction and y-direction.
[0051] S55. Based on the centroid coordinates of each connected component, use the principal component analysis method to calculate the direction angle parameter of each connected component.
[0052] Specifically, in this embodiment, the direction angle parameter of each connected component calculated by using the principal component analysis method can be expressed as: Where, represents the (p, q)-th central moment of the i-th connected component, where p and q respectively represent the powers of x and y, and the values are non-negative integers, represents p = 1, q = 1, and the sum of the products of the deviations from the centroid in the x and y directions, represents p = 2, q = 0, and the sum of the squares of the deviations from the centroid in the x direction, represents p = 0, q = 2, and the sum of the squares of the deviations from the centroid in the y direction, represents the direction angle of the i-th connected component.
[0053] S6. Based on the multi-dimensional geometric parameters of each connected component, screen to obtain the region of interest.
[0054] Furthermore, in this embodiment, screening to obtain the region of interest based on the multi-dimensional geometric parameters of each connected component includes: S61. Obtain the historical area parameter; S62. Calculate the 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 the area screening region.
[0055] Specifically, the implementation method of calculating the area threshold based on the historical area parameter is as follows: first calculate the mean value of the historical area parameter, then calculate the standard deviation of the historical area parameter. The standard deviation measures the degree of deviation of the parameter from the mean value. Finally, add the calculated mean value and standard deviation to obtain the area threshold.
[0056] S63. Take the ratio of the square of the perimeter parameter to the area parameter as the shape parameter, and obtain the historical shape parameter; S64. Calculate the shape threshold based on the historical shape parameter. When the shape parameter of the connected component is greater than the shape threshold, determine that the connected component is the shape screening area.
[0057] Among them, the implementation method of calculating the shape threshold based on the historical shape parameter is similar to the implementation method of calculating the area threshold based on the historical area parameter, and will not be elaborated here in this embodiment.
[0058] S65. Obtain the historical crack data; S66. Calculate the range of the direction angle threshold based on the historical crack data. When the direction parameter of the connected component is within the range of the direction angle threshold, determine that the connected component is the direction angle screening area.
[0059] Specifically, the implementation method of calculating the range of the direction angle threshold based on the historical crack data is as follows: 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, so as to obtain the direction angle parameter of the historical crack data; Second, calculate the mean value of the direction angle parameters of the historical crack data; Next, calculate the standard deviation of the direction angle parameters of the historical crack data to measure the degree of data dispersion; Finally, based on the standard deviation and the mean value, set the range of the direction angle threshold. The range of the direction angle threshold can be to add and subtract a certain multiple of the standard deviation from the mean value, and the multiple can be adjusted according to specific situations.
[0060] S67. Take the set of all area screening areas, shape screening areas, and direction angle screening areas as the region of interest.
[0061] In this embodiment, first, by performing binarization processing on the high-frequency enhanced images of each sub-block, regional division of the binary image is achieved, the target region and the background region are separated, the computational amount of all image pixels is reduced, and the processing efficiency is optimized. Second, by calculating the area parameter, the scale of the connected component can be quantified, directly reflecting the size of the target region (such as the area of a crack or the coverage range of a deformed region). The perimeter parameter describes the boundary length of the connected component and can assist in judging the shape characteristics of the target region (such as the slender shape of a crack). The direction angle parameter calculated by using the principal component analysis method proposed in this embodiment can intuitively reflect the extension direction of the target region, and is particularly suitable for the analysis of target regions with significant directivity such as cracks or landslides. Then, by comprehensively considering the screening rules of area, shape, and direction angle, the region of interest is screened from the multi-dimensional feature perspective, greatly improving the reliability and accuracy of the feature region. Compared with the single geometric feature (such as area) screening scheme commonly used in the prior art, this embodiment constructs a comprehensive screening rule by combining the characteristics of area, shape, and direction angle, so as to quickly extract regions of interest such as cracks and landslides on the surface of the dam or slope, providing a good basis for subsequent anomaly monitoring.
[0062] S7. Extract feature points from the high-frequency enhanced image based on the region of interest.
[0063] Further, in this embodiment, extracting feature points from the high-frequency enhanced image based on the region of interest includes: S71. Based on the pixel coordinates of the region of interest, determine the gray value of the corresponding pixel coordinates in the high-frequency enhanced image.
[0064] Specifically, according to the pixel coordinates of each connected component in the set of regions of interest, determine the gray value of the pixel coordinates corresponding to the connected component in the high-frequency enhanced image.
[0065] S72. Use the Harris algorithm to calculate the feature point response value of each pixel point based on the second-order statistical characteristics of the gray gradient change around each pixel point in the high-frequency enhanced image.
[0066] Specifically, in this embodiment, using the Harris algorithm to calculate the feature point response value of each pixel point based on the second-order statistical characteristics of the gray gradient change around each pixel point in the high-frequency enhanced image can be expressed as: where (x, y) represents the pixel point in the high-frequency enhanced image, and M(x, y) represents the second-order statistical characteristic matrix of the gray gradient change around the pixel point. and respectively represent the gradient values of the high-frequency enhanced image in the x and y directions, represents the gradient distribution eigenvalue of the pixel point, represents the sum of the eigenvalues of the matrix M(x, y), which is used to reflect the total change of the gradient. R(x, y) represents the characteristic point response value of the pixel point, represents a preset empirical coefficient determined based on historical data.
[0067] S73, the preset minimum response threshold. When the characteristic point response value of the pixel point is greater than the minimum response threshold, it is determined that the pixel point is a characteristic point.
[0068] In this embodiment, by using the Harris algorithm to calculate the characteristic point response value of each pixel point based on the second-order statistical characteristics of the gray gradient change around each pixel point in the high-frequency enhanced image and quickly screening out the characteristic points based on this, it can effectively identify the pixel points with significant changes (such as edge points, corner points, etc.) and capture the significant geometric shapes (such as corner points and edges) in the image through the gradient change, so as to highlight the endpoints and corner regions of cracks in the dam and slope monitoring images and provide key data for subsequent anomaly analysis.
[0069] S8. Perform sub-pixel localization on each characteristic point and screen out the set of sub-pixel characteristic points located in the region of interest.
[0070] Furthermore, in this embodiment, performing sub-pixel localization on each characteristic point and screening out the set of sub-pixel characteristic points located in the region of interest includes: S81. Use the quadratic interpolation method to calculate the sub-pixel coordinates of each characteristic point.
[0071] Specifically, in this embodiment, the sub-pixel coordinates of the characteristic point calculated by the quadratic interpolation method can be expressed as: where, and respectively represent the sub-pixel coordinate values of the characteristic point, and respectively represent the first-order derivatives of the characteristic point in the x and y directions, and respectively represent the second-order derivatives of the characteristic point in the x and y directions, represents the total joint change of the gradient of the characteristic point in the x and y directions.
[0072] S82. Screen 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 within the region of interest. The set of sub-pixel coordinates of all feature points located within the region of interest is used as the sub-pixel feature point set.
[0073] In this embodiment, by using the quadratic interpolation method for sub-pixel positioning of feature points, it is possible to effectively capture minute deformations or displacement changes in the image (such as the gradual expansion of cracks or the slight sliding of slopes). In dam and slope monitoring, it greatly improves the capture sensitivity for small change regions such as cracks and landslides. And in the screening step within the region of interest, feature points irrelevant to the target are excluded, making the remaining feature points more reliable in describing regional anomalies. Compared with the redundant processing of feature point detection operating on the entire image commonly used in the prior art, this embodiment focuses on the target region by combining region-of-interest screening, significantly enhancing the reliability and regional pertinence of feature points. Moreover, the feature point detection commonly used in the prior art usually stops at pixel-level accuracy, while this embodiment achieves sub-pixel accuracy positioning of feature points through quadratic interpolation, especially suitable for the detection of small changes (such as the gradual expansion of cracks or the slight sliding of slopes) in structural facilities.
[0074] S9. Perform anomaly judgment on each sub-pixel feature point to obtain the deformation monitoring result of the structural facility.
[0075] Furthermore, in this embodiment, performing anomaly judgment on each sub-pixel feature point to obtain the deformation monitoring result of the structural facility includes: S91. Obtain the actual physical size of the collected image data.
[0076] Among them, the actual physical size can be obtained by measuring the physical target, which is similar to the method of obtaining the actual physical size of an image in the prior art, and this embodiment will not elaborate on it here.
[0077] S92. Determine the dynamic ratio correction coefficient for each sub-pixel feature point based on the ratio of the actual physical size of the image data to the sub-pixel feature point coordinates.
[0078] It can be understood that the collected image data may have proportion changes due to various factors (such as lens distortion, shooting angle, distance, etc.). Therefore, in this embodiment, a ratio correction coefficient is obtained through the ratio of the actual physical size of the image data to the sub-pixel feature point coordinates, and this ratio correction coefficient is dynamically adjusted in each deformation monitoring to adapt to different images, so it is used as the dynamic ratio correction coefficient.
[0079] S93. Correct the coordinates of each sub-pixel level feature point based on the dynamic ratio correction coefficient to obtain the corrected sub-pixel level feature point coordinates, and the set of all corrected sub-pixel level feature point coordinates is used as the corrected feature point set.
[0080] Specifically, the implementation method of correcting the coordinates of each sub-pixel level feature point based on the dynamic ratio correction coefficient is as follows: Among them, and respectively represent the coordinate values after coordinate correction of the i-th sub-pixel level feature point, and respectively represent the coordinates of the i-th sub-pixel level feature point, and respectively represent the dynamic ratio correction coefficients of the i-th sub-pixel level feature point on the x-axis and y-axis, and respectively represent the dynamic ratio correction coefficients of the (i - 1)-th sub-pixel level feature point (i.e., the adjacent feature point) on the x-axis and y-axis.
[0081] S94. Based on the corrected feature point set, determine the local window coordinates of each feature point in the corrected feature point set.
[0082] Specifically, the local window coordinates can be expressed as: Among them, and respectively represent the sub-pixel level feature point coordinates recorded in the previous monitoring process, and respectively represent the maximum offsets of the feature point in the x-axis and y-axis directions based on scene deformation, obtained according to the preset.
[0083] S95. When the feature point in the corrected feature point set is outside the local window coordinates, determine that the feature point is abnormal and mark it to generate abnormal warning data.
[0084] This embodiment maps the sub-pixel feature point coordinates in the pixel space to the actual physical space through a dynamic scale correction coefficient, provides location information with clear physical meaning for the feature points, and corrects the scale differences of different collected images through the dynamic correction coefficient, 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 ensures 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 the large-scale deformation analysis of slopes, and at the same time enables the correction feature point set to 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 embodiment proposes a solution based on this, using a local window to quickly screen abnormal feature points, and marking 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.
[0085] 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 accurate positioning information for maintenance personnel, and combine geometric parameters such as the area, perimeter and azimuth of the connected components to provide a comprehensive 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.
[0086] Furthermore, this embodiment can also generate an abnormal report through a report generation tool by combining the coordinate data of the abnormal feature points with the geometric parameters such as the area, perimeter and azimuth of the corresponding connected components. Maintenance personnel can further analyze the specific properties of the abnormality (such as crack shape, direction, etc.) based on the abnormal report to provide support for subsequent maintenance decisions. The abnormal report is transmitted to the maintenance terminal and system database via the wireless network for backup storage, providing a complete data basis for subsequent historical data analysis and trend prediction.
[0087] 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: The pixel size of the collected image data is 300*300. After being converted into a grayscale image, the range of pixel grayscale values is [0, 255]. The image data is divided into 10*10 sub-blocks, and the frequency distribution of each grayscale value in each sub-block image is counted and a grayscale histogram is drawn. The data in the grayscale histogram is shown in Table 1 below: Table 1 Based on the grayscale histogram, the corresponding cumulative distribution function is calculated and is expressed as follows at grayscale values of 120 and 121 respectively: Traverse each grayscale value and calculate the cumulative distribution function of all grayscale values; Calculate the ideal number of pixel points of each grayscale value in each sub-block image and calculate the target cumulative distribution function, which is expressed as: Use the grayscale mapping function to calculate the target grayscale value after mapping each pixel point in the image data of each sub-block, and form the adjusted grayscale image of each sub-block; Calculate the Laplacian operator of each pixel point in the adjusted grayscale image of each sub-block and obtain the pixel values of the preliminarily high-frequency enhanced sub-block image. The data is shown in Table 2 below: Table 2 Based on the extracted high-frequency mask region, perform grayscale mapping on the high-frequency mask region again to achieve secondary histogram equalization, and output the high-frequency enhanced image with enhanced contrast; Perform binarization processing on the high-frequency enhanced images of each sub-block, define the connected components of the binary image data, and calculate the multi-dimensional geometric parameters of each connected component, including area parameter, perimeter parameter, and orientation angle parameter. The calculation results are shown in Table 3 below: Table 3 Based on the multi-dimensional geometric parameters of each connected component, filter to obtain the region of interest; Based on the pixel coordinates of the region of interest, determine the grayscale value of the corresponding pixel coordinates in the high-frequency enhanced image. Based on the second-order statistical characteristics of the grayscale gradient change of the connected components around the pixel point (1, 1) in the high-frequency enhanced image calculate the feature point response value of the pixel point (1, 1), which is expressed as: Filter the response values of feature points according to the minimum response threshold, and calculate the sub-pixel coordinates of the filtered feature points. The calculation results are shown in Table 4 below: Table 4 Determine the dynamic ratio correction coefficient for each sub-pixel feature point, and correct the coordinates of each sub-pixel feature point based on the dynamic ratio correction coefficient to obtain the corrected sub-pixel feature point coordinates. The calculation results are shown in Table 5 below: Table 5 Define a local window based on the sub-pixel feature point coordinates recorded during the previous monitoring process and the maximum offset defined for the monitoring and early warning of the slope dam, check whether the corrected feature points are abnormal, and perform early warning operations based on the inspection results.
[0088] Please refer to the appendix Figure 2 , Figure 2 which is a schematic structural diagram of a deformation monitoring system for structural facilities based on machine vision provided by an embodiment of this specification.
[0089] As Figure 2 shown, the deformation monitoring system for structural facilities based on machine vision can at least include 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, where: The image acquisition module 1 is used to acquire image data and convert it into a grayscale image, divide the grayscale image into several sub-blocks, and obtain the image data of each sub-block; The image preprocessing module 2 is used 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, and perform grayscale distribution mapping on the image data of each sub-block based on the grayscale mapping function to obtain the adjusted grayscale image of each sub-block, and perform high-frequency enhancement processing on the adjusted grayscale image to obtain the high-frequency enhanced image of each sub-block; 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 the binary image data of each sub-block, define the connected components of the binary image data, calculate the multi-dimensional geometric parameters of each connected component, and screen the region of interest based on the multi-dimensional geometric parameters of each connected component; The feature point detection module 4 is used to extract feature points from the high-frequency enhanced image based on the region of interest, perform sub-pixel positioning on each feature point, and screen out the set of sub-pixel feature points located in the region of interest; The anomaly detection module 5 is used to perform anomaly judgment on each sub-pixel feature point to obtain the deformation monitoring result of the structural facility.
[0090] It can be understood that the technical concept of the structural facility deformation monitoring system based on machine vision provided in this embodiment is similar to that of the aforementioned structural facility deformation monitoring method based on machine vision, and will not be elaborated herein again.
[0091] Another embodiment of this specification provides a computer-readable storage medium, in which instructions are stored. When they run on a computer or a processor, the computer or the processor is caused to execute one or more steps in the embodiments of the above-mentioned structural facility deformation monitoring method based on machine vision. If each component module of the above-mentioned electronic device is implemented in the form of a software functional unit and used as an independent downstream task prediction or use, it can be stored in the computer-readable storage medium.
[0092] When the functions in the above-mentioned embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or part of this technical solution, can be implemented in whole or in part by 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 includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this specification are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the 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 in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a Digital Versatile Disc (DVD)), or a semiconductor medium (for example, a SolidState Disk (SSD)), etc.
[0093] The logic and / or steps represented in the flowchart or otherwise described herein can, for example, be considered as a definitional sequence of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
[0094] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection (electronic device) having one or more wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, as the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or otherwise processing as appropriate, and then storing it in a computer memory.
[0095] As described above, these are only the preferred embodiments disclosed in this application and the explanations of the applied technical principles. Those skilled in the art should understand that the scope of protection involved in this disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the technical solutions formed by mutually replacing the above features with the (but not limited to) technical features having similar functions disclosed in this disclosure.
[0096] Furthermore, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of separate embodiments can also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.
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; 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; Performing high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block; Binarization is performed on the high-frequency enhanced image of each sub-block to obtain binary image data of each sub-block, connected components of the binary image data are defined, and multi-dimensional geometric parameters of each connected component are calculated; Based on the multi-dimensional geometric parameters of each connected component, the region of interest is screened; Extract feature points from the high-frequency enhanced image based on the region of interest; Perform sub-pixel positioning on each feature point and filter out the sub-pixel feature point set located in the area of interest; Anomalies are judged for each sub-pixel feature point to obtain deformation monitoring results of structural facilities.
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 gray value in each sub-block image, the ideal frequency distribution of each gray 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, characterized in that: 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, characterized in that: The adjusted grayscale image is subjected to high-frequency enhancement processing to obtain high-frequency enhanced images of each sub-block, including: Calculate the Laplacian operator of each pixel in the grayscale image adjusted by each sub-block as the high-frequency component of each pixel; Determine a high-frequency region threshold based on high-frequency components of pixels in the grayscale image adjusted for 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 a secondary adjusted grayscale image of each sub-block 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, characterized in that: Define the connected components of binary image data and calculate the multidimensional geometric parameters of each connected component, including: The connected component is defined as a set of pixels whose values of all adjacent pixels in the binary image data are 1; Count the number of boundary pixels of each connected component to obtain the perimeter parameter 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 5, characterized in that: 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 judged 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, and when the shape parameter of a connected component is greater than the shape threshold, the connected component is judged to be a shape screening area; Obtain historical crack data; The direction angle threshold range is calculated based on the historical crack data, and when the direction parameter of the connected component is within the direction angle threshold range, the connected component is judged to be 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, characterized in that: Extract feature points from high-frequency enhanced images based on regions of interest, including: 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 change around each pixel in the high-frequency enhanced image. A minimum response threshold is preset, and when the feature point response value of a pixel is greater than the minimum response threshold, the pixel is determined to be a feature point.
8. The method for monitoring deformation of structural facilities based on machine vision according to claim 1, characterized in that: Perform sub-pixel positioning on each feature point and filter out the sub-pixel feature point set located in the area 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 taken as the sub-pixel feature point set.
9. The method for monitoring deformation of structural facilities based on machine vision according to claim 1, characterized in that: Anomaly judgment is performed on each sub-pixel feature point to obtain deformation monitoring results of structural facilities, including: Obtaining the actual physical size of the acquired image data; Determine a 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 point; 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, and the set of all the corrected sub-pixel feature point coordinates is used as the corrected 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 located outside the local window coordinates, the feature point is judged as abnormal and marked, and abnormal warning data is generated.
10. The structural facility deformation monitoring system based on machine vision is characterized by: include: An image acquisition module is used to acquire image data and convert it into a grayscale image, divide the grayscale image into a number of sub-blocks, and obtain image data of each sub-block; An image preprocessing module, used 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, 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, and perform high-frequency enhancement processing on the adjusted grayscale image to obtain a high-frequency enhanced image of each sub-block; 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 multi-dimensional geometric parameters of each connected component, and screen the region of interest based on the multi-dimensional geometric parameters of each connected component; A feature point detection module is used to extract feature points from the high-frequency enhanced image based on the region of interest, and to perform sub-pixel positioning on each feature point to screen out a set of sub-pixel feature points located in the region of interest; The anomaly detection module is used to make anomaly judgments on each sub-pixel feature point and obtain deformation monitoring results of structural facilities.
Citation Information
Patent Citations
Bridge crack detection method
CN110378879A
Vein imaging method and device based on deep learning
CN111178229A
Metal part surface text recognition method and system based on contour feature enhancement
CN114973228A
Methods, systems, and media for image processing
US20180374203A1
Methods and systems for generating clarified and enhanced intraoperative imaging data
US20230122835A1
Cited By
Dam deformation monitoring method and system
CN120672818A
Non-contact structural body deformation detection method based on image processing
CN120765659A
Geotechnical engineering slope deformation monitoring method and system
CN120913114A
Scene filtering enhancement method and device under sky background based on thermal imaging and medium
CN121563782A
Visual monitoring and early warning method and system for looseness of high-strength bolts of steel truss bridge
CN121640371A