Urban building image processing method and system based on unmanned aerial vehicle inspection

Through the least squares method of the adaptive weighted error term, the degree of fracture and cavity probability of the drone image is evaluated, and the misjudgment problem of defective areas in the drone image correction is solved, and the accurate image correction effect is achieved.

CN120451024AInactive Publication Date: 2025-08-08GUANGDONG TONGBO INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510557090.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The architectural images taken by drones are geometric distorted and projection distorted due to changes in flight attitude and viewing angle offset. Traditional homography transforms have poor correction effect in defect areas, especially when tiles fall off or cracks, which affects the accuracy of image correction.

Method used

The least squares method of the adaptive weighted error term is used to evaluate the degree of fracture and cavity probability through grid division, reduce the impact of defect areas, and solve the homography matrix by using the least squares method of the adaptive weighted error term to improve the accuracy of image correction.

Benefits of technology

The image correction accuracy in defective areas is achieved, the influence of lighting and tile texture is reduced, the accuracy of the homography matrix is improved, and the consistency of the image and front view is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451024A_ABST
    Figure CN120451024A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image data processing, in particular to an urban building image processing method and system based on unmanned aerial vehicle inspection, and the method comprises the steps: collecting a gray image of the surface of a to-be-detected building through an unmanned aerial vehicle, and obtaining a to-be-corrected image; and mapping the to-be-corrected image to the same plane as a pre-stored to-be-measured building surface front view image by using homography transformation, and in the mapping process, solving a homography matrix by using a least square method of an adaptive weighted error term so as to complete image mapping based on the homography matrix and obtain a corrected image. According to the method, the accuracy of defect area identification can be improved, and when the homography matrix mapping the to-be-corrected image to the same plane as the front view image is solved through the least square method of the adaptive weighted error term, the influence of the defect area can be reduced, so that the accurate correction of the image can be realized based on the homography matrix with relatively high accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image data processing technology. More specifically, the present invention relates to a method and system for processing urban building images based on drone inspection. Background Art

[0002] With the widespread application of drone technology in building exterior wall inspections, automated defect detection based on aerial imagery has become a research hotspot. However, during the drone's image capture process, dynamic changes in flight attitude (such as pitch, roll, and yaw) and shifts in the shooting angle can lead to geometric distortion and projection distortion in the image. This can cause compression or deformation in the drone-captured image. Therefore, preprocessing drone-captured images to correct the image quality is crucial.

[0003] A homography transformation is a projective transformation that transforms any quadrilateral region in an image (such as a plane captured at an angle) into a target coordinate system (such as a plane viewed from the front) using a 3×3 matrix (homography). This transformation primarily relies on extracting feature points of regular textures (such as tile joints and window frame edges) from the image as control points to construct a homography matrix for geometric correction.

[0004] However, when there are large areas of tile peeling, cracks or repair marks on the building surface, the original regular grid structure is destroyed, and the texture features around the defective area will be broken or deformed, making it easy for traditional corner detection algorithms (such as Harris and SIFT) to misjudge the peeling edges as valid feature points; secondly, if the control points are distributed near the defect boundary, their spatial coordinates will be offset due to local structural collapse or warping, resulting in the introduction of nonlinear errors when solving the homography matrix, thereby affecting the accuracy of the solved homography matrix and leading to poor image correction effects. Summary of the Invention

[0005] In order to solve the problem of poor homography transformation correction effect caused by the existence of defective areas on the wall surface, the present invention provides an urban building image processing method and system based on drone inspection.

[0006] According to a first aspect of the present invention, a method for processing urban building images based on drone inspection is provided, comprising: The grayscale image of the building surface to be measured is collected by a drone to obtain the image to be corrected; The image to be corrected is mapped to the same plane as the pre-stored frontal image of the building surface to be measured using homography transformation. During the mapping process, the least squares method of the adaptive weighted error term is used to solve the homography matrix, so as to complete the image mapping based on the homography matrix and obtain the corrected image; The method for obtaining the weight of the adaptive weighted error term includes: The image to be corrected is divided into grids, the number of irregular edges in each grid area is counted, and the difference between the projected area of each grid area and the mode of the projected area of the grid areas in the same column is calculated. The degree of rupture of each grid area is calculated by combining the difference and the number; Based on the temperature characteristics and temperature gradient direction characteristics of each grid area, the cavity probability of each grid area is determined. The cavity probability represents the probability of a cavity between the tiles and the wall in the grid area. The defect degree of each grid area is also calculated. The defect degree is positively correlated with the crack degree and the cavity probability. The inverse of the defect degree is used as the weight of the error term of the control point in the corresponding area.

[0007] When determining the defect degree of each grid area, the present invention can reduce the influence of lighting and tile texture, thereby ensuring the accuracy of the obtained defect degree, and uses the inverse of the defect degree as the weight of the error term of the control point of the corresponding area, that is, adopting the least squares method of adaptive weighted error term to solve the homography matrix, reducing the degree of attention to the control points with relatively high defect degrees, thereby reducing the influence of the defect area on the solution result of the homography rectangle, improving the accuracy of the obtained homography matrix, and providing an accurate data basis for achieving precise image correction.

[0008] Preferably, the degree of rupture of each grid area satisfies the following relationship: ; Where, For the Rank the degree of disruption in the grid area of the column; For the Rank The number of irregular edges within the column's grid area; For the The maximum number of irregular edges within the column grid area; For the Rank The projected area of the grid area of the column; For the List the mode of the projected areas of all grid regions; is the normalization function.

[0009] The two reference data selected by the present invention (the maximum value of the number of irregular edges in the grid area in the same column, and the mode of the projected area of the grid area in the same column) can reduce the influence of tile texture and illumination, thereby ensuring the accuracy of the calculated cracking degree.

[0010] Preferably, the method for obtaining the number of irregular edges includes: For each grid area, the Canny edge detection algorithm is used to perform edge detection to obtain the edges within each grid area. The non-straight edges and non-repeated edges in each grid area are defined as irregular edges, and the number of irregular edges in each grid area is counted.

[0011] The present invention utilizes the fact that the cracked tiles will lead to an increase in the number of edges, and that the patterns of normal tiles, even if complex, have regular characteristics. It can evaluate the possibility of cracked tiles in each grid area and provide a data basis for calculating the degree of cracking.

[0012] Preferably, the method for obtaining the projected area includes: Cluster the pixels in each grid area according to the grayscale value to obtain two clusters in each grid area; For each grid area cluster, calculate the difference between the average gray value of each cluster and the mode of the gray value of the grid area in the same column, and take the number of pixels of the cluster with the smallest difference as the projected area of the corresponding grid area.

[0013] The present invention uses the area of the area where the tiles have not fallen off as the projected area, which can measure the falling conditions of the tiles in each grid area, thereby providing another dimensional data basis for the calculation of the degree of cracking.

[0014] Preferably, determining the cavity probability of each grid area based on the temperature characteristics and temperature gradient direction characteristics of each grid area includes: Obtain the temperature value of each location in each grid area, and calculate the temperature discrete eigenvalue of each grid area based on the temperature extreme difference and the standard deviation of the temperature gradient direction in each grid area. The temperature discrete eigenvalue is positively correlated with the temperature extreme difference and the standard deviation. The mode of the temperature discrete eigenvalues of each grid area is used as the reference data. The average difference between the temperature discrete eigenvalues of all grid areas within the eight-neighborhood range of each grid area and the reference data of the grid areas in the same column is calculated and normalized to obtain the cavity probability of each grid area.

[0015] Preferably, the discrete characteristic value of the temperature in each grid area satisfies the following relationship: ; Where, For the Rank The discrete eigenvalues of the temperature in the grid area of the column; For the Rank The temperature difference within the grid area of the column; For the The maximum value of the temperature range within the grid area of the column; For the Rank The standard deviation of the temperature gradient direction within the grid area of the column; For the The maximum value of the standard deviation of the temperature gradient direction within the grid area of the column.

[0016] The present invention can balance the importance of two indicators and eliminate the influence of extreme values through the calculation formula of square root.

[0017] Preferably, calculating the defect level of each grid area includes: The cavity probability and crack degree of each grid area are summed and normalized to obtain the defect degree of each grid area.

[0018] Preferably, the grid division of the image to be corrected is adaptive grid division, and the adaptive grid division includes: Perform straight line detection on the image to be corrected, and select row and column baselines based on the detection results. Count the mode of the distances between adjacent row and column baselines to obtain the size of a single tile. The initial grid size is set as an integer multiple of the size of a single tile, and the ratio of the actual length of the row and column baselines in each initial grid area to the theoretical length is calculated. If the ratio is less than the set threshold, the corresponding initial grid area is divided again according to the size of a single tile. Otherwise, the corresponding initial grid area is retained to complete the adaptive grid division.

[0019] Preferably, the defect level of the area where the selected control point is located is lower than a preset defect threshold.

[0020] According to a second aspect of the present invention, there is provided an urban building image processing system based on drone inspection, the system comprising a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the first aspect of the present invention.

[0021] The present invention has the following effects: On the one hand, the present invention can evaluate the possibility of defects in each grid area from different angles by evaluating the degree of cracking and the cavity probability of each grid area, and can reduce the influence of illumination factors when evaluating the degree of cracking and the cavity probability, thereby ensuring the accuracy of the defect degree of each grid area obtained; on the other hand, the present invention adopts the least squares method of adaptive weighted error terms to solve the problem of mapping the image to be corrected to the same plane of the front view, which can reduce the attention paid to the control points of relatively high defect areas, thereby reducing the influence of the defect area, improving the accuracy of the obtained homography matrix, and thus realizing accurate correction of the image. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 This is a schematic flow chart of the steps of a method for processing urban building images based on drone inspection in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0024] Reference Figure 1 , a method for processing urban building images based on drone inspection, including steps S1 and S2, specifically as follows: S1: Use a drone to collect grayscale images of the building surface to obtain the image to be corrected.

[0025] Specifically, the drone can be controlled to capture an image of the surface of the building to be measured at any position and angle along a set flight path. Existing image denoising and illumination compensation techniques are then used to denoise and compensate the captured image. The denoised and compensated image is then grayscaled to obtain the image to be corrected. The grayscale process is conventional and will not be described in detail in this embodiment.

[0026] S2: Use homography transformation to map the image to be corrected to the same plane as the pre-stored front view image of the building surface to be measured. During the mapping process, the least squares method of the adaptive weighted error term is used to solve the homography matrix to complete the image mapping based on the homography matrix and obtain the corrected image.

[0027] It should be noted that the present invention improves upon the traditional homography transformation method by selecting control points in low-defect areas and using the least squares method with an adaptively weighted error term to solve the homography matrix determined based on the control points. The weight of the adaptively weighted error term is the inverse of the degree of defect in the area where the control points are located. This reduces the influence of control points in high-defect areas, thereby improving the accuracy of the homography matrix and achieving precise image correction.

[0028] Specifically, the weight of the adaptive weighted error term can be determined by the following steps: Step 1: Divide the image to be corrected into grids, count the number of irregular edges in each grid area, and calculate the difference between the projected area of each grid area and the mode of the projected areas of the grid areas in the same column. Combining the difference and the number, calculate the degree of disruption of each grid area.

[0029] The degree of cracking refers to the probability that there are cracked tiles in each grid area.

[0030] It should be noted that when tiles on a building surface have defects such as peeling or cracks, the number of edges increases. Furthermore, while the patterns of tiles laid on a building surface are generally consistent, the locations of defects are often irregular, making the edges created by the defects non-repeatable. Therefore, the present invention utilizes this feature to assess the degree of cracking in each grid area by counting the number of irregular edges within the grid area.

[0031] It's important to note that the projected area of a cracked tile on a 2D image can deviate from the projected area of a normal tile due to variations in the 3D structure, shooting angle, and lighting conditions. For example, tilted shots can cause raised areas to appear larger and recessed areas to appear compressed or obscured. Shadows in sidelighting or backlighting can also overestimate or underestimate the cracked area.

[0032] In addition, due to the influence of lighting at different angles, existing lighting compensation technologies have the problem of incomplete compensation. Therefore, in order to further eliminate the influence of lighting, the present invention selects the projection area of the most likely normal area from the grid areas in the same column of each grid area as a reference. In this way, the difference between the projection area of each grid area and the projection area of the normal area can be accurately measured while eliminating the influence of lighting, providing another dimension of data basis for evaluating the degree of rupture of each grid area.

[0033] Next, the determination of the degree of rupture of each grid area is described in detail: First, the image to be rectified is grid-divided; In an exemplary embodiment of the present invention, the grid division of the image to be rectified is adaptive grid division, and the adaptive grid division of the image to be rectified can be achieved by the following steps: (1) Perform straight line detection on the image to be corrected, and select row and column baselines based on the detection results. Count the mode of the distances between adjacent row and column baselines to obtain the size of a single tile. Alternatively, the Hough transform or Canny edge detection can be used to detect lines on the image to be rectified. Line edges can then be extracted, and the resulting horizontal line edges can be used as row reference lines, while the resulting vertical line edges can be used as column reference lines. This embodiment does not specifically limit the edge detection method.

[0034] It should be noted that because tiles are usually regularly distributed, the size of a single tile can be obtained by counting the mode of the distances between adjacent row and column reference lines. This provides a reference for subsequent grid division and avoids dividing the same tile into different grid areas.

[0035] (2) Set the initial grid size as an integer multiple of the size of a single tile, and calculate the ratio of the actual length of the row and column baselines in each initial grid area to the theoretical length. If the ratio is less than the set threshold, the corresponding initial grid area is divided again according to the size of a single tile. Otherwise, the corresponding initial grid area is retained to complete the adaptive grid division.

[0036] The theoretical length refers to the length of the row and column baseline when the grid area is a normal area. The length of the row and column baseline here can be represented by the number of pixels on the row and column baseline.

[0037] Optionally, the initial grid size can be determined by selecting an appropriate multiple based on the size of a single tile. For example, when a single tile is small, a larger initial grid size can be set to improve detection efficiency. When a single tile is large, a smaller initial grid size can be set to ensure that there are sufficient grid areas in each column. This embodiment does not impose any particular limitation on the size of the initial grid size.

[0038] Optionally, if the ratio of the actual length of the row and column baselines within any initial grid area to the theoretical length is less than a set threshold, such as 0.7, then it can be determined that a cracked area exists within the initial grid area. By further dividing the initial grid area, the defect detection accuracy can be improved. Thus, the adaptive grid division of the image to be corrected is completed.

[0039] Then, the number of irregular edges in each grid area is counted; In an exemplary embodiment of the present invention, the number of irregular edges in each grid area may be determined by the following steps: For each grid area, the Canny edge detection algorithm is used to perform edge detection to obtain the edges within each grid area. The non-straight edges and non-repeated edges in each grid area are defined as irregular edges, and the number of irregular edges in each grid area is counted.

[0040] Optionally, a Sobel operator may be used for edge detection. This embodiment does not specifically limit the edge detection method selected. It should be noted that the edge detection process is a conventional technique and is not described in detail in this embodiment. Thus, the number of irregular edges within each grid area can be obtained.

[0041] Next, the difference between the projected area of each grid area and the mode of the projected areas of the grid areas in the same column is calculated; In an exemplary embodiment of the present invention, the projected area of each grid region may be determined by the following steps: The pixels in each grid area are clustered according to the grayscale value to obtain two clusters for each grid area. For each cluster in the grid area, the difference between the average grayscale value of each cluster and the mode of the grayscale value of the grid area in the same column is calculated, and the number of pixels in the cluster with the smallest difference is taken as the projected area of the corresponding grid area.

[0042] It should be noted that due to the significant difference in grayscale values between the normal area of tiles and the area where tiles have fallen off, pixels with similar grayscale in each grid area are clustered into one category according to the size of the grayscale value, which can distinguish between normal areas (areas where tiles have not fallen off) and falling off areas. Since there are usually more normal areas and the lighting conditions of the grid areas in the same column are basically the same, the normal grayscale values with the same lighting conditions as each grid area can be obtained by screening the mode of the grayscale values of the grid areas in the same column. Therefore, the cluster whose average grayscale value is closest to the mode of the grayscale values of the grid areas in the same column can be used as the normal area of the corresponding grid area, thereby realizing the determination of the projected area of each grid area.

[0043] The projected area of each grid area is the area of the normal area within each grid area.

[0044] When filtering the mode of the grayscale values of the grid areas in the same column, the grayscale value of each grid area is the average grayscale value or the median of the grayscale values within the corresponding grid area.

[0045] Optionally, clustering may be performed using a K-means clustering algorithm, a K-medoids clustering algorithm, or the like. This embodiment does not impose any particular limitation on the selected clustering algorithm.

[0046] In another embodiment, the projected area of each grid region can be determined using a grayscale histogram rather than a clustering approach. The specific process is as follows: constructing a grayscale histogram for each grid region, wherein the abscissa of the grayscale histogram is set to the difference between the grayscale value and the mode of the grayscale value of the grid region in the same column, and is divided into two situations: within the neighboring range and outside the neighboring range; the ordinate is set to the number of pixels; then, the number of pixels in the grayscale histogram of each grid region that falls within the neighboring range is used as the projected area of the corresponding grid region.

[0047] Furthermore, after determining the projected area of each grid area, the difference between the projected area of each grid area and the mode of the projected areas of the grid areas in the same column (the absolute value of the difference in values) can be calculated. Then, combined with the number of irregular edges in each grid area, the degree of rupture of each grid area can be calculated.

[0048] Specifically, the degree of rupture in each grid area satisfies the following relationship: ; Where, For the Rank the degree of disruption in the grid area of the column; For the Rank The number of irregular edges within the column's grid area; For the The maximum number of irregular edges within the column grid area, used for Normalize to eliminate dimensional differences; For the Rank The projected area of the grid area of the column; For the List the mode of the projected areas of all grid regions; is the normalization function.

[0049] in, The larger the value, the The larger the value is, the more defective edges there are in the grid area, and the larger the deviation of the projected area from the normal level is. This indicates that the tiles in the grid area are more likely to be cracked, and the corresponding degree of cracking in the grid area is relatively large.

[0050] In another embodiment, the degree of rupture of each grid area can also be calculated by the product calculation formula, as long as the degree of rupture is as well as ) are all positively correlated.

[0051] Step 2: Based on the temperature characteristics and temperature gradient direction characteristics of each grid area, determine the cavity probability of each grid area.

[0052] It should be noted that when there is a cavity between the tile and the wall, the temperature value in the cavity area deviates significantly from that in the normal area, and the temperature gradient direction is distributed in a reflective manner. In contrast, the temperature gradient direction in the normal area is usually consistent with the direction of light. In addition, when the tile pattern is more complex, the distribution pattern of the temperature gradient direction in the normal area is more obvious. Therefore, by combining the temperature characteristics and temperature gradient direction characteristics of each grid area, the present invention can effectively measure the probability of a cavity between the tile and the wall in each grid area, that is, the cavity probability.

[0053] In an exemplary embodiment of the present invention, the determination of the cavity probability of each grid area can be achieved by the following steps: (1) Obtain the temperature value of each location in each grid area, and calculate the temperature discrete characteristic value of each grid area based on the temperature extreme difference and the standard deviation of the temperature gradient direction in each grid area. The temperature discrete characteristic value is positively correlated with the temperature extreme difference and the standard deviation; The temperature value of each position in each grid area can be determined by taking an infrared image of the surface of the building to be measured.

[0054] Specifically, the discrete characteristic values of temperature in each grid area satisfy the following relationship: ; Where, For the Rank The discrete eigenvalues of the temperature in the grid area of the column; For the Rank The temperature difference within the grid area of the column; For the The maximum value of the temperature range within the grid area of the column is used for normalization to eliminate dimension differences; For the Rank The standard deviation of the temperature gradient direction within the grid area of the column; For the The maximum value of the standard deviation of the temperature gradient direction within the grid area of the column is used for normalization to eliminate dimension differences.

[0055] in, It reflects the absolute value of the difference between the lowest temperature and the highest temperature in the grid area. The larger the value, the greater the temperature deviation in the grid area, which further indicates that the temperature change in the grid area is more complex, and the corresponding temperature discrete characteristic value of the grid area is larger.

[0056] This value reflects the degree of dispersion of the temperature gradient direction within the grid area. A larger value indicates a more inconsistent temperature gradient direction within the grid area, and a more consistent distribution of the temperature gradient direction within the cavity area. This corresponds to a larger temperature dispersion characteristic value within the corresponding grid area. In this embodiment, the standard deviation of the temperature gradient direction is the standard deviation of the angle of the temperature gradient direction.

[0057] In another embodiment, the relationship: , calculate the discrete characteristic value of temperature in each grid area. is the normalization function.

[0058] (2) The mode of the temperature discrete eigenvalues of each grid area is used as the reference data. The average difference between the temperature discrete eigenvalues of all grid areas within the eight-neighborhood range of each grid area and the reference data of the grid areas in the same column is calculated and normalized to obtain the cavity probability of each grid area.

[0059] It should be noted that when there is a cavity area in a certain grid area or the surrounding grid areas, it will affect the stability of the tile structure in the corresponding grid area. Therefore, the present invention can accurately evaluate the cavity probability of each grid by calculating the temperature discrete eigenvalues in each grid area and the surrounding grid areas and the difference from the normal level of the temperature discrete eigenvalues of the corresponding column.

[0060] It should be further noted that while illumination compensation can reduce the impact of lighting conditions on temperature measurements at different locations to a certain extent, it cannot completely eliminate this effect. Grid areas within the same column often experience relatively consistent lighting conditions. Therefore, the present invention utilizes this characteristic to assess the normal level of discrete temperature eigenvalues for each grid column by counting the mode of the discrete temperature eigenvalues for each grid column.

[0061] Specifically, the cavity probability of each grid area satisfies the following relationship: ; Where, For the Rank Cavity probability of the grid area of the column; For the Rank The discrete eigenvalues of the temperature in the grid area of the column; For the Reference data of discrete eigenvalues of temperature in the column grid area; is the absolute value symbol; For the Rank The number of all grid areas within the eight-neighborhood range of the column's grid area; is the normalization function.

[0062] Optional, when the sum of the differences is larger, it means the Rank The more the temperature discrete eigenvalues of the grid area of the column and the surrounding grid areas deviate from the normal level, the more likely it is that there is a cavity area in the grid area, and the corresponding cavity probability of the grid area is greater.

[0063] Step 3: Calculate the defect degree of each grid area. The defect degree is positively correlated with the crack degree and cavity probability. The inverse of the defect degree is used as the weight of the error term of the control point in the corresponding area.

[0064] In an exemplary embodiment of the present invention, the defect degree of each grid area can be determined by the following steps: The cavity probability and crack degree of each grid area are summed and normalized to obtain the defect degree of each grid area.

[0065] Specifically, the defect degree of each grid area satisfies the following relationship: ; Where, For the Rank The degree of defect in the grid area of the column; For the Rank the degree of disruption in the grid area of the column; For the Rank Cavity probability of the grid area of the column; is the normalization function.

[0066] Among them, when The larger the value, the greater the possibility that the tiles in the grid area are broken, and the greater the degree of defect in the corresponding grid area; The larger the value, the greater the probability that there is a cavity between the tiles and the wall in the grid area, and the greater the degree of defect in the corresponding grid area.

[0067] In another embodiment, the relationship: , calculate the defect degree of each grid area.

[0068] Next, the process of using homography to map the image to be corrected to the same plane as the pre-stored front view image of the building surface to be measured is described in detail: First, four points are selected from the image to be corrected, and four points are selected from corresponding locations in the pre-stored elevation image of the building surface to be measured. This yields four matching point pairs, or control points. It should be noted that when using a homography to correct a two-dimensional image, only four control points are required to determine the homography matrix.

[0069] In an exemplary embodiment of the present invention, the defect level of the region where the selected control point is located is lower than a preset defect threshold.

[0070] Optionally, a defect threshold value, such as 0.3, may be set according to specific circumstances, so that 4 points are selected in a grid area where the defect threshold value is less than 0.3 in the image to be corrected, so that the selected control points are in a low defect level area.

[0071] Then, a 3×3 homography matrix H, consisting entirely of unknowns, is used to describe the transformation relationship between points selected in the image to be rectified and corresponding points in the frontal image of the building surface to be measured. Based on this homography matrix and four control points selected from two planes, eight equations are generated and converted into a system of linear equations. Each control point corresponds to two linear equations, constraining the horizontal and vertical mapping relationships in the projective transformation, respectively.

[0072] Next, the inverse of the degree of defect in the grid area where the point selected from the image to be corrected is located is used as the weight of the corresponding control point, and the least squares method is used to solve the linear equations. During the solution process, the error term of each control point is set as an adaptive weighted error term, where the weight of the adaptive weighted error term is the weight of the corresponding control point. Thus, with the goal of minimizing the error term, the homography matrix is solved. It should be noted that the process of solving the homography matrix using the least squares method with the goal of minimizing the error term is a prior art and is not described in detail in this embodiment.

[0073] Furthermore, the obtained homography matrix can be used to map the image to be corrected onto the same plane as the frontal image of the building surface to be measured, resulting in a corrected image. This process not only eliminates geometric distortion in the image but also ensures that the image maintains a consistent perspective with the target plane, providing more accurate and reliable image data for subsequent analysis.

[0074] The present invention also provides an urban building image processing system based on drone inspection. The system includes a memory and a processor, and a computer program is stored in the memory. The computer program integrates the function of an urban building image processing method based on drone inspection. When the computer program is executed, the accuracy of defect area identification can be improved through an urban building image processing method based on drone inspection, and when solving the homography matrix that maps the image to be corrected to the same plane as the orthographic image through the least squares method of adaptive weighted error terms, the influence of the defect area can be reduced, thereby achieving accurate correction of the image based on the homography matrix with higher accuracy.

[0075] It should be understood that various alternatives to the embodiments of the invention described herein may be employed in practicing the invention.

Claims

1. A method for processing urban building images based on drone inspection, characterized in that: include: The grayscale image of the building surface to be measured is collected by a drone to obtain the image to be corrected; The image to be corrected is mapped to the same plane as the pre-stored front view image of the building surface to be measured using a homography transformation. During the mapping process, a least squares method of adaptively weighted error terms is used to solve the homography matrix to complete the image mapping based on the homography matrix to obtain a corrected image; The method for obtaining the weight of the adaptive weighted error term includes: Dividing the image to be corrected into grids, counting the number of irregular edges in each grid area, and calculating the difference between the projected area of each grid area and the mode of the projected areas of grid areas in the same column, and calculating the degree of disruption of each grid area based on the difference and the number; Based on the temperature characteristics and temperature gradient direction characteristics of each grid area, the cavity probability of each grid area is determined. The cavity probability represents the probability of a cavity existing between the tiles and the wall in the grid area. The defect degree of each grid area is calculated. The defect degree is positively correlated with the crack degree and the cavity probability. The inverse of the defect degree is used as the weight of the error term of the control point in the corresponding area.

2. The urban building image processing method based on drone inspection according to claim 1 is characterized in that: The degree of rupture of each grid area satisfies the following relationship: ; Where, For the Rank the degree of disruption in the grid area of the column; For the Rank The number of irregular edges within the column's grid area; For the The maximum number of irregular edges within the column grid area; For the Rank The projected area of the grid area of the column; For the List the mode of the projected areas of all grid regions; is the normalization function.

3. The urban building image processing method based on drone inspection according to claim 2 is characterized in that: The method for obtaining the number of irregular edges includes: For each grid area, the Canny edge detection algorithm is used to perform edge detection to obtain the edges within each grid area. The non-straight edges and non-repeated edges in each grid area are defined as irregular edges, and the number of irregular edges in each grid area is counted.

4. The urban building image processing method based on drone inspection according to claim 2 is characterized in that: The method for obtaining the projected area includes: Cluster the pixels in each grid area according to the grayscale value to obtain two clusters in each grid area; For each grid area cluster, calculate the difference between the average gray value of each cluster and the mode of the gray value of the grid area in the same column, and take the number of pixels of the cluster with the smallest difference as the projected area of the corresponding grid area.

5. The urban building image processing method based on drone inspection according to claim 1 is characterized in that: The determining of the cavity probability of each grid area based on the temperature characteristics and the temperature gradient direction characteristics of each grid area includes: Obtain the temperature value of each location in each grid area, and calculate the temperature discrete eigenvalue of each grid area based on the temperature extreme difference and the standard deviation of the temperature gradient direction in each grid area. The temperature discrete eigenvalue is positively correlated with the temperature extreme difference and the standard deviation. The mode of the temperature discrete eigenvalues of each grid area is used as the reference data. The average difference between the temperature discrete eigenvalues of all grid areas within the eight-neighborhood range of each grid area and the reference data of the grid areas in the same column is calculated and normalized to obtain the cavity probability of each grid area.

6. The urban building image processing method based on drone inspection according to claim 5 is characterized in that: The discrete characteristic values of the temperature in each grid area satisfy the following relationship: ; Where, For the Rank The discrete eigenvalues of the temperature in the grid area of the column; For the Rank The temperature difference within the grid area of the column; For the The maximum value of the temperature range within the grid area of the column; For the Rank The standard deviation of the temperature gradient direction within the grid area of the column; For the The maximum value of the standard deviation of the temperature gradient direction within the grid area of the column.

7. The urban building image processing method based on drone inspection according to claim 2 or 5 is characterized in that: The calculation of the defect degree of each grid area includes: The cavity probability and crack degree of each grid area are summed and normalized to obtain the defect degree of each grid area.

8. The urban building image processing method based on drone inspection according to claim 1 is characterized in that: The grid division of the image to be corrected is adaptive grid division, and the adaptive grid division includes: Performing straight line detection on the image to be corrected, and screening row reference lines and column reference lines based on the detection results, counting the mode of the distances between adjacent row reference lines and adjacent column reference lines, and obtaining the size of a single tile; The initial grid size is set according to an integer multiple of the size of the single tile, and the ratio of the actual length of the row and column baselines in each initial grid area to the theoretical length is calculated. If the ratio is less than the set threshold, the corresponding initial grid area is divided again according to the size of the single tile. Otherwise, the corresponding initial grid area is retained to complete the adaptive grid division.

9. The urban building image processing method based on drone inspection according to claim 1 is characterized in that: The defect level in the area where the selected control point is located is lower than the preset defect threshold.

10. An urban building image processing system based on drone inspection, characterized in that: The urban building image processing system based on drone inspection includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the steps of the urban building image processing method based on drone inspection as described in any one of claims 1 to 9.

Citation Information

Cited By

  • Unmanned aerial vehicle inspection method and system applied to municipal engineering

    CN120871943A

  • An unmanned aerial vehicle inspection method and system applied to municipal engineering

    CN120871943B