UAV image processing system for building inspection

The grayscale enhancement processing of the infrared images of building exterior walls collected by UAVs is performed through the adaptive threshold module and Canny edge detection algorithm, which solves the noise interference problem caused by electromagnetic interference and improves the accuracy of the detection results.

CN119579451BActive Publication Date: 2025-09-30HEBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411655569.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-09-30
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

Due to factors such as electromagnetic interference between the drone and the infrared camera, noise appears in the acquired infrared images. When using conventional edge detection algorithms to detect building exterior walls, it is easy to interfere with the detection results and affect the accuracy of the detection results.

Method used

An adaptive threshold module is used to obtain the first-level gradient and the second-level gradient according to the grayscale value difference between pixels in windows of different sizes. The average grayscale value of special pixels is adjusted by the first correction parameter and the second correction parameter. The grayscale distribution histogram of the exterior wall infrared image is divided using the first threshold and the second threshold to obtain an enhanced image, and defect detection is performed using the Canny edge detection algorithm.

Benefits of technology

Through grayscale enhancement processing, the influence of noise signals on the detection results is reduced, and the accuracy of exterior wall defect detection is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579451B_ABST
    Figure CN119579451B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image data processing technology, and specifically to a drone image processing system for building inspection, comprising: obtaining the primary gradient and secondary gradient of pixel points in an infrared image of an exterior wall, obtaining special pixel points based on the magnitude of the primary gradient and the secondary gradient, obtaining a first correction parameter and a second correction parameter through the special pixel points, obtaining a first threshold and a second threshold based on the first correction parameter and the second correction parameter, further utilizing the first threshold and the second threshold to perform grayscale enhancement on different areas of the infrared image of the exterior wall to obtain corresponding enhanced images, and performing exterior wall defect detection using the enhanced images. The present application improves the image enhancement effect by adjusting the grayscale values ​​of different areas in the image, while reducing the influence of noise signals in the infrared image of the exterior wall on the detection results, and improving the accuracy of the exterior wall defect detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image data processing technology, and in particular to a drone image processing system for building inspection. Background Art

[0002] With the continuous development and cost reduction of drone image processing technology, building exterior wall inspections have gradually become a key application of drone image processing in the construction industry. By capturing building exterior wall images with drones and applying image processing and analysis algorithms, structural defects such as defects and cracks can be quickly and accurately detected, saving time and human resources and identifying potential safety hazards in advance.

[0003] When using drones to inspect buildings, if there is leakage or missing insulation materials inside the wall, the temperature of the area will increase or decrease, forming a significant temperature difference with the surrounding area. Therefore, infrared images of the building's exterior walls are usually used to analyze the damage of the building's exterior walls. However, due to factors such as electromagnetic interference between the drone and the infrared camera, noise appears in the acquired infrared images. When using conventional edge detection algorithms to inspect the building's exterior walls, it is easy to interfere with the detection results and affect the accuracy of the detection results. Summary of the Invention

[0004] This application provides a drone image processing system for building inspection to solve the existing problem: due to factors such as electromagnetic interference between the drone and the infrared camera, noise appears in the acquired infrared image. When using conventional edge detection algorithms to inspect the exterior walls of buildings, it is easy to interfere with the obtained detection results and affect the accuracy of the detection results.

[0005] The drone image processing system for building inspection in this application adopts the following technical solutions:

[0006] One embodiment of the present application provides a drone image processing system for building inspection, which includes the following modules:

[0007] An image acquisition module is used to acquire an infrared image of an exterior wall and a corresponding grayscale distribution histogram;

[0008] An adaptive threshold module is used to obtain the primary gradient and secondary gradient of any pixel in the exterior wall infrared image based on the difference in grayscale values ​​between pixels in windows of different sizes; obtain special pixels in the exterior wall infrared image based on the magnitudes of the primary and secondary gradients; and obtain first and second correction parameters of the exterior wall infrared image based on the grayscale value differences between all special pixels in the exterior wall infrared image and pixels of different grayscale values ​​in the neighborhood; and adjust the average grayscale value of the special pixels using the first and second correction parameters to obtain first and second thresholds, respectively.

[0009] An image enhancement module is configured to divide a grayscale distribution histogram of the exterior wall infrared image into a plurality of intervals using a first threshold and a second threshold, and obtain a first region, a second region, and a third region of the exterior wall infrared image based on regions formed by corresponding pixels in the exterior wall infrared image according to the grayscale values ​​contained in each of the plurality of intervals; and to adjust the grayscale values ​​of the pixels in the first region, the second region, and the third region using the number of pixels in the first region, the second region, and the third region and the grayscale values ​​contained in each of the plurality of intervals to obtain an enhanced image of the exterior wall infrared image.

[0010] The image processing module is used to perform defect detection with the aid of enhanced image of the exterior wall infrared image.

[0011] Preferably, the method of obtaining the primary gradient and secondary gradient of any pixel in the infrared image of the exterior wall according to the difference in grayscale values ​​between pixels in windows of different sizes includes the following specific methods:

[0012] First, obtain the first-level neighboring pixel points and second-level neighboring pixel points of any pixel point, and one first-level neighboring pixel point corresponds to one second-level neighboring pixel point;

[0013] Then, the sum of the grayscale values ​​of all the first-level neighboring pixels of any pixel is recorded as the first value, and the absolute value of the difference between the grayscale value 8 times the first value of the pixel corresponding to the center point of the first-level window is recorded as the first-level gradient of the pixel;

[0014] Finally, the absolute value of the difference between the grayscale values ​​of the first-level neighborhood pixel and the corresponding second-level neighborhood pixel is recorded as the second value; the accumulated value of all second values ​​in the second-level window is recorded as the secondary gradient of the pixel corresponding to the center point.

[0015] Preferably, the specific method for obtaining the first-level neighborhood pixel points and the second-level neighborhood pixel points is:

[0016] Construct a 3×3 window as the first-level window, and take any pixel as the center point of the first-level window. In the first-level window, the pixels within the 8-neighborhood range of the center point are recorded as the first-level neighborhood pixels of the center point.

[0017] The directions corresponding to the first-level neighboring pixels are obtained and recorded as the neighboring directions, namely 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315° respectively. A window of size 5×5 is constructed and recorded as the second-level window. Any pixel is taken as the center point of the second-level window, and the pixels in the second-level window with a distance of 2 from the center point and located in the neighborhood direction are recorded as the second-level neighboring pixels of the center point.

[0018] Preferably, the method of obtaining special pixels in the exterior wall infrared image according to the magnitudes of the primary gradient and the secondary gradient, and obtaining first correction parameters and second correction parameters of the exterior wall infrared image according to the grayscale value differences between all special pixels in the exterior wall infrared image and pixels of different grayscale values ​​within the neighborhood, includes the following specific methods:

[0019] First, the first-order gradient mean w1 and the second-order gradient mean w2 of all pixels in the exterior wall infrared image are obtained, and the pixels whose first-order gradient is less than the mean w1 and whose second-order gradient is greater than the mean w2 in the exterior wall infrared image are marked as special pixels;

[0020] The pixels whose grayscale values ​​within the 8-neighborhood range of any special pixel are smaller than that of the special pixel are recorded as the first neighboring pixels of the special pixel, and the pixels whose grayscale values ​​within the 8-neighborhood range of any special pixel are greater than or equal to the grayscale value of the special pixel are recorded as the second neighboring pixels of the special pixel;

[0021] Then, a first correction factor and a second correction factor are obtained according to the differences between the special pixel and the first neighborhood pixel and the second neighborhood pixel respectively;

[0022] Finally, the average value of the first correction factors of all special pixels in the exterior wall infrared image is recorded as the first correction parameter of the exterior wall infrared image; the average value of the second correction factors of all special pixels in the exterior wall infrared image is recorded as the second correction parameter of the exterior wall infrared image.

[0023] Preferably, the specific method for obtaining the first correction factor and the second correction factor is:

[0024] The grayscale value difference between the special pixel and any corresponding first neighborhood pixel is recorded as the first factor of the special pixel, and the average value of all first factors of any special pixel is recorded as the first correction factor of the special pixel;

[0025] The grayscale value difference between any second neighboring pixel of any special pixel and the special pixel is recorded as the second factor of the special pixel, and the average value of all second factors of the special pixel is recorded as the second correction factor.

[0026] Preferably, the method of adjusting the average grayscale value of the special pixel using the first correction parameter and the second correction parameter to obtain the first threshold and the second threshold respectively includes the following specific methods:

[0027] The specific calculation method of the first threshold and the second threshold is:

[0028]

[0029] Wherein, T1 represents the first threshold; T2 represents the second threshold; N represents the number of special pixels in the infrared image of the exterior wall; F q represents the gray value of the qth special pixel in the infrared image of the exterior wall; n1 represents the first correction parameter; n2 represents the second correction parameter.

[0030] Preferably, the grayscale distribution histogram of the exterior wall infrared image is divided into a plurality of intervals by using the first threshold and the second threshold, and the first area, the second area, and the third area of ​​the exterior wall infrared image are obtained according to areas formed by corresponding pixels of the grayscale values ​​contained in the plurality of intervals in the exterior wall infrared image, including the specific method of:

[0031] The grayscale in the grayscale distribution histogram of the exterior wall infrared image is divided into three intervals, namely, the interval [0, T1), the interval [T1, T2), and the interval [T2, 255]. The areas formed by all the pixels whose grayscale values ​​in the exterior wall infrared image are in the interval [0, T1), the interval [T1, T2), and the interval [T2, 255] are recorded as the first area, the second area, and the third area, respectively.

[0032] Preferably, the method of adjusting the grayscale values ​​of the pixels in the first area, the second area, and the third area using the number of pixels in the first area, the second area, and the third area and the grayscale values ​​in each of the multiple intervals to obtain an enhanced image of the exterior wall infrared image includes the following specific methods:

[0033] First, according to the number of pixels in the first area, the second area, and the third area and the grayscale values ​​contained in each of the multiple intervals, a weight k1, a weight k2, and a weight k3 are obtained;

[0034] Then, the weight k1 is multiplied by the grayscale values ​​of all pixels in the first area to obtain the enhanced first area, the weight k2 is multiplied by the grayscale values ​​of all pixels in the second area to obtain the enhanced second area, and the weight k3 is multiplied by the grayscale values ​​of all pixels in the third area to obtain the enhanced third area. The enhanced first area, the enhanced second area, and the enhanced third area form an enhanced image of the exterior wall infrared image.

[0035] Preferably, the specific method for obtaining the weight k1, weight k2 and weight k3 is:

[0036] Obtain the number of pixels contained in the first region, the second region, and the third region, respectively, and record them as number s1, number s2, and number s3. Obtain the frequency accumulation values ​​of all grayscale values ​​corresponding to the first region, the second region, and the third region in the interval [0, T1), the interval [T1, T2), and the interval [T2, 255] in the grayscale distribution histogram, respectively, and record them as parameter a1, parameter a2, and parameter a3;

[0037] Arrange the quantity s1, quantity s2, and quantity s3 in ascending order, and arrange the parameters a1, parameter a2, and parameter a3. During the arrangement process, the correspondence between the quantity s1, quantity s2, quantity s3 and the parameters a1, parameter a2, and parameter a3 is maintained. The sequence after the arrangement of parameters a1, parameter a2, and parameter a3 is recorded as the parameter sequence, and the first element, second element, and third element in the parameter sequence are used as the weights k1, k2, and k3, respectively.

[0038] Preferably, the method for detecting exterior wall defects using an enhanced image of an exterior wall infrared image includes the following specific methods:

[0039] The Canny edge detection algorithm is used to perform edge detection on the enhanced image of the exterior wall infrared image to obtain the edge detection result in the enhanced image;

[0040] The Canny edge detection algorithm is used to detect the edges of the non-destructive infrared image of the exterior wall, and the non-destructive edge detection results that can be used as a comparison standard are obtained;

[0041] The edge detection results in the enhanced image are compared with the lossless edge detection results, and the edge lines that exist in the edge detection results in the enhanced image but not in the lossless edge detection results are recorded as defective edge lines of the exterior wall, and the defective edge lines of the exterior wall are visually marked.

[0042] The beneficial effects of the technical solution of the present application are: by analyzing the grayscale value difference between adjacent pixel points in the exterior wall infrared image, the first gradient and the second gradient of the pixel point are obtained, the special pixel point is obtained according to the size of the first gradient and the second gradient, the first correction parameter and the second correction parameter are further obtained by the difference between the special pixel point and the adjacent pixel point, the average grayscale value of the special pixel point is adjusted by using the first correction parameter and the second correction parameter to obtain the first threshold and the second threshold respectively, and the first threshold and the second threshold are further used to perform grayscale enhancement on different areas of the exterior wall infrared image to obtain the corresponding enhanced image; the exterior wall defect detection is performed by using the enhanced image, and while the image enhancement effect is improved by adjusting the grayscale values ​​of different areas in the image, the influence of the noise signal in the exterior wall infrared image on the detection result is greatly reduced, and the accuracy of the exterior wall defect detection result is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0044] Figure 1 This is a module flow chart of the drone image processing system used for building inspection in this application. DETAILED DESCRIPTION

[0045] To further illustrate the technical means and effectiveness of this application to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of the drone image processing system for building inspection proposed in this application. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

[0046] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs.

[0047] The specific solution of the drone image processing system for building inspection provided by this application is described in detail below with reference to the accompanying drawings.

[0048] See also Figure 1 , which shows a structural block diagram of a drone image processing system for building inspection provided by one embodiment of the present application. The system includes the following modules:

[0049] The image acquisition module is used to obtain the infrared image of the exterior wall and the corresponding grayscale distribution histogram.

[0050] In this application, when drones are inspecting building exterior walls, the infrared images of the buildings captured are subject to noise interference, resulting in lower accuracy when the infrared images are directly inspected. Therefore, this application considers enhancing the captured infrared images to eliminate noise interference, and then performing inspection based on the enhanced images.

[0051] Specifically, in the embodiment of the present application, it is first necessary to collect infrared images of the building exterior walls. The specific process is as follows:

[0052] First, an infrared image of the building's exterior wall is collected using a drone equipped with an infrared camera gimbal or an infrared imaging module, which is recorded as the exterior wall infrared image.

[0053] Then, the grayscale distribution histogram of the exterior wall infrared image is obtained.

[0054] It should be noted that, in the grayscale distribution histogram of the exterior wall infrared image, the horizontal axis is the grayscale value, and the vertical axis is the frequency of each grayscale value in the exterior wall infrared image.

[0055] At this point, the exterior wall infrared image and the corresponding grayscale distribution histogram are obtained through the above method.

[0056] The adaptive threshold module is used to obtain the adaptive threshold.

[0057] It should be noted that when a building's exterior wall is defective, the grayscale distribution histogram of the exterior wall infrared image typically exhibits a bimodal pattern, with the peak with the highest frequency being the primary peak and the peak with the second lowest frequency being the secondary peak. The primary peak may contain background noise, while the secondary peak contains edge information of the defective area. Therefore, we considered obtaining two thresholds based on the grayscale value difference between a pixel in the exterior wall infrared image and other pixels in its neighborhood. This allows us to segment the grayscale values ​​of the defective area and the background noise area in the exterior wall infrared image. This allows us to adjust the grayscale values ​​in different areas, suppressing noise points and enhancing edge information.

[0058] It should be noted that the grayscale values ​​of edge pixels on the edge line are usually continuous or change slowly, while the grayscale values ​​of noise points often have a larger mutation than the grayscale values ​​in the neighboring area.

[0059] Specifically, in step (1), first, a window of size 3×3 is constructed as a first-level window, and any pixel point is taken as the center point of the first-level window. In the first-level window, the pixels within the 8-neighborhood range of the center point are recorded as the first-level neighborhood pixels of the center point; based on the grayscale value difference between the pixel point and the pixels within the 8-neighborhood range, the first-level gradient of any pixel point in the exterior wall infrared image is obtained. The specific calculation method is:

[0060]

[0061] Among them, G1 represents the first-level gradient of the pixel; p represents the gray value of the pixel; n represents the number of first-level neighboring pixels of the pixel; p i Represents the grayscale value of the i-th first-level neighboring pixel of the pixel.

[0062] Then, the direction corresponding to the pixel point and the first-level neighboring pixel point is obtained and recorded as the neighborhood direction, which is 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315° respectively. A window of size 5×5 is constructed and recorded as a second-level window. The pixel point in the second-level window with a distance of 2 from the center point and located in the neighborhood direction is recorded as the second-level neighborhood pixel point of the center point. In the second-level window, one center point corresponds to 8 second-level neighborhood pixel points, and one first-level neighborhood pixel point corresponds to one second-level neighborhood pixel point located in the same neighborhood direction of the center point. According to the grayscale value difference between the pixel point and the corresponding second-level neighborhood pixel point, the second-level gradient of any pixel point in the exterior wall infrared image is obtained. The specific calculation method is as follows:

[0063]

[0064] Among them, G2 represents the secondary gradient of the pixel; p i represents the gray value of the first-level neighboring pixel within the 8-neighborhood range of the pixel; p i ′ Represents the grayscale value of the i-th secondary neighborhood pixel.

[0065] In step (2), it should be noted that the edge lines in the image are usually continuous and extend smoothly, while the noise points are discontinuous and do not have the property of extending smoothly. Therefore, the grayscale values ​​between the noise points and their neighboring pixels are usually quite different. Therefore, the first-order gradient of the noise points is significantly larger than the first-order gradient of the edge points in the image. Since the grayscale values ​​between the pixels in the wall defect area or background area and their neighboring pixels are very close, it is necessary to obtain the multi-level gradient features of the pixels in different ranges, that is, the grayscale differences between the pixels and their neighboring pixels in different ranges, in order to better distinguish the edge pixels and noise points in the infrared image of the exterior wall.

[0066] Therefore, by obtaining the primary gradient and secondary gradient of the pixel point, the edge points and noise points in the exterior wall infrared image are distinguished by the primary gradient of the pixel point, and the edge pixels and non-edge pixels in the exterior wall infrared image are distinguished by the secondary gradient.

[0067] First, the first-level gradient mean w1 and the second-level gradient mean w2 of all pixels in the exterior wall infrared image are obtained. The pixels in the exterior wall infrared image whose first-level gradient is less than the mean w1 and whose second-level gradient is greater than the mean w2 are recorded as special pixels. The pixels in the 8-neighborhood range of any special pixel whose grayscale value is less than the grayscale value of the special pixel are recorded as the first neighboring pixels of the special pixel.

[0068] It should be noted that, since there is usually a large difference in the grayscale value between the noise point and other pixels within the 8-neighborhood range of the noise point in the image, the first-order gradient value generated by the noise point in the exterior wall infrared image is larger, making the first-order gradient mean of the exterior wall infrared image larger than the second-order gradient mean.

[0069] According to the difference between the grayscale value of the special pixel and the corresponding first neighborhood pixel, the first correction parameter of the exterior wall infrared image is obtained. The specific calculation method is:

[0070]

[0071] Where n1 represents the first correction parameter of the exterior wall infrared image; F q represents the gray value of the qth special pixel in the infrared image of the exterior wall; p qp Represents the grayscale value of the pth first neighboring pixel of the qth special pixel, r q represents the number of first-neighborhood pixels of the qth special pixel; N represents the number of special pixels in the infrared image of the exterior wall.

[0072] It should be noted that the first correction factor It represents the average difference in grayscale values ​​between special pixels and corresponding first-neighborhood pixels. The first correction parameter reflects the difference in grayscale values ​​between all special pixels and corresponding first-neighborhood pixels in the exterior wall infrared image. The larger the value of the first correction parameter, the greater the difference in grayscale values ​​between edge pixels and surrounding low-grayscale pixels in the image, indicating that the greater the difference in grayscale values ​​between edge pixels and background pixels in the exterior wall infrared image. In order to retain as many edge pixels as possible, the lower threshold value should be smaller when the grayscale value interval is subsequently divided.

[0073] It should be noted that the special pixel points obtained according to the primary gradient mean and the secondary gradient mean are some edge pixel points in the infrared image of the exterior wall.

[0074] Then, any pixel whose grayscale value within the 8-neighborhood range of any special pixel is greater than or equal to the grayscale value of the special pixel is recorded as the second neighboring pixel of the special pixel. The second correction parameter of the exterior wall infrared image is obtained based on the difference between the grayscale values ​​of the special pixel and the neighboring pixel. The specific calculation method is as follows:

[0075]

[0076] Where n2 represents the second correction parameter; p qw F represents the gray value of the wth second neighboring pixel of the qth special pixel; q represents the gray value of the qth special pixel in the infrared image of the exterior wall; s q represents the number of second-neighborhood pixels of the qth special pixel; N represents the number of special pixels in the infrared image of the exterior wall.

[0077] It should be noted that It represents the average difference between a special pixel and its second neighboring pixels within its eight neighborhoods. The second correction parameter reflects the difference between all special pixels and their second neighboring pixels in the exterior wall infrared image. A larger value of n2 indicates a greater difference in grayscale values ​​between edge pixels and surrounding high-grayscale pixels, indicating a greater disparity in grayscale values ​​between edge pixels and pixels in the target area. In order to include as few edge pixels as possible within the target area, a larger high threshold value should be used when subsequently dividing the grayscale value interval.

[0078] Finally, the average grayscale value of the special pixel is adjusted using the first correction parameter and the second correction parameter to obtain the first threshold and the second threshold respectively. The specific calculation method is:

[0079]

[0080] Wherein, T1 represents the first threshold; T2 represents the second threshold; N represents the number of special pixels in the infrared image of the exterior wall; F q represents the gray value of the qth special pixel in the infrared image of the exterior wall; n1 represents the first correction parameter; n2 represents the second correction parameter.

[0081] Since some grayscale values ​​of edge pixels are close to those of target pixels and some background pixels, in order to ensure the accuracy of threshold setting, the threshold is adjusted using the first correction parameter and the second correction parameter to obtain the first threshold and the second threshold.

[0082] So far, the first threshold and the second threshold are obtained through the above method.

[0083] The image enhancement module is used to segment the exterior wall infrared image using the first threshold and the second threshold, and perform grayscale enhancement to obtain a corresponding enhanced image.

[0084] It should be noted that after obtaining the first threshold and the second threshold, the first threshold and the second threshold are used in combination with the grayscale distribution histogram of the exterior wall infrared image to divide the exterior wall infrared image and perform grayscale enhancement to obtain an enhanced image of the exterior wall infrared image to reduce background noise interference.

[0085] Specifically, first, the grayscale in the grayscale distribution histogram of the exterior wall infrared image is divided into three intervals, namely, the interval [0, T1), the interval [T1, T2), and the interval [T2, 255]. The connected domain areas formed by the pixel points whose grayscale values ​​in the exterior wall infrared image are in the interval [0, T1), the interval [T1, T2), and the interval [T2, 255] are recorded as the first area, the second area, and the third area, respectively.

[0086] It should be noted that the first region, the second region, and the third region contain features of different importance. Different weights need to be set during fusion to give different expectations to the target region and background region to be processed.

[0087] Then, the number of all pixels contained in the first region, the second region, and the third region is obtained, and recorded as the number s1, the number s2, and the number s3 respectively. The frequency cumulative values ​​of all grayscale values ​​corresponding to the first region, the second region, and the third region in the interval [0, T1), the interval [T1, T2), and the interval [T2, 255] in the grayscale distribution histogram are obtained and recorded as parameters a1, parameter a2, and parameter a3 respectively. The number s1, the number s2, and the number s3 are arranged in ascending order, and the parameters a1, parameter a2, and parameter a3 are arranged. During the arrangement process, the correspondence between the number s1, the number s2, the number s3 and the parameters a1, parameter a2, and parameter a3 is maintained. The sequence after the arrangement of the parameters a1, parameter a2, and parameter a3 is recorded as a parameter sequence. The first element, the second element, and the third element in the parameter sequence are used as weights k1, k2, and k3 respectively, which are used to subsequently adjust the grayscale values ​​of the pixels in different regions to achieve image enhancement.

[0088] It should be noted that the first area, interval [0, T1), quantity s1 and parameter a1 correspond to each other; similarly, the second area, interval [T1, T2), quantity s2 and parameter a2 correspond to each other; the third area, interval [T2, 255], quantity s3 and parameter a3 correspond to each other.

[0089] Finally, the weights k1, k2, and k3 are used to enhance the infrared image of the exterior wall. The weight k1 is multiplied by the grayscale values ​​of all pixels in the first area to obtain the enhanced first area, the weight k2 is multiplied by the grayscale values ​​of all pixels in the second area to obtain the enhanced second area, and the weight k3 is multiplied by the grayscale values ​​of all pixels in the third area to obtain the enhanced third area. The enhanced first area, the enhanced second area, and the enhanced third area form an enhanced image of the infrared image of the exterior wall.

[0090] It should be noted that the third area is the most important because it contains the defect features of the building's exterior wall. The second area corresponds to the edge information in the image and also contains some features, so it is less important. The first area corresponds to the background information in the infrared image of the exterior wall, and most of the information it contains is noise information, so it is the least important.

[0091] At this point, the enhanced image of the exterior wall infrared image is obtained through the above method.

[0092] The image processing module is used to perform defect detection with the aid of enhanced image of the exterior wall infrared image.

[0093] It should be noted that the enhanced image is obtained by performing grayscale transformation processing on different regions of the exterior wall infrared image using the first and second thresholds. The enhanced image improves the gradient of the edges corresponding to the missing parts of the exterior wall infrared image and reduces the noise information in the background of the exterior wall infrared image.

[0094] The Canny edge detection algorithm is used to perform edge detection on the enhanced image of the exterior wall infrared image to obtain the edge detection result in the enhanced image.

[0095] At the same time, the Canny edge detection algorithm is used to perform edge detection on the lossless exterior wall infrared image to obtain lossless edge detection results that can be used as a comparison standard.

[0096] Furthermore, the edge detection results in the enhanced image are compared with the lossless edge detection results, and the edge lines that exist in the edge detection results in the enhanced image but do not exist in the lossless edge detection results are recorded as exterior wall defect edge lines. The exterior wall defect edge lines are visually marked to complete the defect detection of the building exterior wall.

[0097] It should be noted that Canny edge detection is accurate and stable and can effectively detect edge information in enhanced images. Therefore, Canny edge detection is used to detect exterior wall defects in enhanced images, and targeted maintenance is subsequently performed based on the detected defect areas.

[0098] It should be noted that the Chinese name of the Canny edge detection algorithm is the Canny edge detection algorithm. Since the Canny edge detection algorithm is an existing algorithm, it will not be described in detail in this embodiment.

[0099] At this point, this embodiment is completed.

[0100] It should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the scope of protection of the present application.

[0101] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments.

Claims

1. UAV image processing system for building inspection, characterized by: The system includes the following modules: An image acquisition module is used to acquire an infrared image of an exterior wall and a corresponding grayscale distribution histogram; An adaptive threshold module is used to obtain the primary gradient and secondary gradient of any pixel in the exterior wall infrared image based on the difference in grayscale values ​​between pixels in windows of different sizes; obtain special pixels in the exterior wall infrared image based on the magnitudes of the primary and secondary gradients; and obtain first and second correction parameters of the exterior wall infrared image based on the grayscale value differences between all special pixels in the exterior wall infrared image and pixels of different grayscale values ​​in the neighborhood; and adjust the average grayscale value of the special pixels using the first and second correction parameters to obtain first and second thresholds, respectively. An image enhancement module is configured to divide a grayscale distribution histogram of the exterior wall infrared image into a plurality of intervals using a first threshold and a second threshold, and obtain a first region, a second region, and a third region of the exterior wall infrared image based on regions formed by corresponding pixels in the exterior wall infrared image according to the grayscale values ​​contained in each of the plurality of intervals; and to adjust the grayscale values ​​of the pixels in the first region, the second region, and the third region using the number of pixels in the first region, the second region, and the third region and the grayscale values ​​contained in each of the plurality of intervals to obtain an enhanced image of the exterior wall infrared image. The image processing module is used to perform defect detection with the aid of enhanced image of the exterior wall infrared image.

2. The drone image processing system for building inspection according to claim 1, characterized in that: The method of obtaining the primary gradient and secondary gradient of any pixel in the infrared image of the exterior wall based on the difference in grayscale values ​​between pixels in windows of different sizes includes the following specific methods: First, obtain the first-level neighboring pixel points and second-level neighboring pixel points of any pixel point, and one first-level neighboring pixel point corresponds to one second-level neighboring pixel point; Then, the sum of the grayscale values ​​of all the first-level neighboring pixels of any pixel is recorded as the first value, and the absolute value of the difference between the grayscale value 8 times the first value of the pixel corresponding to the center point of the first-level window is recorded as the first-level gradient of the pixel; Finally, the absolute value of the difference between the grayscale values ​​of the first-level neighborhood pixel and the corresponding second-level neighborhood pixel is recorded as the second value; the accumulated value of all second values ​​in the second-level window is recorded as the secondary gradient of the pixel corresponding to the center point.

3. The drone image processing system for building inspection according to claim 2, characterized in that: The specific method for obtaining the first-level neighborhood pixel points and the second-level neighborhood pixel points is: Construct a 3×3 window as the first-level window, and take any pixel as the center point of the first-level window. In the first-level window, the pixels within the 8-neighborhood range of the center point are recorded as the first-level neighborhood pixels of the center point. The directions corresponding to the first-level neighboring pixels are obtained and recorded as the neighboring directions, namely 0°, 45°, 90°, 135°, 180°, 225°, 270° and 315° respectively. A window of size 5×5 is constructed and recorded as the second-level window. Any pixel is taken as the center point of the second-level window, and the pixels in the second-level window with a distance of 2 from the center point and located in the neighborhood direction are recorded as the second-level neighboring pixels of the center point.

4. The drone image processing system for building inspection according to claim 1, characterized in that: The method of obtaining special pixels in the exterior wall infrared image according to the magnitude of the primary gradient and the secondary gradient, and obtaining the first correction parameter and the second correction parameter of the exterior wall infrared image according to the gray value differences between all special pixels in the exterior wall infrared image and pixels of different gray value magnitudes in the neighborhood range is as follows: First, the first-order gradient mean w1 and the second-order gradient mean w2 of all pixels in the exterior wall infrared image are obtained, and the pixels whose first-order gradient is less than the mean w1 and whose second-order gradient is greater than the mean w2 in the exterior wall infrared image are marked as special pixels; The pixels whose grayscale values ​​within the 8-neighborhood range of any special pixel are smaller than that of the special pixel are recorded as the first neighboring pixels of the special pixel, and the pixels whose grayscale values ​​within the 8-neighborhood range of any special pixel are greater than or equal to the grayscale value of the special pixel are recorded as the second neighboring pixels of the special pixel; Then, a first correction factor and a second correction factor are obtained according to the differences between the special pixel and the first neighborhood pixel and the second neighborhood pixel respectively; Finally, the average value of the first correction factors of all special pixels in the exterior wall infrared image is recorded as the first correction parameter of the exterior wall infrared image; The average value of the second correction factors of all special pixel points in the exterior wall infrared image is recorded as the second correction parameter of the exterior wall infrared image.

5. The drone image processing system for building inspection according to claim 4, characterized in that: The specific method for obtaining the first correction factor and the second correction factor is: The grayscale value difference between the special pixel and any corresponding first neighborhood pixel is recorded as the first factor of the special pixel, and the average value of all first factors of any special pixel is recorded as the first correction factor of the special pixel; The grayscale value difference between any second neighboring pixel of any special pixel and the special pixel is recorded as the second factor of the special pixel, and the average value of all second factors of the special pixel is recorded as the second correction factor.

6. The drone image processing system for building inspection according to claim 1, characterized in that: The method of adjusting the average grayscale value of the special pixel point by using the first correction parameter and the second correction parameter to obtain the first threshold value and the second threshold value respectively includes the following specific methods: The specific calculation method of the first threshold and the second threshold is: Wherein, T1 represents the first threshold; T2 represents the second threshold; N represents the number of special pixels in the infrared image of the exterior wall; F q represents the gray value of the qth special pixel in the infrared image of the exterior wall; n1 represents the first correction parameter; n2 represents the second correction parameter.

7. The drone image processing system for building inspection according to claim 1, characterized in that: The grayscale distribution histogram of the exterior wall infrared image is divided into multiple intervals by the first threshold and the second threshold, and the first area, the second area, and the third area of ​​the exterior wall infrared image are obtained according to the areas formed by the corresponding pixels in the exterior wall infrared image of the grayscale values ​​contained in each of the multiple intervals, including the following specific methods: The grayscale in the grayscale distribution histogram of the exterior wall infrared image is divided into three intervals, namely, the interval [0, T1), the interval [T1, T2), and the interval [T2, 255]. The areas formed by all the pixels whose grayscale values ​​in the exterior wall infrared image are in the interval [0, T1), the interval [T1, T2), and the interval [T2, 255] are recorded as the first area, the second area, and the third area, respectively.

8. The drone image processing system for building inspection according to claim 1, characterized in that: The method of adjusting the grayscale values ​​of the pixels in the first area, the second area, and the third area by using the number of pixels in the first area, the second area, and the third area and the grayscale values ​​in each of the multiple intervals to obtain an enhanced image of the infrared image of the exterior wall includes the following specific methods: First, according to the number of pixels in the first area, the second area, and the third area and the grayscale values ​​contained in each of the multiple intervals, a weight k1, a weight k2, and a weight k3 are obtained; Then, the weight k1 is multiplied by the grayscale values ​​of all pixels in the first area to obtain the enhanced first area, the weight k2 is multiplied by the grayscale values ​​of all pixels in the second area to obtain the enhanced second area, and the weight k3 is multiplied by the grayscale values ​​of all pixels in the third area to obtain the enhanced third area. The enhanced first area, the enhanced second area, and the enhanced third area form an enhanced image of the exterior wall infrared image.

9. The drone image processing system for building inspection according to claim 8, characterized in that: The specific method for obtaining the weights k1, k2, and k3 is as follows: Obtain the number of pixels contained in the first region, the second region, and the third region, respectively, and record them as number s1, number s2, and number s3. Obtain the frequency accumulation values ​​of all grayscale values ​​corresponding to the first region, the second region, and the third region in the interval [0, T1), the interval [T1, T2), and the interval [T2, 255] in the grayscale distribution histogram, respectively, and record them as parameter a1, parameter a2, and parameter a3; Arrange the quantity s1, the quantity s2, and the quantity s3 in ascending order, and arrange the parameters a1, the parameter a2, and the parameter a3. During the arrangement process, the correspondence between the quantity s1, the quantity s2, the quantity s3 and the parameters a1, the parameter a2, and the parameter a3 is maintained. The sequence after the arrangement of the parameters a1, the parameter a2, and the parameter a3 is recorded as the parameter sequence. The first element, the second element, and the third element in the parameter sequence are used as the weights k1, k2, and k3, respectively.

10. The drone image processing system for building inspection according to claim 1, characterized in that: The specific method for detecting exterior wall defects using an enhanced image of an exterior wall infrared image includes: The Canny edge detection algorithm is used to perform edge detection on the enhanced image of the exterior wall infrared image to obtain the edge detection result in the enhanced image; The Canny edge detection algorithm is used to detect the edges of the non-destructive infrared image of the exterior wall, and the non-destructive edge detection results that can be used as a comparison standard are obtained; The edge detection results in the enhanced image are compared with the lossless edge detection results, and the edge lines that exist in the edge detection results in the enhanced image but not in the lossless edge detection results are recorded as defective edge lines of the exterior wall, and the defective edge lines of the exterior wall are visually marked.

Citation Information

Patent Citations

  • Gradient minimization infrared image edge preserving denoising method

    CN109584174A

  • Automatic lung bronchus segmentation method and system based on CT image

    CN114419077A