A device and method for detecting flatness of a building surface
By combining Hough transform and cluster analysis with the tilt of the building surface, uneven areas on the building surface are identified, solving the problems of high computational load and insufficient accuracy in small and simple planar detection, and realizing efficient and accurate flatness detection.
Patent Information
- Application Number
- CN202511308981.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-09-15
AI Technical Summary
Existing technologies require a large amount of computation and lack sufficient efficiency and accuracy when detecting the flatness of small, simple planes. Traditional methods cannot guarantee the accuracy and efficiency of the detection.
By acquiring raster images of the building surface, performing Hough transform, filtering valid Hough intersections, clustering the Hough intersection clusters, and combining the building surface tilt degree to set a probability threshold, uneven areas are identified and then confirmed.
It effectively reduces the amount of data analysis, improves detection efficiency, enhances computational efficiency and accuracy, adapts to simple planar rapid detection, and reduces errors.
Smart Images

Figure CN120823513B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of building construction, in particular to a flatness detection device and detection method for building surface. BACKGROUND
[0002] The flatness of the building surface is one of the important parameters to ensure the safety of the building structure. With the development of digital technology, the flatness of the building surface can be detected by digital technology, which can greatly improve the detection efficiency and accuracy of the flatness.
[0003] Modern detection technology includes laser scanner and structured light technical solutions. Most of the current solutions construct a three-dimensional point cloud model of the building surface, which requires a large number of coordinate transformations and has a large amount of calculation, and requires high performance of the computing device, which is not suitable for rapid flatness detection of small and simple planes. The traditional detection of small and simple planes by artificial level detection cannot guarantee the accuracy and efficiency of the detection. SUMMARY
[0004] In order to solve the above technical problems, the purpose of the present application is to provide a flatness detection device and detection method for building surface.
[0005] According to the first aspect of the embodiment of the present application, a flatness detection method for building surface is provided, and the technical solution is as follows:
[0006] Obtain a grid image of the building surface, and perform Hough transform on the grid image to obtain a Hough space image;
[0007] In the Hough space image, the number of Hough intersection points passing through the Hough curve in the horizontal and vertical angle neighborhood range is obtained, and the effective Hough intersection points representing the grid straight lines in the grid image are screened;
[0008] Analyze the number difference degree of the effective Hough intersection points passing through the Hough curve, cluster the effective Hough intersection points, and obtain a plurality of effective Hough intersection point clusters;
[0009] For each of the effective Hough intersection point clusters, analyze the coordinate distance of any two effective Hough intersection points to obtain the possibility that the region where the effective Hough intersection point cluster is located is an uneven region;
[0010] Set a possibility threshold, and obtain the uneven region of the building surface according to the possibility that the region where the effective Hough intersection point cluster is located is an uneven region.
[0011] In some embodiments of the present application, in the Hough space image, the number of Hough intersection points passing through the Hough curve in the horizontal and vertical angle neighborhood range is obtained, and the effective Hough intersection points representing the grid straight lines in the grid image are screened, including:
[0012] In the Hough space image, Hough intersection points in a horizontal and vertical angle neighborhood range and the number of Hough curves passing through each Hough intersection point are obtained;
[0013] The average number of Hough curves passing through all Hough intersection points in each angle neighborhood range is calculated to obtain a curve number threshold;
[0014] Hough intersection points passing through a number of Hough curves greater than the curve number threshold are screened to obtain effective Hough intersection points representing grid straight lines in the grid image.
[0015] In some embodiments of the present application,
[0016] The horizontal and vertical angles include 0 degrees, 90 degrees and -90 degrees; wherein:
[0017] The 0-degree neighborhood range is [-10°, 10°];
[0018] The 90-degree neighborhood range is [80°, 90°];
[0019] The -90-degree neighborhood range is [-90°, -80°].
[0020] In some embodiments of the present application, the number difference degree of the effective Hough intersection points passing through Hough curves is analyzed, the effective Hough intersection points are clustered, and a plurality of effective Hough intersection point clusters are obtained, including:
[0021] The maximum number of the effective Hough intersection points passing through Hough curves is obtained;
[0022] The difference between the number of the effective Hough intersection points passing through Hough curves and the maximum number is analyzed to obtain the number difference degree of the effective Hough intersection points passing through Hough curves;
[0023] The difference value of the number difference degree of any two effective Hough intersection points is calculated;
[0024] A preset difference threshold is set, the effective Hough intersection points are clustered according to the number difference degree difference value, and a plurality of effective Hough intersection point clusters are obtained.
[0025] In some embodiments of the present application, for each of the effective Hough intersection point clusters, the coordinate distance of any effective Hough intersection point is analyzed to obtain the possibility that the region where the effective Hough intersection point cluster is located is an uneven region, including:
[0026] For each of the effective Hough intersection point clusters, the coordinates of all the effective Hough intersection points are obtained, and the format of the coordinates is , wherein an angle between a normal of a grid line in the grid image corresponding to the effective Hough intersection and an x-axis, a distance between a grid line in the grid image corresponding to the effective Hough intersection and an origin point;
[0027] According to the coordinates of the effective Hough intersection, analyzing a difference between a coordinate of an arbitrary effective Hough intersection and a coordinate of a nearest effective Hough intersection, obtaining a possibility that the region where the cluster of effective Hough intersections is located is an uneven region.
[0028] In some embodiments of the present application, the method of setting the possibility threshold is:
[0029] According to the coordinates of the effective Hough intersection, analyzing a uniformity of intervals of parallel grid lines in the grid image, obtaining a tilt degree of the building surface.
[0030] Setting an initial possibility threshold;
[0031] Correcting the initial possibility threshold by the tilt degree of the building surface, obtaining the possibility threshold.
[0032] In some embodiments of the present application, according to the coordinates of the effective Hough intersection, analyzing a uniformity of intervals of parallel grid lines in the grid image, comprises:
[0033] In each angle neighborhood range, arranging all effective Hough intersections in the same angle neighborhood range in a size order, obtaining a coordinate sequence.
[0034] Based on the coordinate sequence, calculating a variance of the coordinate sequence, obtaining the uniformity of intervals of parallel grid lines in the grid image.
[0035] In some embodiments of the present application, obtaining the uneven region of the building surface, further comprises:
[0036] Confirming the uneven region again, obtaining an actual uneven region.
[0037] In some embodiments of the present application, obtaining the grid image of the building surface, comprises:
[0038] Shooting a building surface image by a grid laser and a camera;
[0039] Adjusting the building surface image according to a rotation angle of the grid laser, obtaining a corrected image;
[0040] Performing a denoising processing on the corrected image, obtaining an enhanced image;
[0041] Segmenting the enhanced image, obtaining the grid image.
[0042] According to a second aspect of the embodiments of the present application, a kind of flatness detection device of building surface is provided, comprising:
[0043] Image acquisition module, for obtaining the grid image of building surface, and the Hough transform is carried out to the grid image, and Hough space image is obtained;
[0044] Effective Hough intersection screening module, for obtaining the number of Hough intersection passing through Hough curve in horizontal and vertical angle neighborhood range in the Hough space image, screening effective Hough intersection representing grid straight line in the grid image;
[0045] Uneven possibility analysis module, for analyzing the number difference degree of Hough intersection passing through Hough curve, clustering the effective Hough intersection, obtaining a plurality of effective Hough intersection clusters;And for each effective Hough intersection cluster, the coordinate distance of any two effective Hough intersections is analyzed, and the possibility that the region where the effective Hough intersection cluster is located is uneven region is obtained;
[0046] Uneven region acquisition module, for setting possibility threshold, according to the possibility that the region where effective Hough intersection cluster is located is uneven region, the uneven region of building surface is obtained.
[0047] Compared with prior art, the flatness detection device and detection method of building surface provided by the present application have the following beneficial effects:
[0048] 1. The present application obtains the number of Hough intersection passing through Hough curve in horizontal and vertical angle neighborhood range in the Hough space image, screens effective Hough intersection representing grid straight line in the grid image, and subsequent analysis of effective Hough intersection can effectively reduce the volume of data analysis and improve analysis efficiency;
[0049] 2. According to the characteristics that uneven surface, such as protrusion, is usually a region, the number difference degree of Hough intersection passing through Hough curve is analyzed, the effective Hough intersection is clustered, a plurality of effective Hough intersection clusters are obtained;And for each effective Hough intersection cluster, the coordinate distance of any two effective Hough intersections is analyzed, and the possibility that the region where the effective Hough intersection cluster is located is uneven region is obtained;The present application preliminarily identifies the distribution region of suspected abnormal intersection by clustering analysis, so that calculation is simple, calculation efficiency is greatly improved, and the demand of simple plane rapid detection is met;
[0050] 3. In some embodiments of the present application, the possibility threshold is set according to the inclination of the building surface, and the possibility of the region where the effective Hough intersection cluster is located is combined to obtain the uneven region of the building surface. In consideration of the distribution region of the suspected abnormal intersection, the influence of the plane inclination is considered to improve the accuracy of the uneven region determination.
[0051] 4. In some embodiments of the present application, after obtaining the uneven region of the building surface, the uneven region is subjected to secondary confirmation to obtain the actual uneven region. Through secondary targeted calculation and confirmation, the errors and mistakes of the primary calculation are avoided, and the accuracy of the uneven region determination is further improved. BRIEF DESCRIPTION OF DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art and the advantages thereof, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0053] Figure 1 A basic flowchart of a building surface flatness detection method provided by an embodiment of the present application;
[0054] Figure 2 A schematic diagram of a UAV shooting device provided by an embodiment of the present application;
[0055] Figure 3 A schematic diagram of a building surface image and a corrected image obtained after rotation provided by an embodiment of the present application;
[0056] Figure 4 A schematic diagram of a grid image and a corresponding Hough space image provided by an embodiment of the present application;
[0057] Figure 5 A schematic diagram of conversion of a pixel point of a grid image in a Cartesian coordinate system to a Hough curve in a Hough space image provided by an embodiment of the present application;
[0058] Figure 6 A schematic diagram of conversion of a grid straight line in a Cartesian coordinate system to a Hough intersection in a Hough space image provided by an embodiment of the present application;
[0059] Figure 7 A schematic diagram of the influence of a building surface protrusion on a grid straight line provided by an embodiment of the present application;
[0060] Figure 8A schematic diagram of the influence of the inclination of a building surface on the distribution of grid lines according to an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to further clarify the technical means and effects taken by the present application to achieve the predetermined inventive objectives, the following describes in detail the specific implementation, structure, features and effects of a building surface flatness detection device and detection method according to the present application, with reference to the accompanying drawings and preferred embodiments. Different "one embodiment" or "another embodiment" in the following description do not necessarily refer to the same embodiment. In addition, the specific features, structures or characteristics in one or more embodiments can be combined in any suitable form.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. Terms such as "comprise", "comprising", or any other variant thereof are intended to cover non-exclusive inclusion, so that a circuit structure, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such article or device. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the article or device comprising the element.
[0063] The specific scheme of the building surface flatness detection method provided by the present application is described in detail below with reference to the accompanying drawings.
[0064] Referring to Figure 1 , a basic flowchart of the building surface flatness detection method provided by an embodiment of the present application is shown.
[0065] As shown in Figure 1 , the building surface flatness detection method provided by an embodiment of the present application specifically includes:
[0066] S100: Obtain a grid image of a building surface, and perform Hough transform on the grid image to obtain a Hough space image.
[0067] The grid laser and the camera are installed on the unmanned aerial vehicle, and the grid laser and the camera are coaxial. The grid laser can emit a grid laser with a wavelength of about 630 nm and can rotate around itself. The camera does not rotate. The grid laser and the camera on the unmanned aerial vehicle are used to capture a building surface image, as shown in Figure 2 A schematic diagram of an unmanned aerial vehicle camera.
[0068] Then, the captured building surface image is preprocessed to obtain a grid image of the building surface. Specifically:
[0069] First, according to the rotation angle of the grid laser, the building surface image obtained by the camera is rotated in the opposite direction to adjust the image grid to be always horizontal and vertical (to ensure that the grid in the image is horizontal or vertical, facilitating calculation), and a corrected image is obtained, as shown in Figure 3 .
[0070] Then, the corrected image is denoised using Gaussian filtering or median filtering, and contrast enhancement (such as histogram equalization) is performed to obtain an enhanced image.
[0071] Finally, the enhanced image is segmented by laser grid using the color gray corresponding to the wavelength of the grid laser, such as using a 630 nm wavelength red grid laser to perform threshold segmentation on the R channel of the enhanced image to obtain a grid image.
[0072] The grid image obtained after preprocessing is subjected to Hough transform to convert the grid image into a Hough space image, i.e., a Hough space image of the building surface is obtained.
[0073] The above steps obtain the grid image of the building surface, and perform grid line detection to convert it into a Hough curve image in the Hough space. According to the characteristics of the Hough curve in the Hough space image, the points in the grid image correspond one-to-one to the Hough curves in the Hough space image, and the Hough curve represents all the grid lines passing through the point in the original Cartesian coordinate system (in the grid image), and the parameters are the angle between the grid line normal and the x-axis and the distance from the grid line to the origin. Therefore, when there is a Hough intersection point in the Hough curve in the Hough space image, it means that there are multiple points on the same grid line in the original Cartesian coordinate system (in the grid image).
[0074] Because the grid laser emits standard laser grid lines, when transmitted on a flat and vertical building surface relative to the camera view, the grid appears as a standard square, and the spacing between each grid line of the grid is equal, so the Hough intersection points representing these grid lines are uniformly distributed on the Hough curve in the Hough space image. When the building surface is uneven, such as a convex or concave building surface, the grid lines irradiated to this position will also be convex or concave accordingly, which will cause the original standard parallel grid lines to become discontinuous, resulting in abnormal changes in the brightness of the Hough intersection points in the Hough space image. In addition, when the unmanned aerial vehicle photographs the building surface, the building surface is not completely perpendicular to the grid laser and the camera, and the building surface may be inclined relative to the grid laser and the camera. The inclination on one side will cause the spacing of the grid lines on one side to widen, causing the originally square grid to become a rectangle, which is reflected in the Hough space image as a change in the distribution of the Hough intersection points of the Hough curve.
[0075] Therefore, in this embodiment of the invention, anomalies on building surfaces are identified by analyzing the brightness changes and distribution of the Hough intersections of Hough curves in a Hough space image. Specifically, steps S200 to S500 are included.
[0076] S200: Within the Hough space image, obtain the number of Hough intersections within the horizontal and vertical angular neighborhood ranges that pass through the Hough curve, and filter out the valid Hough intersections that represent grid lines in the raster image.
[0077] The Hough space image is transformed from a raster image using raster lines. Each pixel on a raster line corresponds to a Hough curve, and the illumination direction of the raster lines has been adjusted to be horizontal and vertical. Therefore, after transforming to the Hough intersections in the Hough space image, according to the characteristics of the Hough transform, under normal circumstances, the intersections are distributed... and The following is the location: Figure 4 As shown.
[0078] Meanwhile, since the grid lines in the grid image may have a certain angle of inclination when the plane is tilted, that is, not completely horizontal and vertical, the tilt of the plane is generally not large. We only consider the Hough intersections in a certain range of the Hough space image to determine whether they are Hough intersections of grid lines.
[0079] Based on the above analysis, in some embodiments of the present invention, by obtaining the number of Hough intersections within the horizontal and vertical angular neighborhood ranges of the Hough space image that pass through the Hough curve, valid Hough intersections representing grid lines in the grid image are filtered. Specific embodiments are as follows:
[0080] First, within the Hough space image, obtain the Hough intersections within the horizontal and vertical angular neighborhoods, and the number of Hough curves traversed by each Hough intersection. The horizontal and vertical angles include 0 degrees, 90 degrees, and -90 degrees; and the 0-degree neighborhood can be [-10°, 10°]; the 90-degree neighborhood can be [80°, 90°]; and the -90-degree neighborhood can be [-90°, -80°]. Then, iterate through all the Hough intersections within the aforementioned angular neighborhoods and count the number of Hough curves they traverse. The traversal step size is 1 degree, such as in The following Hough intersection sequence is The sequence is obtained by obtaining the number of Hough curves traversed by each Hough intersection point. ;
[0081] Then, since the number of Hough curves at Hough intersections represents the number of grid pixels passing through that grid line in the raster image, and since uneven areas on the building surface scanned by the raster laser will cause deviations from the original grid lines, thus reducing the number of Hough curves corresponding to the Hough intersections in the Hough space image, and since the deviation in a grid line is relatively small, and the selected angular neighborhood includes a large number of two points on a grid line that are not adjacent, the average number of Hough curves passing through the Hough intersections in the angular neighborhood can be used as the threshold for filtering grid lines. Therefore, in the embodiment of the present invention, by calculating the average number of Hough curves passing through all Hough intersections in each angular neighborhood, the curve number threshold is obtained as follows:
[0082]
[0083] In the formula, Represents the angular neighborhood range The threshold for the number of curves corresponding to the content; This represents the number of all Hough intersections within the angular neighborhood. Indicates the angular neighborhood range; Indicates in Angle 1 The number of Hough curves traversed at each Hough intersection point; Indicates in The number of Hough intersections at a given angle.
[0084] Finally, Hough intersections that pass through more than a threshold number of Hough curves are selected to obtain the effective Hough intersections representing grid lines in the raster image. Specifically, if the average number of Hough curves passed through by all Hough intersections within the angular neighborhood is greater than the threshold number of curves, these Hough intersections are selected, assuming a one-to-one correspondence with the grid lines in the original raster image. This step allows for the selection of effective Hough intersections representing grid lines in the raster image. Subsequent analysis of these effective Hough intersections can effectively reduce the amount of data computation and improve computational efficiency.
[0085] S300: Analyze the difference in the number of effective Hough intersections passing through the Hough curve, and cluster the effective Hough intersections to obtain several effective Hough intersection clusters.
[0086] According to the characteristics of the Hough curves converted from the grid image to the Hough space image, each pixel point corresponds to a Hough curve in the Hough space image, and the Hough curve represents a set of all grid lines in the grid image passing through the pixel point. Therefore, when two Hough curves intersect, it means that a grid line can be formed in the grid image passing through the two pixel points (the pixel points represented by the two intersecting Hough curves); therefore, the more Hough curves passing through a Hough intersection point, the greater the possibility of the existence of a grid line in the grid image. Figure 5 As shown in FIG. 3, the conversion of the grid image in the Cartesian coordinate system to the Hough space image is shown. Figure 6 As shown in FIG. 4, the conversion of the grid lines of the grid image in the Cartesian coordinate system to the Hough intersection point diagram in the Hough space image is shown.
[0087] When the building surface is uneven, the grid lines in the grid image will be offset, as shown in FIG. 5. Figure 7 The unevenness of the building surface will cause the deformation of part of the grid lines, thereby reducing the number of pixel points passing through the original grid lines, and the number of Hough curves passing through the corresponding Hough intersection points in the Hough intersection point array of the Hough space image will also be reduced. Therefore, the point with the largest number of Hough curves passing through in the Hough intersection point array of the Hough space image indicates that the number of pixel points passing through the grid line is the largest; and the building surface is usually not uneven in all regions, so the point with the largest number of Hough curves passing through in the Hough intersection point array indicates that there is no bending or other unevenness. At the same time, the building surface with a protrusion or other uneven surface is usually a region, so the grid lines near the region will usually have bending abnormalities. Therefore, the abnormality of the grid line can be preliminarily judged according to the difference between the number of Hough curves passing through each Hough intersection point and the number of Hough curves passing through the largest intersection point. Then, whether it is an uneven abnormality is determined according to the uneven region performance.
[0088] Based on the above analysis, in the embodiment of the present application, the number difference degree of the Hough curves passing through the effective Hough intersection points is analyzed, the effective Hough intersection points are clustered, and a plurality of effective Hough intersection point clusters are obtained. The specific implementation is as follows:
[0089] First, the maximum number of Hough curves passing through the effective Hough intersection points is obtained.
[0090] Then, the difference between the number of Hough curves passing through the effective Hough intersection points and the maximum number is analyzed, and the number difference degree of the Hough curves passing through the effective Hough intersection points is obtained as follows:
[0091]
[0092] In the formula, the number difference degree of the Hough curves passing through the effective Hough intersection points is represented as follows: The number difference degree of the Hough curves passing through the effective Hough intersection points is represented as follows: the number difference of the effective Hough intersection point passing through the Hough curve, i.e., the difference between the number of Hough curves passing through the first Hough intersection point and the maximum number; the maximum number of Hough curves passing through the effective Hough intersection point; the number of Hough curves passing through the first effective Hough intersection point; the linear normalization function.
[0093] The greater the number difference, the higher the possibility of abnormality of the grid straight line corresponding to the current effective Hough point.
[0094] Finally, since the uneven part of the building surface is usually a continuous area, the grid straight lines passing through the area will usually be offset, causing the number of Hough curves passing through the effective Hough intersection points corresponding to the grid straight lines in this part to be reduced, and the reduced part is similar. Therefore, the effective Hough intersection points passing through the similar number difference of Hough curves are obtained, and if the grid straight lines corresponding to these effective Hough intersection points can form a local area, it indicates that the possibility of unevenness at this position is high. Therefore, the number difference of any two effective Hough intersection points is calculated; and a preset difference threshold (the value can be 0.1), according to the number difference, the effective Hough intersection points are clustered, and a plurality of effective Hough intersection point clusters, i.e., the first effective Hough intersection point and the first effective Hough intersection point and difference less than 0.1 are considered as a class, and finally a plurality of effective Hough intersection point clusters are obtained.
[0095] S400: For each effective Hough intersection point cluster, the coordinate distance between any two effective Hough intersection points is analyzed to obtain the possibility that the area where the effective Hough intersection point cluster is located is an uneven area.
[0096] After obtaining the effective Hough intersection point cluster, it is further analyzed whether the uneven area is abnormal. Therefore, for each effective Hough intersection point cluster, the coordinate distance between any two effective Hough intersection points is analyzed to obtain the possibility that the area where the effective Hough intersection point cluster is located is an uneven area. The specific implementation is as follows:
[0097] First, for each effective Hough intersection point cluster, the coordinates of all effective Hough intersection points are obtained, and the format of the coordinates is , wherein represents the angle between the normal of the grid straight line corresponding to the effective Hough intersection point in the grid image and the x-axis, represents the distance between the grid straight line corresponding to the effective Hough intersection point in the grid image and the origin.
[0098] Then, based on the coordinates, analyze any valid Hough intersection. The difference between the values yields the probability that the region containing the effective Hough intersection cluster is an uneven region:
[0099]
[0100] In the formula, Indicates the first The probability that a valid Hough intersection cluster is an uneven region; , They represent the first Different effective Hough intersections in a cluster of effective Hough intersections and of Size; Indicates the first The number of effective Hough intersections in a cluster of effective Hough intersections; This represents the linear normalization function.
[0101] The grid lines that pass through a region are usually The differences are small, so when the effective Hough intersection coordinates of the effective Hough intersection cluster are... The smaller the value difference, the higher the probability that the original grid lines are clustered in one area or are uneven.
[0102] S500: Set a probability threshold and obtain the uneven area of the building surface based on the probability that the area where the effective Hough intersection cluster is located is an uneven area.
[0103] Building surfaces may have a certain degree of tilt. In the direction of the tilt, the laser path becomes longer, and the grid lines parallel to the tilt direction are relatively lengthened, but the spacing remains unchanged. However, the spacing of the grid lines intersecting the tilt direction changes, causing the original square grid to appear as a rectangle. In the Hough space image, this is represented by a change in the position of the Hough intersections. Figure 8 As shown: The left side is a schematic diagram of the oblique cutting of the building surface, which is located in the xoy plane. The laser grid transmits light from the negative z-axis. If the plane is rotated along the y-axis and tilted inwards towards the positive z-axis, the solid lines represent this, while the dashed lines represent the original, untilted building surface. The right side is a schematic diagram of the grid line distribution. The spacing of the vertical grid lines along the positive x-axis is enlarged, while the spacing of the vertical grid lines in the negative x-axis is reduced. Therefore, the tilt of the building surface only affects the longitudinal distribution of the Hough intersections in Hough space, without changing the number of Hough curves traversed by the points. Furthermore, the influence of the Hough intersections in the Hough intersection lattice can be utilized... When determining the clustering of abnormal grid lines, the influence of the building surface tilt needs to be considered when considering the distribution area of suspected abnormal Hough intersections.
[0104] Based on the above analysis, in some embodiments of the present application, the method for setting the possibility threshold is:
[0105] First, according to the coordinates of the effective Hough intersection points, the uniformity of the interval of the parallel grid lines in the grid image is analyzed to obtain the inclination degree of the building surface. When the building surface is inclined, the overall deformation of the grid lines will be caused, and according to the above analysis, the deformed grid lines will cause the interval of the parallel lines to change. Since the Hough intersection points at the same angle represent the parallel grid lines in the original grid image, the more uniform the interval of the Hough intersection points at the same angle, the more uniform the interval of the parallel grid lines in the original grid image, and the smaller the inclination degree of the building surface. Therefore, specifically, for all the effective Hough intersection points at each angle neighborhood range, the values are arranged in order of size to obtain a coordinate sequence; based on the coordinate sequence, the variance of the coordinate sequence is calculated to obtain the uniformity of the interval of the parallel grid lines in the grid image, that is, the inclination degree of the building surface is:
[0106]
[0107]
[0108] Then, the initial possibility threshold is set, that is, the size of the possibility threshold when the building surface is not inclined, which can be set to 0.6 according to the empirical value; and the initial possibility threshold is corrected by the inclination degree of the building surface to obtain the possibility threshold:
[0109]
[0110]
[0111] When the inclination degree of the building surface is high, the difference in the possibility of uneven area calculation becomes large, so the abnormality discrimination possibility threshold value needs to be appropriately lowered, that is, the inclination degree of the building surface The greater the inclination degree of the building surface, the smaller the possibility threshold value of the uneven area.
[0112] After the possibility threshold value of the uneven area is set, the uneven area of the building surface is obtained according to the possibility that the region where the effective Hough intersection cluster is located is an uneven area, that is, the possibility that the region where the effective Hough intersection cluster is located is an uneven area of the building surface is greater than the possibility threshold value, indicating that the region where the effective Hough intersection cluster is located is an uneven area of the building surface.
[0113] The uneven area discrimination is performed on all effective Hough intersection clusters, and when the uneven possibility of the effective Hough intersection cluster is greater than the possibility threshold value, it is considered that the building surface has an uneven position; when the uneven possibility of all effective Hough intersection clusters is less than the possibility threshold value, it is considered that the building surface is relatively flat.
[0114] The uneven area of the building surface is obtained, and then the following steps are further included:
[0115] S600: Secondary confirmation is performed on the uneven area to obtain the actual uneven area.
[0116] The uneven area of the building surface is further image collected and uneven possibility analyzed, and for the first determined uneven area position, the unmanned aerial vehicle hovers at the current uneven area position, rotates the irradiation direction of the grid laser, and image collects and uneven possibility analyzes again; if the first determined uneven area is determined to be an uneven area again, the uneven area is determined to be an actual uneven area, and relevant image information is saved. If the second determination result is a flat area result, relevant personnel are notified.
[0117] Based on the same inventive concept as the above method, the embodiment further provides a flatness detection device for a building surface.
[0118] A flatness detection device for a building surface includes an image collection module, an effective Hough intersection screening module, an uneven possibility analysis module, an uneven area acquisition module, and a secondary confirmation module. Wherein:
[0119] The image collection module is used to obtain the grid image of the building surface, and perform Hough transform on the grid image to obtain a Hough space image;
[0120] An effective Hough intersection point screening module is configured to obtain the number of Hough intersection points passing through Hough curves in a horizontal and vertical angle neighborhood range in a Hough space image, and screen effective Hough intersection points representing grid lines in a grid image;
[0121] An uneven possibility analysis module is configured to analyze the number difference of Hough intersection points passing through Hough curves, cluster the effective Hough intersection points, obtain a plurality of effective Hough intersection point clusters, and analyze the coordinate distance of any two effective Hough intersection points for each effective Hough intersection point cluster to obtain the possibility that the region where the effective Hough intersection point cluster is located is an uneven region;
[0122] An uneven region obtaining module is configured to set a possibility threshold, and obtain an uneven region of a building surface according to the possibility that the region where the effective Hough intersection point cluster is located is an uneven region.
[0123] A secondary confirmation module is configured to perform secondary confirmation on the uneven region to obtain an actual uneven region.
[0124] It should be noted that the above-mentioned embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multi-task processing and parallel processing are also possible or may be advantageous.
[0125] Each embodiment in the specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other. Each embodiment mainly describes the difference from other embodiments.
Claims
1. A method for detecting the flatness of a building surface, characterized in that, The method includes: A raster image of the building surface is acquired, and a Hough transform is performed on the raster image to obtain a Hough space image; Within the Hough space image, the number of Hough intersections within the horizontal and vertical angular neighborhood ranges that pass through the Hough curve is obtained, and valid Hough intersections representing grid lines in the grid image are filtered out. Analyze the number of differences in the number of effective Hough intersections passing through the Hough curve, and cluster the effective Hough intersections to obtain several effective Hough intersection clusters. For each effective Hough intersection cluster, the coordinate distance between any two effective Hough intersections is analyzed to obtain the probability that the region where the effective Hough intersection cluster is located is an uneven region. By setting a probability threshold, the uneven areas of the building surface are obtained based on the probability that the area where the effective Hough intersection cluster is located is an uneven area. The method for determining the probability that the region containing the effective Hough intersection cluster is an uneven region includes: For each of the effective Hough intersection clusters, obtain the coordinates of all effective Hough intersections, wherein the coordinates are in the following format: ,in This represents the angle between the normal to the grid line in the grid image corresponding to the effective Hough intersection and the x-axis. This represents the distance between the grid line in the grid image corresponding to the effective Hough intersection and the origin; Based on the coordinates, analyze any of the effective Hough intersections. The difference is used to determine the probability that the region containing the effective Hough intersection cluster is an uneven region.
2. The method for detecting the flatness of building surfaces according to claim 1, characterized in that, Within the Hough space image, the number of Hough intersections within the horizontal and vertical angular neighborhood ranges that pass through the Hough curve is obtained, and valid Hough intersections representing grid lines in the grid image are filtered, including: Within the Hough space image, obtain the Hough intersections within the horizontal and vertical angular neighborhoods and the number of Hough curves that each Hough intersection passes through. Calculate the average number of Hough intersections within the neighborhood of each angle that pass through the Hough curve, and obtain the curve number threshold. Filter out Hough intersections that pass through a number of Hough curves greater than the curve number threshold to obtain valid Hough intersections representing grid lines in the grid image.
3. The method for detecting the flatness of building surfaces according to claim 1 or 2, characterized in that, The horizontal and vertical angles include 0 degrees, 90 degrees, and -90 degrees; wherein: The 0-degree neighborhood ranges from [-10°, 10°]. The 90-degree neighborhood range is [80°, 90°]; The -90° neighborhood range is [-90°, -80°].
4. The method for detecting the flatness of building surfaces according to claim 1, characterized in that, Analyzing the number of effective Hough intersections passing through the Hough curve, the effective Hough intersections are clustered to obtain several effective Hough intersection clusters, including: Obtain the maximum number of valid Hough intersections that pass through the Hough curve; The difference between the number of effective Hough intersections passing through the Hough curve and the maximum number is analyzed to obtain the difference degree of the number of effective Hough intersections passing through the Hough curve; Calculate the difference in the number of any two valid Hough intersections; A preset difference threshold is used to cluster the effective Hough intersections based on the difference in quantity, resulting in several effective Hough intersection clusters.
5. The method for detecting the flatness of building surfaces according to claim 1, characterized in that, The method for setting the probability threshold is as follows: Based on the coordinates of the effective Hough intersections, the uniformity of the spacing of parallel grid lines in the grid image is analyzed to obtain the tilt of the building surface. Set an initial probability threshold; The initial probability threshold is corrected by the degree of tilt of the building surface to obtain the probability threshold.
6. The method for detecting the flatness of building surfaces according to claim 5, characterized in that, Based on the coordinates of the effective Hough intersections, the uniformity of the spacing of parallel grid lines in the raster image is analyzed, including: Within each angular neighborhood, for All valid Hough intersections are identical, according to Arrange the coordinates in ascending order to obtain a coordinate sequence; Based on the coordinate sequence, calculate the coordinate sequence in the coordinate sequence. The variance of the variance is used to obtain the uniformity of the spacing between parallel grid lines in the raster image.
7. The method for detecting the flatness of building surfaces according to claim 1, characterized in that, This includes identifying the uneven areas on the building surface, and then further includes: The uneven area is then reconfirmed to obtain the actual uneven area.
8. The method for detecting the flatness of building surfaces according to claim 1, characterized in that, Acquire a raster image of the building surface, including: Images of building surfaces are captured using a grid laser and a camera; The image of the building surface is adjusted according to the rotation angle of the grid laser to obtain a corrected image; The corrected image is then denoised to obtain an enhanced image; The enhanced image is segmented to obtain a raster image.
9. A device for detecting the flatness of a building surface, characterized in that, The device includes: The image acquisition module is used to acquire a raster image of the building surface and perform a Hough transform on the raster image to obtain a Hough space image. The effective Hough intersection filtering module is used to obtain the number of Hough intersections passing through the Hough curve within the horizontal and vertical angular neighborhood ranges in the Hough space image, and filter the effective Hough intersections that represent grid lines in the grid image. The unevenness probability analysis module is used to analyze the difference in the number of effective Hough intersections passing through the Hough curve, cluster the effective Hough intersections to obtain several effective Hough intersection clusters; and for each effective Hough intersection cluster, analyze the coordinate distance between any two effective Hough intersections to obtain the probability that the area where the effective Hough intersection cluster is located is an uneven area. The uneven area acquisition module is used to set a probability threshold and obtain the uneven areas on the building surface based on the probability that the area where the effective Hough intersection cluster is located is an uneven area. The method for determining the probability that the region containing the effective Hough intersection cluster is an uneven region includes: For each of the effective Hough intersection clusters, obtain the coordinates of all effective Hough intersections, wherein the coordinates are in the following format: ,in This represents the angle between the normal to the grid line in the grid image corresponding to the effective Hough intersection and the x-axis. This represents the distance between the grid line in the grid image corresponding to the effective Hough intersection and the origin; Based on the coordinates, analyze any of the effective Hough intersections. The difference is used to determine the probability that the region containing the effective Hough intersection cluster is an uneven region.
Citation Information
Patent Citations
Chip flatness detection device for 5G circulator and detection method thereof
CN112611343A
Surface flatness detection method of clamp for mechanical production
CN118229679A