Building deformation monitoring method, device and equipment based on machine vision and storage medium
Patent Information
- Application Number
- CN202410151774.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-02
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2044-02-02
AI Technical Summary
在真实环境下,多种干扰因素的综合作用会导致难以实现对老旧建筑物变形的可靠、准确监测
[0038]相比现有技术,本申请实施例中提供了一种基于机器视觉的建筑物变形监测方法、装置、设备及计算机可读存储介质,该方法包括:获取固定于被监测建筑物上的正方形标记物的系列图像,并对所述系列图像进行识别,获得正方形的顶点以及所述顶点的平面坐标;计算顶点平面坐标与原始坐标的坐标差值、第一平均坐标差值,第二平均坐标差值;确定所述第一平均坐标差值与图像的拍摄时间的线性回归方程,并基于所述线性回归方程确定目标正方形;基于所述目标正方形的第二平均坐标差值确定被监测建筑物的变形结果。如此,基于正方形标记物的顶点的平面坐标的拟合方程确定目标正方形,基于目标正方形的坐标差值确定变形结果,实现了对建筑物变形情况的实时监测、提高了建筑物变形监测的准确性。
Smart Images

Figure CN118089577B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine vision technology, and in particular to a machine vision-based method, apparatus, equipment, and computer-readable storage medium for monitoring building deformation. Background Technology
[0002] With the development of civil engineering safety technology, the health monitoring and deformation assessment of buildings, especially old buildings, has become a hot topic of concern in academic and engineering circles both domestically and internationally. How to infer the working and health status of old building structures from acquired images is one of the most critical issues in the health monitoring of old buildings. Currently, domestic and international methods for health monitoring of old buildings mainly include satellite remote sensing-based identification methods and tiltmeter-based identification methods. However, satellite remote sensing and tiltmeters can only accurately identify structures under conditions of minimal or no interference. In real-world environments, the combined effects of various interfering factors make it difficult to achieve reliable and accurate monitoring of the deformation of old buildings.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main objective of this application is to provide a machine vision-based method, apparatus, equipment, and computer-readable storage medium for monitoring building deformation, aiming to monitor building deformation in real time and improve the accuracy of building deformation monitoring.
[0005] To achieve the above objectives, this application provides a machine vision-based method for monitoring building deformation, comprising the following steps: The machine vision-based method for monitoring building deformation includes:
[0006] Acquire a series of images of a square marker fixed on the building being monitored, and identify the vertices of the square and their planar coordinates.
[0007] Calculate the coordinate difference between the vertex plane coordinates and the original coordinates, the first average coordinate difference, and the second average coordinate difference;
[0008] A linear regression equation is determined between the first average coordinate difference and the image capture time, and the target square is determined based on the linear regression equation.
[0009] The deformation result of the monitored building is determined based on the second average coordinate difference of the target square.
[0010] Optionally, acquiring a series of images of a square marker fixed to the monitored building, and identifying the vertices of the square and their planar coordinates, includes:
[0011] The square marker is photographed by an industrial camera to obtain a series of images of the square marker at different shooting times. The square marker is fixedly installed on the building being monitored, and the positions of the industrial camera, the building being monitored, and the square marker are relatively fixed.
[0012] Several squares are identified from the series of images of the square markers, all vertices of the squares are extracted, and the planar coordinates of the vertices are obtained.
[0013] Optionally, the calculation of the coordinate difference between the vertex plane coordinates and the original coordinates, the first average coordinate difference, and the second average coordinate difference includes:
[0014] Calculate the coordinate difference between the planar coordinates and the original coordinates of the vertex, where the original coordinates of the vertex are the initial coordinates of each vertex of the square marker, and the planar coordinates and the original coordinates have the same coordinate system origin;
[0015] The first average coordinate difference is calculated based on the coordinate difference and the number of vertices.
[0016] Optionally, determining a linear regression equation between the first average coordinate difference and the image capture time, and determining the target square based on the linear regression equation, includes:
[0017] Based on the data series of the first average coordinate difference and the shooting time, a linear regression equation for the first average coordinate difference and the shooting time is determined;
[0018] Differentiate the linear regression equation for vertices belonging to the same square to obtain the square verification coefficient, and determine the target square based on the square verification coefficient.
[0019] Optionally, before determining the linear regression equation between the first average coordinate difference and the shooting time based on the data series of the first average coordinate difference and the shooting time, the method further includes:
[0020] Read the shooting time of the series of images, and save the first average coordinate difference and the shooting time of the corresponding image as a data pair;
[0021] All data pairs will be saved and labeled as data series, where the data series include the X data series and the Y data series.
[0022] Optionally, the step of differentiating the linear regression equation for vertices belonging to the same square to obtain square verification coefficients, and determining the target square based on the square verification coefficients, includes:
[0023] Four vertices belonging to the same square are defined as a vertex group;
[0024] The derivative of the linear regression equation based on the vertex group is determined as the square verification coefficient.
[0025] Sort the square check coefficients of each vertex group in ascending order, and determine the vertex group with the highest square check coefficient as the target square.
[0026] Optionally, determining the deformation result of the monitored building based on the second average coordinate difference of the target square includes:
[0027] The second average coordinate difference of the target square is compared with a preset value;
[0028] If the difference is greater than the first preset value, the monitoring result will be output as deformation;
[0029] If the difference is less than the first preset value and greater than the second preset value, the monitoring result will be output as pending.
[0030] If the difference is equal to the first preset value or less than the second preset value, the monitoring result will be output as undeformed.
[0031] To achieve the above objectives, this application also provides a machine vision-based building deformation monitoring device, comprising:
[0032] The coordinate acquisition module is used to acquire a series of images of a square marker fixed on the monitored building, and to identify the vertices of the square and the planar coordinates of the vertices.
[0033] The difference calculation module is used to calculate the coordinate difference between the vertex plane coordinates and the original coordinates, the first average coordinate difference, and the second average coordinate difference;
[0034] A linear fitting module is used to determine the linear regression equation between the first average coordinate difference and the image capture time, and to determine the target square based on the linear regression equation.
[0035] The determination module is used to determine the deformation result of the monitored building based on the second average coordinate difference of the target square.
[0036] To achieve the above objectives, this application also provides a machine vision-based building deformation monitoring device, which includes a memory, a processor, and a machine vision-based building deformation monitoring program stored in the memory and executable on the processor. When the machine vision-based building deformation monitoring program is executed by the processor, it implements the steps of the machine vision-based building deformation monitoring method described above.
[0037] To achieve the above objectives, this application also provides a computer-readable storage medium storing a machine vision-based building deformation monitoring program, which, when executed by a processor, implements the steps of the machine vision-based building deformation monitoring method described above.
[0038] Compared to existing technologies, this application provides a machine vision-based method, apparatus, device, and computer-readable storage medium for monitoring building deformation. The method includes: acquiring a series of images of a square marker fixed to the building being monitored; identifying the series of images to obtain the vertices of the square and their planar coordinates; calculating the coordinate difference between the planar coordinates of the vertices and their original coordinates, a first average coordinate difference, and a second average coordinate difference; determining a linear regression equation between the first average coordinate difference and the image capture time; and determining a target square based on the linear regression equation; and determining the deformation result of the monitored building based on the second average coordinate difference of the target square. Thus, by determining the target square based on the fitted equation of the planar coordinates of the square marker's vertices and determining the deformation result based on the coordinate difference of the target square, real-time monitoring of building deformation is achieved, improving the accuracy of building deformation monitoring. Attached Figure Description
[0039] Figure 1 This is a flowchart illustrating the first embodiment of the machine vision-based building deformation monitoring method of this application;
[0040] Figure 2 This is a schematic diagram of the square marker involved in the first embodiment of the machine vision-based building deformation monitoring method of this application;
[0041] Figure 3 This is a schematic diagram of the planar coordinate system and square vertices involved in the first embodiment of the machine vision-based building deformation monitoring method of this application;
[0042] Figure 4 This is a detailed flowchart illustrating the first embodiment of the machine vision-based building deformation monitoring method of this application.
[0043] Figure 5This is a schematic diagram of the structure of the machine vision-based building deformation monitoring device of this application;
[0044] Figure 6 This is a schematic block diagram of the internal structure of a machine vision-based building deformation monitoring device according to an embodiment of this application.
[0045] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0046] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0047] The first embodiment of this application proposes a machine vision-based method for monitoring building deformation, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the machine vision-based building deformation monitoring method of this application, as shown below. Figure 1 As shown, the machine vision-based building deformation monitoring method includes:
[0048] Step S101: Acquire a series of images of a square marker fixed on the monitored building, and identify the series of images to obtain the vertices of the square and the planar coordinates of the vertices;
[0049] The monitored buildings in this embodiment mainly refer to old buildings that are difficult to monitor using satellite remote sensing or tiltmeters, such as historical buildings and old residential houses. The square markers used in this embodiment are for locating the monitored buildings. These markers are fixed to the surface of the monitored buildings using screws, glue, ropes, etc. Thus, if the monitored building tilts or settles, the positions of the vertices of the square markers fixed to its surface will change accordingly. Therefore, this embodiment uses the square markers as indicators, and determines the deformation of the building by observing the changes in the coordinate positions of the square markers' vertices.
[0050] Specifically, the square marker is photographed by an industrial camera to obtain a series of images of the square marker at different shooting times. The square marker is fixedly installed on the building being monitored, and the positions of the industrial camera, the building being monitored, and the square marker are relatively fixed.
[0051] Based on the image recognition algorithm, several squares are identified from the series of images of the square markers, all vertices of the several squares are extracted, and the planar coordinates of the vertices are obtained.
[0052] The square marker involved in this embodiment has a certain thickness. The material of the square marker is required to be stable and not easily weathered or aged, so as to avoid affecting its shape and thus its positioning due to long-term fixation on the outside of the building. Its side length, thickness, and color are set according to actual needs so that the industrial camera can clearly capture the square marker. Figure 2 This is a schematic diagram of the square marker involved in the first embodiment of the machine vision-based building deformation monitoring method of this application. Figure 2 The square marker shown in the image has three nested squares with progressively decreasing side lengths inside its outermost frame. All the squares have the same center, but each square has its own vertex.
[0053] Beforehand, select a stable location with minimal interference on the exterior surface of the building to be monitored, suitable for installing the square markers. For example, install them on an exterior load-bearing wall, avoiding areas with low stability such as windows and doors. Furthermore, choose a side away from roads and pedestrian traffic, preferably a leeward side. After the square markers are fixed in place, install industrial cameras around the building. The industrial cameras should be installed in locations with minimal interference and where they can completely capture images of the square markers. For example, the industrial cameras can be installed in a stable area at a certain height from the ground, such as on a load-bearing column of another building directly facing the square markers and less than 10 meters away from the building being monitored.
[0054] After the industrial camera is fixedly installed, it continuously captures images of the square marker according to preset shooting parameters. This can be done by continuously recording video, recording video of the square marker at preset time intervals, or capturing images at preset time intervals. The fixed shooting period may be several months, years, or even decades. The industrial camera uploads the acquired video or images to a machine vision-based building deformation monitoring device. The machine vision-based building deformation monitoring device selects the required image frames from the images uploaded by the industrial camera and saves them as a series of images. Understandably, the more images in the series, the more accurate the final result; however, a larger number of images means higher computational costs. Therefore, the number of images in the series is determined according to specific needs, such as 20, 30, 50, or 100 images. The interval between series images can be fixed or random, such as fixed at 12 hours, 24 hours, or 48 hours. For example, starting from the most recent shooting time, image frames are selected backwards, with images at 12-hour intervals selected as the required image frames, until 30 series images are obtained.
[0055] After obtaining a series of images, the edges of the square markers are identified from the images using an edge detection algorithm, and the corresponding squares are determined based on these edges. After determining the squares, all vertices of the squares are extracted, and the planar coordinates of these vertices are further obtained. The edge detection algorithm used in this embodiment can be the Canny algorithm, Soble algorithm, or Prewitt algorithm. This embodiment uses a known edge detection algorithm, which will not be elaborated further here. After obtaining the edges using the edge detection algorithm, the intersection points of the edges are determined as vertices. Each square is then determined based on the length and direction of the edges. Alternatively, in other embodiments, each vertex can be determined first using a corner detection algorithm. After determining the vertices, lines can be drawn between each pair of vertices, and the edges and squares are determined based on the length and direction of the connecting lines.
[0056] After identifying each vertex, its planar coordinates can be quickly and easily obtained using programming languages and OpenCV. This embodiment uses a square marker design with four squares, corresponding to 16 vertices. (Refer to...) Figure 3 , Figure 3 This is a schematic diagram of the planar coordinate system and square vertices involved in the first embodiment of the machine vision-based building deformation monitoring method of this application. An XY planar coordinate system is established with the lower left corner vertex of the outermost square as the origin. Thus, the planar coordinates of each vertex can be represented as: Vertex 1 (X1, Y1), Vertex 2 (X2, Y2)... Vertex 16 (X... 16 ,Y 16 ).
[0057] Step S102: Calculate the coordinate difference between the vertex plane coordinates and the original coordinates, the first average coordinate difference, and the second average coordinate difference;
[0058] Specifically, firstly, the coordinate difference between the planar coordinates and the original coordinates of the vertex is calculated, where the original coordinates of the vertex are the initial coordinates of each vertex of the square marker, and the planar coordinates and the original coordinates have the same coordinate system origin;
[0059] The original coordinates are the coordinates of the square marker in its most original state. These can be the coordinates before the square marker was fixed to the monitored building, or the coordinates of the square marker on the first day it was fixed to the monitored building.
[0060] Number each vertex and each image. Represent the difference in x-axis coordinates between the u-th vertex and the v-th image as ΔX. uv Then we have:
[0061]
[0062] ΔX u ' v Let represent the x-axis coordinates of the u-th vertex in the v-th image, where u represents the vertex number and v represents the image number. This represents the original x-coordinate of the u-th vertex. The value of u ranges from 0 to the number of vertices. For example, if there are 16 vertices, then the value of u ranges from 0 to 16. The value of v ranges from 0 to the number of images. For example, if there are 30 images in a series, then the value of v ranges from 0 to 30.
[0063] Similarly, the difference in the y-axis coordinates of the u-th vertex in the v-th image is expressed as ΔY. uv Then we have:
[0064]
[0065] ΔY u ' v This represents the y-coordinate of the u-th vertex in the v-th image. This represents the original y-coordinate of the u-th vertex.
[0066] The second average coordinate difference is calculated based on the coordinate difference and the number of vertices.
[0067] The second average coordinate difference includes the second average coordinate difference along the x-axis and the second average coordinate difference along the y-axis. The second average coordinate difference is the average of the sum of the average coordinate differences of all vertices across all images. That is, first calculate the coordinate difference between the planar coordinates of each vertex in each image and its original coordinates, then calculate the sum of all differences, and finally divide the sum by the total number of differences to obtain the second average coordinate difference.
[0068] For the second average x-axis coordinate difference, first calculate the difference between the x-axis plane coordinate and the original x-axis coordinate for each vertex of each image. Then sum all the differences to obtain the total sum. Finally, divide the total sum by the total number of differences to obtain the second average x-axis coordinate difference. The second average y-axis coordinate difference is similar. For example, if there are 10 images, each with 16 vertices, then the second average y-axis coordinate difference is the average of the differences of 10*16 y-coordinates: first calculate the 10*16 coordinate differences, obtain the sum Q of these 10*16 coordinate differences, and then divide Q by the total number 10*16 to obtain the second average coordinate difference.
[0069] Step S103: Determine the linear regression equation between the first average coordinate difference and the image capture time, and determine the target square based on the linear regression equation;
[0070] like Figure 4 As shown, Figure 4This is a detailed flowchart of the first embodiment of the machine vision-based building deformation monitoring method of this application. Step S103 includes:
[0071] Step S1031: Determine the linear regression equation between the first average coordinate difference and the shooting time based on the data series of the first average coordinate difference and the shooting time;
[0072] The first average coordinate difference is the average of the differences between the planar coordinates of a vertex in multiple images and its original coordinates during two adjacent shooting times. To calculate the first average coordinate difference of a vertex, first calculate the differences between the planar coordinates of multiple images during the shooting time interval and the original coordinates, then sum these differences, and the average of the sums is the first average coordinate difference. For example, if there are 5 images between adjacent shooting times T1 and T2, then the average of the x-axis coordinate differences of the first vertex out of 16 vertices with respect to these 5 images is the T2 value of the first vertex, thus obtaining the first average x-axis coordinate difference. The corresponding data pairs are as follows:
[0073] Since the acquisition time for each vertex / square in the same image is the same, a linear regression equation between the first average coordinate difference and the shooting time can be determined. This embodiment determines the linear regression equations between the first average coordinate difference on the x-axis and the shooting time, and the linear regression equations between the first average coordinate difference on the y-axis and the shooting time, respectively.
[0074] The capture times of a series of images are read, and the first average coordinate difference and the capture time of the corresponding image are saved as a data pair. All saved data pairs are labeled as data series, wherein the data series includes X data series and Y data series. The X data series refers to the series of data of the first average coordinate difference on the x-axis and the capture time, and the Y data series refers to the series of data of the first average coordinate difference on the y-axis and the capture time.
[0075] The first average coordinate difference of the images and the shooting time are determined as a set of data. Based on a series of images, a series of data on the first average coordinate difference of the x-axis and the shooting time are obtained, as shown in Table 1. Table 1 provides example data on the series of data on the first average coordinate difference of the x-axis and the shooting time. This represents the first average coordinate difference of the first vertex.
[0076] Table 1: Example Data on the First Average Coordinate Difference of the x-axis and Shooting Time
[0077]
[0078] A linear regression equation was obtained by fitting the first average x-axis coordinate difference with the shooting time series data:
[0079]
[0080] Where a1 and b1 represent constants, T represents the first average coordinate value. v1 Indicates the shooting time, where,
[0081] The first average coordinate difference of the image and the shooting time are determined as a set of data. Based on the series of images, the series of data of the first average coordinate difference of the y-axis and the shooting time are obtained, as shown in Table 2. Table 2 is an example of the series of data of the first average coordinate difference of the y-axis and the shooting time.
[0082] Table 2: Example Data on the First Average Coordinate Difference of the Y-Axis and Shooting Time
[0083]
[0084]
[0085] A linear regression equation was obtained by fitting the first average y-axis coordinate difference with the shooting time series data:
[0086]
[0087] Where a2 and b2 represent constants, T represents the first average coordinate value. v2 Indicates the time of shooting.
[0088] in,
[0089] Step S1032: Differentiate the linear regression equation for vertices belonging to the same square to obtain the square verification coefficient, and determine the target square based on the square verification coefficient.
[0090] Specifically, four vertices belonging to the same square are defined as a vertex group;
[0091] The derivative of the linear regression equation based on the vertex group is determined as the square verification coefficient.
[0092] Sort the square check coefficients of each vertex group in ascending order, and determine the vertex group with the highest square check coefficient as the target square.
[0093] This embodiment requires obtaining the linear regression equations of the four vertices of each square about the x-axis and y-axis. Then, the derivative of the linear regression equations of the vertices belonging to the same square is calculated to obtain the verification coefficients for each square. For example, square 1 corresponds to vertex group 1, including vertices 1, 2, 3, and 4; square 2 corresponds to vertex group 2, including vertices 5, 6, 7, and 8; square 3 corresponds to vertex group 3, including vertices 9, 10, 11, and 12; and square 4 corresponds to vertex group 4, including vertices 13, 14, 15, and 16. Therefore, the derivative of the linear regression equations of the four vertices of vertex group 1 is calculated to obtain the verification coefficients S1.
[0094]
[0095] Differentiating the linear regression equation for the four vertices of vertex group 2 yields the verification coefficient S2:
[0096]
[0097] Differentiating the linear regression equation for the four vertices of vertex group 3 yields the verification coefficient S3:
[0098]
[0099] Differentiating the linear regression equation for the four vertices of vertex group 4 yields the verification coefficient S4:
[0100]
[0101] Among them, x1, x2....x16 are the x-axis linear regression equations obtained above, and y1, y2....y16 are the y-axis linear regression equations obtained above.
[0102] After determining the check coefficients of each square, sort the check coefficients in ascending order. The check coefficient of the square with the highest check coefficient is determined as the target square check coefficient, and the square corresponding to the target square check coefficient is determined as the target square. A smaller check coefficient indicates a more stable square.
[0103] Step S104: Determine the deformation result of the monitored building based on the second average coordinate difference of the target square.
[0104] The second average coordinate difference of the target square is compared with a preset value;
[0105] If the second average coordinate difference is greater than the first preset value, the monitoring result will be output as deformation; where the first preset value can be 0. If either the x-axis difference or the y-axis difference is greater than 0, it indicates that the monitored building has deformed.
[0106] If the difference is less than a first preset value and greater than a second preset value, the monitoring result will be output as pending; the second preset value is close to 0, for example, it could be -0.012. If either the x-axis difference or the y-axis difference is less than the first preset value and greater than the second preset value, it indicates that the monitored building may have deformed, but further monitoring is needed to obtain the final result.
[0107] If the difference is equal to the first preset value or less than the second preset value, the monitoring result will be output as "no deformation". If both the x-axis difference and the y-axis difference are equal to the first preset value or less than the second preset value, it indicates that the monitored building has not deformed.
[0108] This embodiment acquires a series of images of a square marker fixed to the monitored building using the above-described scheme. The images are then identified to obtain the vertices of the square and their planar coordinates. The coordinate differences between the vertex planar coordinates and the original coordinates, a first average coordinate difference, and a second average coordinate difference are calculated. A linear regression equation is determined between the first average coordinate difference and the image capture time, and the target square is identified based on this linear regression equation. The deformation result of the monitored building is then determined based on the second average coordinate difference of the target square. Thus, by determining the target square based on the fitted equation of the planar coordinates of the square marker's vertices and determining the deformation result based on the coordinate difference of the target square, real-time monitoring of building deformation is achieved, improving the accuracy of building deformation monitoring.
[0109] In addition, this application also provides a building deformation monitoring device based on machine vision, referring to... Figure 5 The machine vision-based building deformation monitoring device includes:
[0110] The coordinate acquisition module 10 is used to acquire a series of images of a square marker fixed on the monitored building, and to identify the series of images to obtain the vertices of the square and the planar coordinates of the vertices;
[0111] The difference calculation module 20 is used to calculate the coordinate difference between the vertex plane coordinates and the original coordinates, the first average coordinate difference, and the second average coordinate difference;
[0112] The linear fitting module 30 is used to determine the linear regression equation between the first average coordinate difference and the image capture time, and to determine the target square based on the linear regression equation.
[0113] The determination module 40 is used to determine the deformation result of the monitored building based on the second average coordinate difference of the target square.
[0114] Furthermore, the coordinate acquisition module 10 includes:
[0115] The marking unit is used to capture images of the square markers using an industrial camera, obtaining a series of images of the square markers captured at different times. The square markers are fixedly installed on the monitored building, and the positions of the industrial camera, the monitored building, and the square markers are relatively fixed.
[0116] The coordinate acquisition unit is used to identify several squares from the series of images of the square markers, extract all vertices of the several squares, and obtain the planar coordinates of the vertices.
[0117] Furthermore, the difference calculation module 20 includes:
[0118] The first calculation unit is used to calculate the coordinate difference between the planar coordinates and the original coordinates of the vertex, wherein the original coordinates of the vertex are the initial coordinates of each vertex of the square marker, and the planar coordinates and the original coordinates have the same coordinate system origin;
[0119] The second calculation unit is used to calculate the first average coordinate difference based on the coordinate difference and the number of vertices.
[0120] Furthermore, the linear fitting module 30 includes:
[0121] The fitting unit is used to determine a linear regression equation between the first average coordinate difference and the shooting time based on a data series of the first average coordinate difference and the shooting time.
[0122] The differentiation unit is used to differentiate the linear regression equation of vertices belonging to the same square to obtain the square verification coefficient, and to determine the target square based on the square verification coefficient.
[0123] Furthermore, the fitting unit includes:
[0124] The reading unit is used to read the shooting time of a series of images and save the first average coordinate difference and the shooting time of the corresponding image as a data pair.
[0125] A storage unit is used to mark all stored data pairs as data series, wherein the data series includes an X data series and a Y data series.
[0126] Furthermore, the differentiation unit includes:
[0127] A vertex group determination unit is used to determine four vertices belonging to the same square as a vertex group;
[0128] The coefficient determination unit is used to perform differentiation based on the linear regression equation of the vertex group and determine the differentiation result as the square verification coefficient.
[0129] The sorting unit is used to sort the square check coefficients of each vertex group in ascending order, and the vertex group with the first square check coefficient is determined as the target square.
[0130] Furthermore, the determining module 40 includes:
[0131] The comparison unit is used to compare the second average coordinate difference of the target square with a preset value;
[0132] The first result output unit is used to output the monitoring result as a deformation if the difference is greater than a first preset value;
[0133] The second result output unit is used to output the monitoring result as pending if the difference is less than the first preset value and greater than the second preset value.
[0134] The third result output unit is used to output the monitoring result as undeformed if the difference is equal to the first preset value or less than the second preset value.
[0135] Reference Figure 6 This application also provides a machine vision-based building deformation monitoring device, the internal structure of which can be as follows: Figure 6 As shown, the machine vision-based building deformation monitoring device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory of the machine vision-based building deformation monitoring device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the machine vision-based building deformation monitoring device is used for the target recognition program of the machine vision-based building deformation monitoring device. The network interface of the machine vision-based building deformation monitoring device is used for communication with external terminals via network connection. The input device of the machine vision-based building deformation monitoring device is used to receive signals input from external devices. When the computer program is executed by the processor, it implements a machine vision-based building deformation monitoring method as described in the above embodiment.
[0136] Those skilled in the art will understand that Figure 6The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the machine vision-based building deformation monitoring equipment to which the present application is applied.
[0137] Furthermore, this application also proposes a computer-readable storage medium comprising a machine vision-based building deformation monitoring program. When executed by a processor, the machine vision-based building deformation monitoring program implements the steps of the machine vision-based building deformation monitoring method as described in the above embodiments. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0138] In summary, the machine vision-based building deformation monitoring method, apparatus, device, and computer-readable storage medium provided in this application embodiment include: acquiring a series of images of a square marker fixed on the building to be monitored, and identifying the series of images to obtain the vertices of the square and the planar coordinates of the vertices; calculating the coordinate difference between the planar coordinates of the vertices and the original coordinates, a first average coordinate difference, and a second average coordinate difference; determining a linear regression equation between the first average coordinate difference and the image capture time, and determining a target square based on the linear regression equation; and determining the deformation result of the building to be monitored based on the second average coordinate difference of the target square. Thus, by determining the target square based on the fitted equation of the planar coordinates of the square marker vertices, and determining the deformation result based on the coordinate difference of the target square, real-time monitoring of building deformation is achieved, improving the accuracy of building deformation monitoring.
[0139] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media provided in this application and in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0140] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0141] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for monitoring building deformation based on machine vision, characterized in that, include: A series of images of square markers fixed on the monitored building are acquired, and the series of images are identified to obtain the vertices of the squares and the planar coordinates of the vertices. The square markers are several nested squares with successively decreasing side lengths within the outermost frame, with the centers of all squares coinciding and each square having its own vertex. Calculate the coordinate difference between the vertex's planar coordinates and its original coordinates, the first average coordinate difference, and the second average coordinate difference. The first average coordinate difference of a vertex's x-axis is the average of the differences between the vertex's planar x-axis coordinates and its original x-axis coordinates across multiple images taken between two adjacent shooting times. The first average coordinate difference of the x-axis between adjacent shooting times T1 and T2 for the first vertex is a data pair with the shooting time. The other data pairs are similar. The first average difference of the y-axis coordinates is similar. The first average difference of the x-axis coordinates and all data pairs with the shooting time are denoted as the X data series. The first average difference of the y-axis coordinates and all data pairs with the shooting time are denoted as the Y data series. The second average difference of the x-axis coordinates is the average of the differences between the x-axis plane coordinates of all vertices in all images and the original x-axis coordinates. The second average difference of the y-axis coordinates is similar. A linear regression equation is determined between the first average coordinate difference and the image capture time, and the target square is determined based on the linear regression equation; the linear regression equation between the first average x-axis coordinate difference and the capture time is obtained by fitting the X data series as follows: ,in, , Represents a constant. This represents the first average coordinate value on the x-axis. This represents the shooting time; based on the Y-data series, the linear regression equation obtained between the first average y-axis coordinate difference and the shooting time is as follows: ,in, , Represents a constant. This represents the first average y-axis coordinate value. The shooting time is indicated; four vertices belonging to the same square are defined as a vertex group; the derivative of the linear regression equation based on the vertex group is calculated, and the derivative result is determined as the square verification coefficient; the square verification coefficients of each vertex group are sorted in ascending order, and the vertex group with the highest square verification coefficient is determined as the target square. The check coefficient S1 of vertex group 1 is: , Where x1, x2, x3, x4 are the above x-axis linear regression equations, y1, y2, y3, y4 are the above y-axis linear regression equations, and the calculation of the verification coefficients for other vertex groups is similar; The deformation result of the monitored building is determined based on the second average coordinate difference of the target square.
2. The machine vision-based building deformation monitoring method according to claim 1, characterized in that, The process of acquiring a series of images of a square marker fixed to the monitored building, and identifying the vertices of the square and their planar coordinates, includes: The square marker is photographed by an industrial camera to obtain a series of images of the square marker at different shooting times. The square marker is fixedly installed on the building being monitored, and the positions of the industrial camera, the building being monitored, and the square marker are relatively fixed. Several squares are identified from the series of images of the square markers, all vertices of the squares are extracted, and the planar coordinates of the vertices are obtained.
3. The machine vision-based building deformation monitoring method according to claim 1, characterized in that, The calculation of the coordinate difference between the vertex plane coordinates and the original coordinates, the first average coordinate difference, and the second average coordinate difference includes: Calculate the coordinate difference between the planar coordinates and the original coordinates of the vertex, where the original coordinates of the vertex are the initial coordinates of each vertex of the square marker, and the planar coordinates and the original coordinates have the same coordinate system origin; The second average coordinate difference is calculated based on the coordinate difference and the number of vertices.
4. The machine vision-based building deformation monitoring method according to claim 1, characterized in that, The determination of the deformation result of the monitored building based on the second average coordinate difference of the target square includes: The second average coordinate difference of the target square is compared with a preset value; If the difference is greater than the first preset value, the monitoring result will be output as deformation; If the difference is less than the first preset value and greater than the second preset value, the monitoring result will be output as pending. If the difference is equal to the first preset value or less than the second preset value, the monitoring result will be output as undeformed.
5. A machine vision-based building deformation monitoring device, used to implement the machine vision-based building deformation monitoring method according to any one of claims 1-4, characterized in that, include: The coordinate acquisition module is used to acquire a series of images of a square marker fixed on the monitored building, and to identify the vertices of the square and the planar coordinates of the vertices. The difference calculation module is used to calculate the coordinate difference between the vertex plane coordinates and the original coordinates, the first average coordinate difference, and the second average coordinate difference; A linear fitting module is used to determine the linear regression equation between the first average coordinate difference and the image capture time, and to determine the target square based on the linear regression equation. The determination module is used to determine the deformation result of the monitored building based on the second average coordinate difference of the target square.
6. A building deformation monitoring device based on machine vision, characterized in that, The machine vision-based building deformation monitoring device includes a memory, a processor, and a machine vision-based building deformation monitoring program stored in the memory and executable on the processor. When the machine vision-based building deformation monitoring program is executed by the processor, it implements the steps of the machine vision-based building deformation monitoring method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a machine vision-based building deformation monitoring program, which, when executed by a processor, implements the steps of the machine vision-based building deformation monitoring method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Building deformation monitoring method and device based on machine vision and storage medium
CN118115867A