CN117935064B - Building inclination early warning method and system based on image processing - Google Patents

Building inclination early warning method and system based on image processing Download PDF

Info

Publication number
CN117935064B
CN117935064B CN202410331796.2A CN202410331796A CN117935064B CN 117935064 B CN117935064 B CN 117935064B CN 202410331796 A CN202410331796 A CN 202410331796A CN 117935064 B CN117935064 B CN 117935064B
Authority
CN
China
Prior art keywords
building
line segment
inclination
characteristic curve
characteristic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410331796.2A
Other languages
Chinese (zh)
Other versions
CN117935064A (en
Inventor
王瑞杰
胡超雄
舒雷明
李文乔
艾启胜
谭睿
张胜利
刘宇翔
陈文德
陈晨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hubei Shenlong Geological Engineering Survey Institute Co ltd
Hubei Shenlong Engineering Testing Technology Co ltd
Original Assignee
Hubei Shenlong Geological Engineering Survey Institute Co ltd
Hubei Shenlong Engineering Testing Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hubei Shenlong Geological Engineering Survey Institute Co ltd, Hubei Shenlong Engineering Testing Technology Co ltd filed Critical Hubei Shenlong Geological Engineering Survey Institute Co ltd
Priority to CN202410331796.2A priority Critical patent/CN117935064B/en
Publication of CN117935064A publication Critical patent/CN117935064A/en
Application granted granted Critical
Publication of CN117935064B publication Critical patent/CN117935064B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention relates to the technical field of building monitoring, in particular to a building inclination early warning method and system based on image processing. The method comprises the following steps: obtaining a first characteristic curve according to a first side of a building edge in a building image, and obtaining a second characteristic curve on a second side; correspondingly obtaining a first characteristic line segment and a second characteristic line segment according to the first characteristic curve and the second characteristic curve; calculating a first included angle between each first characteristic line segment and the plumb line and a second included angle between each second characteristic line segment and the plumb line; calculating a correction angle according to the conditions; calculating a first inclination of the building; correcting the first inclination through the target correction angle to obtain a second inclination; and responding to the second inclination being larger than the inclination threshold value, and alarming. According to the invention, the inclination of the building is obtained through the building image, and the inclination of the building is corrected through the contour of the building, so that the inclination of the building is more in line with the actual safety degree of the building.

Description

Building inclination early warning method and system based on image processing
Technical Field
The present invention relates generally to the field of building monitoring technology. More particularly, the invention relates to a building inclination early warning method and system based on image processing.
Background
In the construction stage of the building, reasonable building schemes can be made by carrying out multiple times of calculation and simulation on various parameters of the building, and each link of the building is strictly monitored and detected in the construction process, so that the safety and stability of the building are ensured. However, as time passes, geological conditions, environmental factors, etc. may also affect the building, resulting in a gradual increase in the inclination of the building. For high-rise buildings, the change of the inclination of the high-rise buildings can cause serious threats to lives and properties of people, so that the inclination detection of the buildings is particularly important. By means of inclination detection means, the inclination condition of the building can be found in time, and corresponding adjustment and reinforcement can be carried out, so that the safety and stability of the building are ensured.
The existing method for carrying out safety precaution through the inclination of the building (whole) comprises the following steps: the tangent value of the angle between the straight line passing through the top end and the ground end of the building and the plumb line of the horizontal line is calculated, and compared with the inclination threshold value, when the tangent value is larger, remedial measures are taken for the building. But the process of using equipment such as total powerstation to measure the inclination of building is comparatively complicated, and measuring time is longer, and the standard requirement on the light environment is higher when measuring. Furthermore, over time, the overall structure may exhibit slight bending (e.g., concave on one side and convex on the other side of the structure from the appearance), thereby changing the center of gravity of the structure, and the calculated inclination of the structure may not be representative of the degree of safety of the structure.
Disclosure of Invention
In order to solve the problem that the whole building is slightly bent so that the inclination of the building cannot reflect the inclination degree of the building, the invention provides a building inclination early warning method and a system based on image processing. To this end, the present invention provides solutions in various aspects as follows.
In a first aspect, an image processing-based building inclination warning method includes: obtaining a first characteristic curve according to a first side of a building edge in a building image, and obtaining a second characteristic curve on a second side, wherein the first side and the second side are two sides of the building with opposite directions; a first characteristic line segment and a second characteristic line segment are correspondingly obtained according to the first characteristic curve and the second characteristic curve, wherein the first characteristic line segment and the second characteristic line segment comprise at least one straight line segment; calculating a first included angle theta 1、θ2、…、θi、…、θn between each straight line segment of each first characteristic line segment and the plumb line, and a second included angle between each straight line segment of each second characteristic line segment and the plumb line、/>、…、/>、…、/>Wherein the ith angle value in the first included angle satisfies that theta i is less than or equal to pi/2, and the ith angle value in the second included angle satisfies/>; Calculating a first correction angle theta according to the first included angle and the length of the corresponding straight line segment, and calculating a second correction angle/>, according to the second included angle and the length of the corresponding straight line segment; Judging the convexity of the first side and the second side, and according to the convexity of the first side and the second side of the building, the first correction angle theta and the second correction angle/>Calculating a target correction angle theta T; calculating a first inclination A of the building according to the two ends of the first characteristic curve, the two ends of the second characteristic curve, the plumb line and the horizontal line; correcting the first inclination A through the target correction angle to obtain a second inclination/>:/>; And comparing the second inclination with an inclination threshold, and alarming in response to the second inclination being larger than the inclination threshold.
In one embodiment, obtaining a first characteristic from a first side of a building edge in the building image and obtaining a second characteristic from a second side includes: extracting a first feature point on a first side of a building in the building image, and extracting a second feature point on a second side of the building in the building image; fitting the first characteristic points to obtain the first characteristic curve; and fitting the second characteristic points to obtain the second characteristic curve.
In one embodiment, extracting the feature points includes: filtering and denoising the building image to obtain a filtered image; binarizing the filtered image to obtain a black-and-white image of the building; obtaining a contour line I of a building of a black-and-white image of the building, and removing unnecessary details or contours through morphological operation; dividing the contour line I into unit contour lines of all layers through a watershed algorithmSelecting the contour line/>, of each unitThe top end point of (a) is the first feature point or the second feature point.
In one embodiment, the obtaining the first feature line segment and the second feature line segment according to the first feature curve and the second feature curve includes: extracting a first target point with curvature larger than a curvature threshold value in a first characteristic curve, and sequentially connecting the first target points to obtain a first characteristic line segment; and extracting a second target point with curvature larger than a curvature threshold value in the second characteristic curve, and connecting the second target points in sequence to obtain a second characteristic line segment.
In one embodiment, a first correction angle is calculated according to the first included angle and the length of the corresponding straight line segmentAnd calculating a second correction angle/>, according to the second included angle and the length of the corresponding straight line segmentComprising the following steps: calculate the first correction angle/>,/>Wherein/>For the first correction factor,/>I-th length value of length of first line segment,/>For the kth length value of the first line segment length, θ i is the ith angle value of the first included angle, and θ k is the kth angle value of the first included angle; calculate the second correction angle/>:/>,/>Wherein/>For the second correction factor,/>I-th length value of length of second line segment,/>A kth length value of the second line segment length,/>Is the i-th angle value of the second included angle,/>Is the kth angle value of the second included angle.
In one embodiment, calculating the first inclination of the building from the two ends of the first characteristic, the two ends of the second characteristic, the plumb line, and the level line comprises: obtaining a first horizontal distance between the top end point and the bottom end point of the first characteristic curve in the horizontal line direction; obtaining a second horizontal distance between the top end point and the bottom end point of the second characteristic curve in the horizontal line direction; calculating the average value of the first horizontal distance and the second horizontal distance to obtain a target horizontal distance; calculating the height of the building in the plumb line direction of the building image; dividing the target horizontal distance by the height to obtain a first inclination.
In one embodiment, the convexity of the first side and the second side is determined, and the first correction angle is determined according to the convexity of the first side and the second side of the buildingAnd a second correction angle/>Calculating the target correction angle/>Comprising the following steps: drawing a segmentation line segment, wherein the segmentation line segment comprises a first segmentation line segment and a second segmentation line segment, the first segmentation line segment and the second segmentation line segment are perpendicular to the horizontal line, one end of the first segmentation line is connected with the top end point of a first characteristic curve, the other end of the first segmentation line is connected with the ground, the second segmentation line segment is connected with the top end point of a second characteristic curve through a second side, and the other end of the second segmentation line is connected with the ground; determining that one side corresponding to a dividing line is convex in response to the dividing line passing through more pixels of a building than pixels of a non-building, wherein the dividing line comprises the first dividing line and the second dividing line; determining that one side corresponding to the dividing line is concave in response to the dividing line passing through the pixel points of the building and being less than the pixel points of the non-building; in response to both the first side and the second side being convex, calculating a target correction angle θ T: /(I); In response to the first side and the second side being non-uniform convex or concave, calculating a target correction angle θ T: /(I)
In a second aspect, an image processing based building inclination warning system includes: a processor; a memory storing a computer program which, when executed by the processor, causes the apparatus to perform the image processing-based building inclination warning method according to any one of the above summary.
The beneficial effects of the invention are as follows:
The invention obtains the inclination of the building through the building image and corrects the inclination of the building through the outline of the building. The inclination of the building is calculated through the image processing of the building, so that the method is convenient to operate, simple in flow and short in calculation time. And moreover, the outline of the building is obtained through the building image, and then the inclination of the building is corrected according to the outline of the building, so that the corrected inclination is more in line with the actual inclination degree of the building.
Drawings
The above, as well as additional purposes, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description when read in conjunction with the accompanying drawings. In the drawings, embodiments of the invention are illustrated by way of example and not by way of limitation, and like reference numerals refer to similar or corresponding parts and in which:
FIG. 1 is a flow chart of a building inclination warning method based on image processing according to an embodiment of the invention;
FIG. 2 is a flow chart of step S1 according to an embodiment of the invention;
fig. 3 is a flowchart of step S101 according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of a contour line and a cell contour line according to an embodiment of the present invention;
FIG. 5 is a flow chart of step S2 according to an embodiment of the invention;
fig. 6 is a flowchart of step S5 according to an embodiment of the present invention;
fig. 7 is a flowchart of step S6 according to an embodiment of the present invention;
fig. 8 is a block diagram of a construction inclination warning system based on image processing in the present embodiment.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a construction inclination warning method based on image processing according to an embodiment of the present invention.
Step S1: a first characteristic is obtained from a first side of a building edge in the building image and a second characteristic is obtained from a second side.
Where the building image is a front view of either side of the building (typically a tall building), the first side is the left or right side of the building in the image, and the second side is the side facing opposite the first side. For example, a front view of a building facing south is obtained as a building image, and a first side is a building facing west, and a contour of a left side of the building is displayed on the building image, and a second side is a building facing east, and a contour of a right side of the building is displayed on the building image.
Furthermore, when acquiring edges of a building in a building image, edge information of the building needs to be extracted using an edge algorithm. But the lines of the extracted edge profile are not smooth due to the presence of details of balconies, railings, etc. To improve the accuracy of the calculation and to make the edge lines smoother, the edges may be output in a curved form. Noise and irregular edge segments are eliminated by outputting the edges as a curve, and then utilizing the smooth nature of the curve. This allows for better capture of the overall shape and structure of the building and reduces errors due to details. In some embodiments, discrete edge points may be connected into a smooth curve using curve fitting or curve interpolation techniques, or the like. The smoothness of the curve is controlled by adjusting the parameters, selecting an appropriate interpolation function or fitting algorithm.
Step S2: and correspondingly obtaining a first characteristic line segment and a second characteristic line segment according to the first characteristic curve and the second characteristic curve.
In particular, it is difficult for a characteristic curve (including a first characteristic curve and a second characteristic curve) for describing the characteristics of the inclination of a building to obtain a specific inclination, and thus the characteristic curve is converted into a characteristic line segment (including a first characteristic line segment and a second characteristic line segment) including a plurality of line segments.
Step S3: and calculating a first included angle between each straight line segment of each first characteristic line segment and the plumb line, and a second included angle between each straight line segment of each second characteristic line segment and the plumb line.
Wherein, first contained angle includes: θ 1、θ2、…、θi、…、θni is the ith angle value in the first contained angle, the second contained angle includes:、/>、…、/>、…、/> . The number of included angles in the first included angles is the same as the number of straight line segments in the first characteristic line segments; the number of included angles in the second included angle is the same as the number of straight line segments in the second characteristic line segment.
In one embodiment, the reference line for the plumb line is obtained by a camera and an electronic level. And calculating an included angle between the straight line where each line segment is positioned and the plumb line in the first characteristic line segment, wherein the included angle smaller than or equal to 90 degrees is the first included angle. And calculating an included angle between the straight line where each line segment is positioned and the plumb line in the second characteristic line segment, wherein the included angle smaller than or equal to 90 degrees is the second included angle. I.e. the i-th angle value theta i in the first angle satisfies: θ i is less than or equal to pi/2, and the ith angle value in the second included angleThe method meets the following conditions:
step S4: and calculating a first correction angle according to the first included angle and the length of the corresponding straight line segment, and calculating a second correction angle according to the second included angle and the length of the corresponding straight line segment.
Wherein, calculate first correction angle θ:,/> Wherein α i is a first correction coefficient, l i is an ith length value of the first line segment length, l k is a kth length value of the first line segment length, θ i is an ith angle value of the first included angle, and θ k is a kth angle value of the first included angle. Calculate the second correction angle/> :/>,/>Wherein/>For the second correction factor,/>I-th length value of length of second line segment,/>A kth length value of the second line segment length,/>Is the i-th angle value of the second included angle,/>Is the kth angle value of the second included angle. The first correction angle is not smaller than the minimum first included angle and is not larger than the maximum first included angle.
Step S5: and judging the convexity of the first side and the second side, and calculating a target correction angle according to the convexity of the first side and the second side of the building, the first correction angle and the second correction angle.
The influence of the first correction angle and the second correction angle on the gravity center deviation of the building is determined according to the concave-convex properties of the two sides of the building. When the deformation degree of the building is unchanged, compared with the deformation that both sides of the building are convex, the deformation that one side of the building is convex and the other side is concave enables the degree of the gravity center to deviate to be larger. Therefore, a method of calculating the target correction angle (by the first correction angle and the second correction angle) is determined according to the convexity of both sides of the building.
Particularly, when judging that both sides of the building are concave, if the building is artificially designed to be concave on both sides in order to increase the demands of functionality, aesthetic property and the like of the building, the building materials are possibly damaged, and the detection, repair and the like of the building are required.
Step S6: and calculating a first inclination of the building according to the two ends of the first characteristic curve, the two ends of the second characteristic curve, the plumb line and the horizontal line.
Calculating an included angle between connecting lines at two ends of the first characteristic curve and a plumb line, and calculating a first absolute value of a sine value of the included angle; and calculating an included angle between connecting lines at two ends of the second characteristic curve and the plumb line, and calculating a second absolute value of a sine value of the included angle. And calculating the average value of the first absolute value and the second absolute value to obtain a first gradient.
Step S7: and correcting the first inclination by the target correction angle to obtain a second inclination.
Wherein the first inclination A is corrected to obtain the second inclinationThe formula of (2) is:
wherein θ T is the target correction angle.
In particular, unless there are artificial factors or extreme cases (extreme weather, etc.), when the building is inclined due to settlement, the direction in which the center of gravity of the building is shifted is the same as the direction in which the building is shifted due to deformation, and the influence of both on the center of gravity shift is mutually promoted. Therefore, when the inclination is updated using the correction angle, the inclination after the update is always larger than the inclination before the update. Wherein, the value range of tan theta T is usually 0.01 to 0.02.
Step S8: and comparing the second inclination with an inclination threshold, and alarming in response to the second inclination being larger than the inclination threshold.
And when the second inclination is smaller than the inclination threshold value, alarm processing is not performed. The allowable value of the building inclination (inclination threshold) is 0.002.
Further, after the inclination alarm is performed, an emergency plan is required to be made according to the structure of the building and the inclination degree, including stability assessment of the building, emergency repair measures and the like. And timely report the inclination alarm condition to the relevant departments, authorities or professionals.
In summary, after preprocessing the building image and drawing the plumb line on the building image, the inclination (first inclination) of the building can be calculated through the ground end and the top end of the building, but because the building (especially a tall building) can deform, the gravity center of the building shifts, and the inclination of the building is measured at this time, and the danger of the building cannot be accurately reflected, so the inclination of the building is corrected by comprehensively considering the shape of the outlines on two sides of the building in the building image and the concave-convex properties on two sides of the building, the inclination after correction is compared with the inclination threshold value of the building, and early warning is performed according to the comparison result. On the basis of settlement of the building, deformation and deformation directions of the building are synthesized to early warn the inclination of the building.
Fig. 2 is a flow chart of step S1 according to an embodiment of the invention.
As shown in fig. 2, step S1 includes steps S101 to S103.
Step S101: first feature points are extracted on a first side of a building in the building image and second feature points are extracted on a second side of the building in the building image.
In particular, the first feature point or the second feature point represents a main edge line of the building. The choice of feature points is therefore required to be representative points that can represent building contours, forms and structures, such as layer-to-layer junctions.
Step S102: fitting the first characteristic points to obtain a first characteristic curve.
Step S103: and fitting the second characteristic points to obtain a second characteristic curve.
The fitting method of the first characteristic points and the second characteristic points is the same, so that errors generated by subsequent calculation are avoided to be larger due to different algorithms of the first characteristic points and the second characteristic points.
In particular, in order to better capture the overall shape and structure of the building and provide more intuitive edge information, the first feature points or the second feature points are correspondingly fitted into the first feature curve or the second feature curve. In another embodiment, the characteristics and structural information of the building can be further extracted by fitting the generated curve, analyzing and processing the curve, for example, calculating the curvature, tangential direction and other information of the curve.
In one embodiment, the feature points (which may be first feature points or second feature points) are fitted by a polynomial. The method comprises the following specific steps: expressing the feature points in the form of coordinates, wherein the coordinates of the ith point in the feature points are (x i,yi); constructing a polynomial equation: y=a 0+a1x+a2x2, where a 0、a1 and a 2 are coefficients to be fitted; the coefficients a 0、a1 and a 2 are solved by using a least square method, the residual error between the characteristic curve (corresponding to the first characteristic curve or the second characteristic curve) and the characteristic point obtained by fitting is minimized, and an equation of the characteristic curve is obtained.
In another embodiment, the feature points are fitted by a cubic spline difference algorithm: and calculating the difference between two adjacent feature points, including the difference between the distance between the feature points and the function value. And calculating the coefficient of the interpolation function between each cell according to the difference value between the nodes. And constructing the whole interpolation function by using the obtained coefficients, and estimating unknown data among the feature points through function calculation.
Fig. 3 is a flowchart of step S101 according to an embodiment of the present invention.
As shown in fig. 3, step S101 includes steps S1011 to S1014.
Step S1011: and filtering and denoising the building image to obtain a filtered image.
In particular, high-frequency noise may exist in a building image due to electronic interference at the time of image acquisition, sensor noise, distortion of signal transmission, or the like, so that image sharpness is reduced. High frequency noise is embodied as fine ripples, grainy noise spots, or noise spots in the image. Or the non-uniform response of the image acquisition equipment, lens distortion or unstable ambient lighting condition, etc., the building image may generate low-frequency noise, which is represented by uneven gray level variation, block noise or uneven brightness in the image, and affects the contrast and detail of the image
Step S1012: and performing binarization processing on the filtered image to obtain a black-and-white building image.
The binarization process converts an image into an image of only two pixels, typically black and white. In this embodiment, the steps for obtaining the black-and-white image of the building are: converting the filtered image into a gray scale image; selecting different thresholds for gray values of local pixels by a self-adaptive threshold segmentation algorithm on the gray image; and converting pixel values in the gray image into black or white according to the threshold value, wherein the pixel values larger than or equal to the threshold value are set to be white, and the pixel values smaller than the threshold value are set to be black.
Step S1013: the outline I of the building of the black-and-white image of the building is obtained and unwanted details or contours are removed by morphological operations.
In one embodiment, the contour line I of the building is obtained using a Canny edge detection algorithm or other edge detection algorithm. The contour line I is then smoothed and noise removed by morphological operations such as erosion, dilation, open and closed operations, etc. After morphological operations, some unwanted contours or small areas may be left, thus noise or small areas are eliminated by techniques such as connected component analysis to obtain the final building contour I.
Step S1014: dividing the contour line into unit contour lines of each layer through watershed algorithmSelecting each unit contour line/>The top end point of (a) is the first feature point or the second feature point.
Wherein the element profileThe top end point belonging to the first side of the building is the first feature point and the top end point belonging to the second side of the building is the second feature point. The number of first feature points or second feature points and the element contour line/>The number of (3) is the same. Cell contour line/>The number of layers is the same as that of the building.
Furthermore, watershed algorithms are a common image segmentation algorithm that can segment images into different regions or levels. In this step we apply watershed algorithm to the contour I of the building, dividing it into individual levels of element contours. Through segmented cell contour/>Information of various levels of the building can be acquired.
In other embodiments, the cell outlines are selectedThe endpoint below the first side of the building is used as a first characteristic point, and each unit contour line/>, is selectedThe end point below the second side of the building is the second feature point.
In particular, as shown in FIG. 4, each cell is contouredThe endpoints (upper and lower) of (a) are two different cell contours/>The junction between the two layers is embodied as the junction between the layers on the building, so that the point can better embody the integral posture of the building.
Fig. 5 is a flowchart of step S2 according to an embodiment of the present invention.
As shown in fig. 5, step S2 includes steps S201 to S203.
Step S201: and extracting a first target point with curvature larger than a curvature threshold value in the first characteristic curve, and connecting the first target points in sequence to obtain a first characteristic line segment.
The first target points are sequentially connected from the top end point of the first characteristic curve from top to bottom, and each first target point is connected with two adjacent first target points. Or starting from the bottom end point of the first characteristic curve, the first target points are sequentially connected in a sequence from bottom to top. The first characteristic line segment comprises a plurality of line segments, and the end points of each adjacent line segment are connected at one position.
Step S202: and extracting a second target point with curvature larger than a curvature threshold value in the second characteristic curve, and connecting the second target points in sequence to obtain a second characteristic line segment.
The second target points are sequentially connected from the top end point of the second characteristic curve from top to bottom, and each second target point is connected with two adjacent second target points. Or starting from the bottom end point of the second characteristic curve, the second target points are sequentially connected in a sequence from bottom to top. The second characteristic line segment comprises a plurality of line segments, and the end points of each adjacent line segment are connected at one position.
And calculating the overall curvatures of the first characteristic curve and the second characteristic curve respectively, and taking the average value of the overall curvatures of the first characteristic curve and the second characteristic curve as a curvature threshold value. Or the number of the first target point and the second target point is controlled (reduced) by setting the curvature threshold to 1.1 times, 1.2 times, 1.3 times, 1.4 times, or the like of the average value of the overall curvature of the first characteristic curve and the second characteristic curve, so as to facilitate the subsequent calculation. The number of first target points or second target points is usually limited to 5 to 10.
Fig. 6 is a flowchart of step S5 according to an embodiment of the present invention.
As shown in fig. 6, step S5 includes steps S501 to S505.
Step S501: a first horizontal distance between the top end point and the bottom end point of the first characteristic curve in the horizontal line direction is obtained.
Step S502: and obtaining a second horizontal distance between the top end point and the bottom end point of the second characteristic curve in the horizontal line direction.
In one embodiment, a top end point and a bottom end point of the first characteristic curve are identified, the top end point and the bottom end point of the first characteristic curve are placed in a coordinate system, a transverse axis of the coordinate system is parallel to a horizontal line, and a distance between the top end point and the bottom end point of the first characteristic curve on the transverse axis is calculated to obtain a first horizontal distance. And placing the top end point and the bottom end point of the second characteristic curve into the coordinate system, and calculating the distance between the top end point and the bottom end point of the second characteristic curve on the transverse axis to obtain a second horizontal distance.
Step S503: and calculating the average value of the first horizontal distance and the second horizontal distance to obtain a target horizontal distance.
Step S504: the height of the building in the plumb line direction of the building image is calculated.
In one embodiment, the portions of the building in the building image are obtained by making straight lines parallel to the plumb lines through the top end points of the two sides of the building, respectively, and making parallel lines of H plumb lines at equal intervals between the two straight lines. The average length of the line segment overlapping the building portion among the H parallel lines, which is the height of the building, is calculated.
Further, the height of the building and the target average horizontal distance are normalized, so that the height and the target average horizontal distance are unified into a unit standard.
Step S505: dividing the target horizontal distance by the height to obtain a first inclination.
The building inclination is the tangent value of the included angle (the included angle is an acute angle) between the straight line where the upper end point and the lower end point of the building are located and the plumb line. The value of the first inclination is equal to the average value obtained by dividing the first horizontal distance and the second horizontal distance by the height respectively, namely, the first inclination is equal to the average value of the inclinations of the two sides of the building.
Fig. 7 is a flowchart of step S6 according to an embodiment of the present invention.
As shown in fig. 7, step S6 includes steps S601 to S605.
Step S601: and drawing a segmentation line segment, wherein the segmentation line segment comprises a first segmentation line segment and a second segmentation line segment.
The first dividing line segment and the second dividing line segment are perpendicular to the horizontal line, the first dividing line segment passes through a first characteristic curve of the first side, and the second dividing line segment passes through a second characteristic curve of the second side.
Step S602: and determining that one side corresponding to the dividing line is convex in response to the dividing line segment passing through more pixels of the building than pixels of the non-building.
Step S603: and determining that one side corresponding to the dividing line is concave in response to the dividing line passing through the pixel points of the building less than the pixel points of the non-building.
In particular, when a side of a building is convex, the contour line of the side is deviated to the outside of the building from the parting line parallel to the plumb line, but since the degree of deformation of the building is not large, it is difficult to intuitively judge the unevenness of the side of the building. Therefore, a dividing line segment parallel to the plumb line is drawn, two ends of the dividing line segment are respectively positioned at the top end of one side of the building and the ground, pixels passing through the dividing line segment in the image are counted, and when the proportion of pixels belonging to the building in all the pixels exceeds half, the side of the building is determined to be convex. When a side of the building is concave, the contour line of the side is deviated from the dividing line parallel to the plumb line to the interior of the building, and the pixels belonging to the building are relatively large among the pixels through which the dividing line is drawn.
In another embodiment, the first curve equation is calculated for the first characteristic curve, resulting in a first curve equation, and the second curve equation is calculated for the second characteristic curve, resulting in a second curve equation. And calculating second derivatives of the first curve equation and the second curve equation, and judging the convexity and convexity of the curve according to the positive and negative of the second derivatives.
Step S604: in response to both the first side and the second side being convex, calculating a target correction angle θ T:
The larger the correction angle, the larger the actual offset of the building center of gravity. When both sides of the building are convex, deformation of the building surface generally has less effect on the center of gravity offset, and the center of gravity of the entire building is relatively stable. Therefore, under the influence of deformation, the center of gravity of the building has slight deviation in a certain range, but the convexities on two sides of the building cancel each other, so that the center of gravity deviation is relatively small. Under the condition, the overall form of the building is relatively stable, and the influence of gravity center change caused by deformation on the building structure is small.
Step S605: in response to the first side and the second side being non-uniform convex or concave, calculating a target correction angle θ T:
since the building is convex on one side and concave on the other side, the deformation of the building surface generally has a greater impact on the amount of misalignment of the center of gravity. Thus, under the influence of deformation, there is a relatively large shift in the center of gravity of the building over a range. The two sides of the building are convex, so that the concave-convex properties of the two sides of the building are mutually promoted, and the gravity center offset of the building is larger.
Fig. 8 is a block diagram schematically showing the construction of the image processing-based inclination warning system in the present embodiment.
The invention also provides a building inclination early warning system based on image processing. As shown in fig. 8, the system includes a processor and a memory storing computer program instructions that when executed by the processor implement a building inclination warning system method according to the first aspect of the invention.
The system further comprises other components known to those skilled in the art, such as a communication bus and a communication interface, the arrangement and function of which are known in the art and are therefore not described in detail herein.
In the context of this patent, the foregoing memory may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, the computer-readable storage medium may be any suitable magnetic or magneto-optical storage medium, such as, for example, resistance change Memory RRAM (Resistive Random Access Memory), dynamic Random Access Memory DRAM (Dynamic Random Access Memory), static Random Access Memory SRAM (Static Random-Access Memory), enhanced dynamic Random Access Memory EDRAM (ENHANCED DYNAMIC Random Access Memory), high-Bandwidth Memory HBM (High-Bandwidth Memory), hybrid storage cube HMC (Hybrid Memory Cube), or the like, or any other medium that may be used to store the desired information and that may be accessed by an application, a module, or both. Any such computer storage media may be part of, or accessible by, or connectable to, the device. Any of the applications or modules described herein may be implemented using computer-readable/executable instructions that may be stored or otherwise maintained by such computer-readable media.
In the description of the present specification, the meaning of "a plurality", "a number" or "a plurality" is at least two, for example, two, three or more, etc., unless explicitly defined otherwise.
While various embodiments of the present invention have been shown and described herein, it will be obvious to those skilled in the art that such embodiments are provided by way of example only. Many modifications, changes, and substitutions will now occur to those skilled in the art without departing from the spirit and scope of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.

Claims (8)

1. The building inclination early warning method based on image processing is characterized by comprising the following steps of:
Obtaining a first characteristic curve according to a first side of a building edge in a building image, and obtaining a second characteristic curve on a second side, wherein the first side and the second side are two sides of the building with opposite directions;
a first characteristic line segment and a second characteristic line segment are correspondingly obtained according to the first characteristic curve and the second characteristic curve, wherein the first characteristic line segment and the second characteristic line segment comprise at least one straight line segment;
Calculating a first included angle theta 1、θ2、…、θi、…、θn between each straight line segment of each first characteristic line segment and the plumb line, and a second included angle between each straight line segment of each second characteristic line segment and the plumb line 、/>、…、/>、…、/>Wherein the ith angle value in the first included angle satisfies that theta i is less than or equal to pi/2, and the ith angle value in the second included angle satisfies/>
Calculating a first correction angle theta according to the first included angle and the length of the corresponding straight line segment, and calculating a second correction angle according to the second included angle and the length of the corresponding straight line segment
Judging the convexity of the first side and the second side, and according to the convexity of the first side and the second side of the building, the first correction angle theta and the second correction angleCalculating a target correction angle theta T;
calculating a first inclination A of the building according to the two ends of the first characteristic curve, the two ends of the second characteristic curve, the plumb line and the horizontal line;
correcting the first inclination A through the target correction angle to obtain a second inclination :/>
And comparing the second inclination with an inclination threshold, and alarming in response to the second inclination being larger than the inclination threshold.
2. The image processing-based building inclination warning method of claim 1 wherein obtaining a first characteristic curve from a first side of a building edge in the building image and obtaining a second characteristic curve from a second side comprises:
Extracting a first feature point on a first side of a building in the building image, and extracting a second feature point on a second side of the building in the building image;
Fitting the first characteristic points to obtain the first characteristic curve;
and fitting the second characteristic points to obtain the second characteristic curve.
3. The image processing-based building inclination warning method according to claim 2, wherein extracting feature points comprises:
filtering and denoising the building image to obtain a filtered image;
Binarizing the filtered image to obtain a black-and-white image of the building;
Obtaining a contour line I of a building of a black-and-white image of the building, and removing unnecessary details or contours through morphological operation;
dividing the contour line I into unit contour lines of all layers through a watershed algorithm Selecting the contour lines of the unitsThe top end point of (a) is the first feature point or the second feature point.
4. The method for pre-warning of building inclination based on image processing according to claim 1, wherein the corresponding obtaining of the first characteristic line segment and the second characteristic line segment according to the first characteristic curve and the second characteristic curve comprises:
Extracting a first target point with curvature larger than a curvature threshold value in a first characteristic curve, and sequentially connecting the first target points to obtain a first characteristic line segment;
and extracting a second target point with curvature larger than a curvature threshold value in the second characteristic curve, and connecting the second target points in sequence to obtain a second characteristic line segment.
5. The image processing-based building inclination early warning method according to claim 1, wherein the first correction angle is calculated according to the first included angle and the length of the corresponding straight line segmentAnd calculating a second correction angle/>, according to the second included angle and the length of the corresponding straight line segmentComprising the following steps:
Calculating a first correction angle :/>,/>Wherein/>For the first correction factor,/>I-th length value of length of first line segment,/>For the kth length value of the first line segment length, θ i is the ith angle value of the first included angle, and θ k is the kth angle value of the first included angle;
calculating a second correction angle :/>,/>Wherein/>For the second correction factor,/>I-th length value of length of second line segment,/>A kth length value of the second line segment length,/>Is the i-th angle value of the second included angle,/>Is the kth angle value of the second included angle.
6. The image processing-based building inclination warning method according to claim 1, wherein calculating a first inclination of a building from both ends of the first characteristic curve, both ends of the second characteristic curve, the plumb line, and the horizontal line comprises:
Obtaining a first horizontal distance between the top end point and the bottom end point of the first characteristic curve in the horizontal line direction;
obtaining a second horizontal distance between the top end point and the bottom end point of the second characteristic curve in the horizontal line direction;
Calculating the average value of the first horizontal distance and the second horizontal distance to obtain a target horizontal distance;
Calculating the height of the building in the plumb line direction of the building image;
Dividing the target horizontal distance by the height to obtain a first inclination.
7. The method for pre-warning of building inclination based on image processing according to claim 1, wherein the unevenness of the first side and the second side is determined, and the first correction angle is determined based on the unevenness of the first side and the second side of the buildingAnd a second correction angle/>Calculating the target correction angle/>Comprising the following steps:
Drawing a segmentation line segment, wherein the segmentation line segment comprises a first segmentation line segment and a second segmentation line segment, the first segmentation line segment and the second segmentation line segment are perpendicular to the horizontal line, one end of the first segmentation line is connected with the top end point of a first characteristic curve, the other end of the first segmentation line is connected with the ground, the second segmentation line segment is connected with the top end point of a second characteristic curve through a second side, and the other end of the second segmentation line is connected with the ground;
Determining that one side corresponding to a dividing line is convex in response to the dividing line passing through more pixels of a building than pixels of a non-building, wherein the dividing line comprises the first dividing line and the second dividing line;
Determining that one side corresponding to the dividing line is concave in response to the dividing line passing through the pixel points of the building and being less than the pixel points of the non-building;
in response to both the first side and the second side being convex, calculating a target correction angle θ T:
In response to the first side and the second side being non-uniform convex or concave, calculating a target correction angle θ T:
8. building slope early warning system based on image processing, its characterized in that includes:
A processor;
a memory storing a computer program which, when executed by the processor, causes an apparatus to perform the image processing-based building inclination warning method according to any one of claims 1 to 7.
CN202410331796.2A 2024-03-22 2024-03-22 Building inclination early warning method and system based on image processing Active CN117935064B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410331796.2A CN117935064B (en) 2024-03-22 2024-03-22 Building inclination early warning method and system based on image processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410331796.2A CN117935064B (en) 2024-03-22 2024-03-22 Building inclination early warning method and system based on image processing

Publications (2)

Publication Number Publication Date
CN117935064A CN117935064A (en) 2024-04-26
CN117935064B true CN117935064B (en) 2024-05-24

Family

ID=90757805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410331796.2A Active CN117935064B (en) 2024-03-22 2024-03-22 Building inclination early warning method and system based on image processing

Country Status (1)

Country Link
CN (1) CN117935064B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003106838A (en) * 2001-09-28 2003-04-09 Nikon Geotecs Co Ltd Surveying instrument, method for surveying and surveying program
CN102938066A (en) * 2012-12-07 2013-02-20 南京大学 Method for reconstructing outer outline polygon of building based on multivariate data
CN105095649A (en) * 2015-07-06 2015-11-25 通号通信信息集团有限公司 Method and system for analyzing data of building inclined angle
CN107917695A (en) * 2017-11-16 2018-04-17 南京工业大学 A kind of inclined building monitoring method based on image recognition technology
JP2019066196A (en) * 2017-09-28 2019-04-25 大和ハウス工業株式会社 Inclination measuring device and inclination measuring method
CN115063557A (en) * 2022-08-18 2022-09-16 北京山维科技股份有限公司 Building intelligent extraction method and device based on tilt model
CN115979223A (en) * 2023-02-10 2023-04-18 广州华智测绘科技有限公司 Construction project measuring method, system, medium and computer based on unmanned aerial vehicle
CN116883441A (en) * 2023-07-14 2023-10-13 南通大学 Point cloud building contour line extraction method capable of guaranteeing fitting precision

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003106838A (en) * 2001-09-28 2003-04-09 Nikon Geotecs Co Ltd Surveying instrument, method for surveying and surveying program
CN102938066A (en) * 2012-12-07 2013-02-20 南京大学 Method for reconstructing outer outline polygon of building based on multivariate data
CN105095649A (en) * 2015-07-06 2015-11-25 通号通信信息集团有限公司 Method and system for analyzing data of building inclined angle
JP2019066196A (en) * 2017-09-28 2019-04-25 大和ハウス工業株式会社 Inclination measuring device and inclination measuring method
CN107917695A (en) * 2017-11-16 2018-04-17 南京工业大学 A kind of inclined building monitoring method based on image recognition technology
CN115063557A (en) * 2022-08-18 2022-09-16 北京山维科技股份有限公司 Building intelligent extraction method and device based on tilt model
CN115979223A (en) * 2023-02-10 2023-04-18 广州华智测绘科技有限公司 Construction project measuring method, system, medium and computer based on unmanned aerial vehicle
CN116883441A (en) * 2023-07-14 2023-10-13 南通大学 Point cloud building contour line extraction method capable of guaranteeing fitting precision

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Automatic measurement system of dam perpendicular based on CCD;Lixin Zhang, et.al;《2nd International Conference on Consumer Electronics, Communications and Networks (CECNet)》;20120517;第1-4页 *
Real-time monitoring of changes inbuilding tilt angle using double square artificial marks;Gang Yang, et.al;《Indoor and built Environment》;20200324;第1-10页 *
基于机器视觉的房屋倾斜测量方法;赵广辉等;《建筑技术开发》;20221115;第49卷(第21期);第136-139页 *

Also Published As

Publication number Publication date
CN117935064A (en) 2024-04-26

Similar Documents

Publication Publication Date Title
US11598728B2 (en) Multi-sensor pipe inspection system and method
CN109685858B (en) Monocular camera online calibration method
CN114359841B (en) Video water level identification method based on space-time average
US20180033193A1 (en) Generating portable three-dimensional print-preview renderings of three-dimensional models
US20150235325A1 (en) Management of Tax Information Based on Topographical Information
CN110060342B (en) Three-dimensional curved surface fitting method
CN111369600B (en) Laser radar point cloud data registration method based on reference object
CN113223075A (en) Ship height measuring system and method based on binocular camera
CN114494378A (en) Multi-temporal remote sensing image automatic registration method based on improved SIFT algorithm
CN113971669A (en) Three-dimensional detection system applied to pipeline damage identification
CN113390485A (en) Novel reservoir water level measuring method
CN117935064B (en) Building inclination early warning method and system based on image processing
US8126275B2 (en) Interest point detection
CN114299242A (en) Method, device and equipment for processing images in high-precision map and storage medium
CN110991230B (en) Method and system for detecting ship by using remote sensing images in any direction based on rotation candidate frame
CN114972124B (en) Remote sensing image brightness self-adaptive equalization method and system
CN116299236A (en) InSAR atmospheric error correction method based on thinning PS point
CN115578695A (en) Water gauge water level machine vision detection method and device with free shooting visual angle
CN115861801A (en) Pointer instrument identification method and system, electronic equipment and readable storage medium
CN115326025A (en) Binocular image measuring and predicting method for sea waves
CN114387318A (en) Automatic remote sensing image registration method and device, electronic equipment and storage medium
CN113643374A (en) Multi-view camera calibration method, device, equipment and medium based on road characteristics
CN110751135A (en) Drawing checking method and device, electronic equipment and storage medium
CN113920141B (en) Rock integrity coefficient calculation method and device and storage medium
CN104599255B (en) FPC image surface curvature eliminating method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant