Unmanned aerial vehicle image processing system for building detection
By adopting adaptive threshold module and image enhancement technology in the drone image processing system, the problem of infrared image noise interference is solved and the accuracy of building exterior wall defect detection is improved.
Patent Information
- Application Number
- CN202411655569.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-19
AI Technical Summary
In building inspection, existing drone image processing systems have high infrared image noise due to factors such as electromagnetic interference. Conventional edge detection algorithms are difficult to accurately detect defects in building exterior walls, which affects the accuracy of the detection results.
The adaptive threshold module is used to obtain special pixel points based on the primary and secondary gradients of the pixel points, and the first correction parameter and the second correction parameter are calculated through the difference in the grayscale value of these pixel points, and the average grayscale value of the special pixel points is adjusted to obtain the first threshold value and the second threshold value. Then, these thresholds are used to divide the grayscale distribution histogram of the infrared image, image enhancement is performed, and defect detection is finally performed through the Canny edge detection algorithm.
Image enhancement processing reduces the impact of noise signals on detection results and improves the accuracy of building exterior wall defect detection.
Smart Images

Figure CN119579451A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image data processing technology, and in particular to an unmanned aerial vehicle image processing system for building inspection. Background Art
[0002] With the continuous development of drone image processing technology and the continuous reduction of costs, building exterior wall inspection has gradually become one of the key applications of drone image processing in the construction industry. By collecting building exterior wall images through drones and using image processing and analysis algorithms, structural problems such as defects and cracks in building exterior walls can be quickly and accurately detected, saving time and human resources to discover 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 building exterior walls are usually used to analyze the loss of building exterior walls. However, due to factors such as electromagnetic interference between drones and infrared cameras, noise appears in the acquired infrared images. When using conventional edge detection algorithms to inspect building exterior walls, it is easy to interfere with the detection results and affect the accuracy of the detection results. Summary of the invention
[0004] The present 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] An embodiment of the present application provides a drone image processing system for building inspection, the system comprising 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] The adaptive threshold module is used to obtain the primary gradient and secondary gradient of any pixel point in the external wall infrared image according to the difference in grayscale values between pixel points in windows of different sizes; obtain the special pixel point in the external wall infrared image according to the size of the primary gradient and the secondary gradient, and obtain the first correction parameter and the second correction parameter of the external wall infrared image according to the grayscale value difference between all special pixel points in the external wall infrared image and pixel points of different grayscale values in the neighborhood; adjust 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;
[0009] An image enhancement module is used to divide the grayscale distribution histogram of the external wall infrared image by a first threshold and a second threshold to obtain a plurality of intervals, and obtain a first area, a second area, and a third area of the external wall infrared image according to areas formed by corresponding pixel points in the external wall infrared image according to the grayscale values contained in each of the plurality of intervals; and adjust the grayscale values of the pixel points in the first area, the second area, and the third area by using the number of pixel points in the first area, the second area, and the third area and the grayscale values contained in each of the plurality of intervals to obtain an enhanced image of the external wall infrared image;
[0010] The image processing module is used for defect detection with the aid of enhanced image of the exterior wall infrared image.
[0011] Preferably, the method of obtaining the primary gradient and the 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, the first-level neighboring pixel points and the second-level neighboring pixel points of any pixel point are obtained, 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 8-fold grayscale value of the pixel corresponding to the center point of the first-level window and the first value is recorded as the first-level gradient of the pixel;
[0014] Finally, the absolute value of the difference between the grayscale values of the primary neighborhood pixel and the corresponding secondary neighborhood pixel is recorded as the second value; the accumulated value of all second values in the secondary window is recorded as the secondary gradient of the pixel corresponding to the center point.
[0015] Preferably, the specific method for obtaining the primary neighborhood pixel points and the secondary neighborhood pixel points is:
[0016] 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;
[0017] The direction corresponding to any pixel point and the first-level neighborhood pixel point is obtained and recorded as the neighborhood direction, which are 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 point is taken as the center point of the second-level window, and the pixel points in the second-level window whose distance from the center point is 2 and located in the neighborhood direction are recorded as the second-level neighborhood pixel points of the center point.
[0018] Preferably, the special pixel points in the exterior wall infrared image are obtained according to the magnitudes of the primary gradient and the secondary gradient, and the first correction parameter and the second correction parameter of the exterior wall infrared image are respectively obtained according to the gray value differences between all the special pixel points in the exterior wall infrared image and the pixel points with different gray value magnitudes in the neighborhood, including the specific method as follows:
[0019] First, the primary gradient mean w1 and the secondary gradient mean w2 of all pixels in the exterior wall infrared image are obtained, and the pixels whose primary gradient is less than the mean w1 and whose secondary gradient is greater than the mean w2 in the exterior wall infrared image are recorded as special pixels;
[0020] The pixels whose grayscale values in the 8-neighborhood range of any special pixel are smaller than the special pixel are recorded as the first neighboring pixels of the special pixel, and the pixels whose grayscale values in 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 difference 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 gray 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 gray 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 gray 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:
[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 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 pixel points in the exterior wall infrared image according to the grayscale values contained in each of the plurality of intervals. The specific method includes:
[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 using 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 to adjust the grayscale values of the pixels in the first area, the second area and the third area to obtain an enhanced image of the infrared image of the exterior wall 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 area, the second area and the third area, respectively recorded as number s1, number s2 and number s3, obtain the frequency accumulation values of all gray values corresponding to the first area, the second area and the third area in the interval [0, T1), the interval [T1, T2) and the interval [T2, 255] in the gray distribution histogram, respectively recorded as parameter a1, parameter a2 and parameter a3;
[0037] Arrange quantity s1, quantity s2, and quantity s3 in ascending order, and arrange parameters a1, parameter a2, and parameter a3. During the arrangement process, the corresponding relationship between quantity s1, quantity s2, quantity s3 and parameters a1, parameter a2, parameter a3 is maintained. The sequence after the arrangement of 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, weights k2, and weights k3, respectively.
[0038] Preferably, the method for detecting exterior wall defects by using an enhanced image of an exterior wall infrared image comprises:
[0039] The Canny edge detection algorithm is used to perform edge detection on the enhanced image of the exterior wall infrared image, and the edge detection result in the enhanced image is obtained;
[0040] The Canny edge detection algorithm is used to detect the edge of the non-destructive infrared image of the exterior wall, and the non-destructive edge detection result that can be used as a comparison standard is obtained;
[0041] The edge detection result in the enhanced image is compared with the lossless edge detection result, and the edge lines that exist in the edge detection result in the enhanced image but do not exist in the lossless edge detection result are recorded as defective edge lines of the exterior wall, and the defective edge lines of the exterior wall are visually annotated.
[0042] The beneficial effects of the technical solution of the present application are: obtaining the primary gradient and secondary gradient of the pixel by analyzing the gray value difference between adjacent pixel points in the infrared image of the exterior wall, obtaining the special pixel point according to the size of the primary gradient and the secondary gradient, further obtaining the first correction parameter and the second correction parameter by the difference between the special pixel point and the adjacent pixel points, adjusting the average gray value of the special pixel point by using the first correction parameter and the second correction parameter to obtain the first threshold and the second threshold respectively, further using the first threshold and the second threshold to perform grayscale enhancement on different areas of the infrared image of the exterior wall to obtain the corresponding enhanced image; performing exterior wall defect detection by using the enhanced image, improving the image enhancement effect by adjusting the gray value of different areas in the image, greatly reducing the influence of the noise signal in the infrared image of the exterior wall on the detection result, and improving the accuracy of the exterior wall defect detection result. 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying 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] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the specific implementation, structure, features and effects of the drone image processing system for building inspection proposed in the present application are described in detail below in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[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 scheme of the drone image processing system for building inspection provided by the present 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 an embodiment of the present application, the system includes the following modules:
[0049] The image acquisition module is used to acquire the exterior wall infrared image and the corresponding grayscale distribution histogram.
[0050] In this application, when a drone detects a building's exterior wall, the infrared image of the building's exterior wall collected will be interfered by noise, resulting in low accuracy of the detection result when the infrared image is directly detected. Therefore, in this application, it is considered to enhance the collected infrared image to eliminate noise interference, and then perform detection based on the enhanced image.
[0051] Specifically, in the embodiment of the present application, it is first necessary to collect an infrared image of the building exterior wall, and 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 an 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] So far, 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 the exterior wall of a building is defective, the grayscale distribution histogram of the exterior wall infrared image usually shows a double peak, where the peak with the highest frequency is the main peak, and the peak with the second highest frequency is the secondary peak. The main peak may contain background noise, while the secondary peak contains edge information of the defective area. Therefore, it is considered to obtain two thresholds based on the grayscale value difference between the pixel point in the exterior wall infrared image and other pixel points in the neighborhood range, and separate the grayscale values of the defective area and the background noise area in the exterior wall infrared image, so as to adjust the grayscale values in different areas, suppress noise points and enhance 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 neighborhood 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; according to the gray value difference between the pixel point and the pixels within the 8-neighborhood range, the first-level gradient of any pixel point in the infrared image of the exterior wall is obtained. The specific calculation method is:
[0060]
[0061] Among them, G1 represents the primary gradient of the pixel; p represents the gray value of the pixel, n represents the number of primary 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 arbitrary pixel point and the first-level neighborhood 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 the second-level window. An arbitrary pixel point is taken as the center point of the 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 gray 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:
[0063]
[0064] Among them, G2 represents the secondary gradient of the pixel point; p i represents the gray value of the i-th primary neighboring pixel within the 8-neighborhood of the pixel; p i ′ Represents the grayscale value of the i-th secondary neighborhood pixel.
[0065] Step (2) requires explanation 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 obviously 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, so as 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 secondary gradient is used to distinguish the edge pixels and non-edge pixels in the exterior wall infrared image.
[0067] Firstly, 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 recorded as special pixels; the pixels whose grayscale value within the 8-neighborhood range of any special pixel 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 in the image and other pixels within the 8-neighborhood range of the noise point, the first-order gradient value generated by the noise point in the exterior wall infrared image is large, 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 gray 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 gray value of the pth first neighboring pixel of the qth special pixel, r q represents the number of first neighboring 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 the corresponding first neighborhood pixels. The first correction parameter reflects the difference in grayscale values between all special pixels and the corresponding first neighborhood pixels in the exterior wall infrared image. The larger the value of the first correction parameter is, the greater the difference in grayscale values between edge pixels and surrounding low-grayscale pixels in the image is, indicating that the greater the difference in grayscale values between edge pixels and pixels in the background part of the exterior wall infrared image is. In order to retain as many edge pixels as possible, the lower threshold should be smaller when the grayscale value interval is divided later.
[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, 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; according to the difference between the grayscale values of the special pixel and the neighboring pixels, the second correction parameter of the exterior wall infrared image is obtained, and the specific calculation method is as follows:
[0075]
[0076] Wherein, n2 represents the second correction parameter; p qw represents the gray value of the wth second neighboring pixel of the qth special pixel; F 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 neighboring 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 indicates the average difference between the special pixel and the second neighboring pixel in its eight neighborhoods. The second correction parameter reflects the difference between all special pixels and the second neighboring pixels in the infrared image of the exterior wall. The larger the value of n2, the greater the difference in grayscale value between the edge pixel and the surrounding high grayscale pixel, indicating that the grayscale value difference between the edge pixel and the target area pixel is greater. In order to include as few edge pixels as possible in the target area, the corresponding high threshold value should be larger in the subsequent grayscale value interval division.
[0078] Finally, the average gray 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 the grayscale values of target pixels and some background pixels, in order to ensure the accuracy of threshold setting, the threshold is adjusted by 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 external 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 combined 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, and different weights need to be set during fusion to give different expectations to the target region and the background region to be processed.
[0087] Then, the number of all pixels contained in the first area, the second area and the third area is obtained, which are recorded as the number s1, the number s2 and the number s3 respectively; the frequency accumulation values of all gray values corresponding to the first area, the second area and the third area in the interval [0, T1), the interval [T1, T2) and the interval [T2, 255] corresponding to the gray distribution histogram are obtained, and are recorded as parameters a1, parameter a2 and parameter a3 respectively; the number s1, the number s2 and the number s3 are arranged in order from small to large, and the parameters a1, parameter a2 and parameter a3 are arranged, and the corresponding relationship between the number s1, the number s2, the number s3 and the parameters a1, parameter a2 and parameter a3 is maintained during the arrangement process; the sequence after the parameters a1, parameter a2 and parameter a3 are arranged 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, weight k2 and weight k3 respectively, which are used to subsequently adjust the gray values of pixels in different areas 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 defective 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 second in importance. 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] So far, the enhanced image of the exterior wall infrared image is obtained through the above method.
[0092] The image processing module is used for defect detection with the aid of enhanced image of the exterior wall infrared image.
[0093] It should be noted that the grayscale transformation processing is performed on different areas of the external wall infrared image by the first threshold and the second threshold to obtain an enhanced image. The enhanced image increases the gradient of the edge corresponding to the defective part in the external wall infrared image and weakens the noise information of the background part in the external 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 defective edge lines of the exterior wall. The defective edge lines of the exterior wall are visually annotated to complete the defect detection of the exterior wall of the building.
[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 defective 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, this embodiment will not be described in detail.
[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 protection scope 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 referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. UAV image processing system for building inspection, characterized in that: 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; The adaptive threshold module is used to obtain the primary gradient and secondary gradient of any pixel point in the external wall infrared image according to the difference in grayscale values between pixel points in windows of different sizes; obtain the special pixel point in the external wall infrared image according to the size of the primary gradient and the secondary gradient, and obtain the first correction parameter and the second correction parameter of the external wall infrared image according to the grayscale value difference between all special pixel points in the external wall infrared image and pixel points of different grayscale values in the neighborhood; adjust 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; An image enhancement module is used to divide the grayscale distribution histogram of the external wall infrared image by a first threshold and a second threshold to obtain a plurality of intervals, and obtain a first area, a second area, and a third area of the external wall infrared image according to areas formed by corresponding pixel points in the external wall infrared image according to the grayscale values contained in each of the plurality of intervals; and adjust the grayscale values of the pixel points in the first area, the second area, and the third area by using the number of pixel points in the first area, the second area, and the third area and the grayscale values contained in each of the plurality of intervals to obtain an enhanced image of the external wall infrared image; The image processing module is used for 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 according to the difference in grayscale values between pixels in windows of different sizes includes: First, the first-level neighboring pixel points and the second-level neighboring pixel points of any pixel point are obtained, 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 8-fold grayscale value of the pixel corresponding to the center point of the first-level window and the first value is recorded as the first-level gradient of the pixel; Finally, the absolute value of the difference between the grayscale values of the primary neighborhood pixel and the corresponding secondary neighborhood pixel is recorded as the second value; the accumulated value of all second values in the secondary 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: 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; The direction corresponding to any pixel point and the first-level neighborhood pixel point is obtained and recorded as the neighborhood direction, which are 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 point is taken as the center point of the second-level window, and the pixel points in the second-level window whose distance from the center point is 2 and located in the neighborhood direction are recorded as the second-level neighborhood pixel points of the center point.
4. The drone image processing system for building inspection according to claim 1, characterized in that: The specific method of obtaining the special pixel points 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 difference between all the special pixel points in the exterior wall infrared image and the pixel points with different gray value magnitudes in the neighborhood range is as follows: First, the primary gradient mean w1 and the secondary gradient mean w2 of all pixels in the exterior wall infrared image are obtained, and the pixels whose primary gradient is less than the mean w1 and whose secondary gradient is greater than the mean w2 in the exterior wall infrared image are recorded as special pixels; The pixels whose grayscale values in the 8-neighborhood range of any special pixel are smaller than the special pixel are recorded as the first neighboring pixels of the special pixel, and the pixels whose grayscale values in 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 difference 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 gray 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 gray 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 gray 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 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 pixel points in the exterior wall infrared image according to the grayscale values contained in each of the multiple intervals, including: 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 using 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 to adjust the grayscale values of the pixels in the first area, the second area and the third area 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 area, the second area and the third area, respectively recorded as number s1, number s2 and number s3, obtain the frequency accumulation values of all gray values corresponding to the first area, the second area and the third area in the interval [0, T1), the interval [T1, T2) and the interval [T2, 255] in the gray distribution histogram, respectively recorded as parameter a1, parameter a2 and parameter a3; Arrange quantity s1, quantity s2, and quantity s3 in ascending order, and arrange parameters a1, parameter a2, and parameter a3. During the arrangement process, the correspondence between quantity s1, quantity s2, quantity s3 and parameters a1, parameter a2, parameter a3 is maintained. The sequence after the arrangement of 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, weights k2, and weights 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 by 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, and the edge detection result in the enhanced image is obtained; The Canny edge detection algorithm is used to detect the edge of the non-destructive infrared image of the exterior wall, and the non-destructive edge detection result that can be used as a comparison standard is obtained; The edge detection result in the enhanced image is compared with the lossless edge detection result, and the edge lines that exist in the edge detection result in the enhanced image but do not exist in the lossless edge detection result are recorded as defective edge lines of the exterior wall, and the defective edge lines of the exterior wall are visually annotated.
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
Motor rubber shock pad quality detection method based on image processing
CN116385439A
Ultrasound image enhancement and speckle mitigation method
US20070065009A1
Cited By
Image enhancement method and device, electronic equipment and computer readable storage medium
CN120259091A