A method for detecting the construction quality of curtain walls
By defogging the curtain wall images, using dark channel images and pre-trained quality detection models, the problem of fog-affected curtain wall images acquired by the drone is solved, and accurate detection of curtain wall quality is achieved.
Patent Information
- Application Number
- CN202510472202.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-04-16
AI Technical Summary
The curtain wall images obtained by drones in the prior art may be affected by environmental fog, making it difficult to obtain accurate detection results for curtain wall quality.
By obtaining the visible light image of the curtain wall to be tested, the reference pixel points within its neighborhood range is determined for the target pixel points, and the target dark channel value of the target pixel points is calculated based on the initial dark channel value and reference value coefficient of these reference pixel points, the target dark channel value of the target pixel points is formed, and the fog removal process is performed. Finally, the processed image is input into the pre-trained quality detection model to obtain the quality detection results of the curtain wall.
The target image obtained after defogging treatment can more accurately detect the construction quality of the curtain wall, avoiding the impact of fog on the detection results.
Smart Images

Figure CN119991673B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of image data processing, and particularly to a method for detecting the construction quality of curtain walls. Background Art
[0002] A curtain wall, also known as an exterior wall cladding or building curtain wall, is usually suspended on the structural framework of a building. The main functions of the curtain wall are to serve as the building's enclosure structure and, at the same time, provide effects such as heat insulation, waterproofing, fire protection, sound insulation, and aesthetics for the building; defects such as broken glass panels, damaged sealants, uneven sealant joints, and deformed frames may occur in the completed curtain wall. These defects not only affect the appearance quality of the curtain wall but also may threaten the structural strength or heat insulation performance of the curtain wall. Therefore, it is necessary to detect the quality of the completed curtain wall.
[0003] To achieve the quality detection of curtain walls, in the Chinese patent application document with the publication number CN114326794A, a method for identifying curtain wall defects is provided, including: when receiving a detection command, obtaining the environmental information around the target building; determining the target detection path and shooting parameters corresponding to the target building according to the environmental information; generating a flight command according to the target detection path and shooting parameters, and sending the flight command to the unmanned aerial vehicle (UAV); controlling the UAV to fly according to the target detection path through the flight command, and controlling the shooting device of the UAV to perform shooting actions according to the shooting parameters. After the UAV captures the curtain wall image data, the curtain wall image data is sent to the server so that the server determines the curtain wall defects according to the curtain wall image data.
[0004] In the related art, the detection of curtain wall defects is mainly achieved through the image data of the curtain wall obtained by the UAV. However, the images obtained by the UAV may be affected by fog in the environment. When directly using the fog-affected images for curtain wall defect detection, it is difficult to obtain a relatively accurate detection result of the curtain wall quality. Summary of the Invention
[0005] To overcome the problem in the related art that it is difficult to obtain relatively accurate detection results for the quality of curtain walls, the present application provides a method for detecting the construction quality of curtain walls, including: obtaining a visible light image of the curtain wall to be measured, and for the target pixel points in the visible light image, taking other pixel points within the neighborhood range of the target pixel points as the reference pixel points of the target pixel points; determining the reference value coefficient of the reference pixel points of the target pixel points relative to the target pixel points; the reference value coefficient is at least used to characterize the probability that the reference pixel points belong to non-noise pixel points; obtaining the target dark channel value of the target pixel points according to the initial dark channel values of the reference pixel points within the neighborhood range of the target pixel points and the reference value coefficient, so as to obtain a dark channel image composed of the target dark channel values of different pixel points; using the dark channel image to perform defogging processing on the visible light image to obtain a target image, and inputting the target image into a pre-trained quality detection model to obtain the quality detection result of the curtain wall to be measured; the quality detection model is used to output the quality detection result of the curtain wall to be measured.
[0006] In this way, the reference value coefficient is at least used to characterize the probability that the reference pixel points belong to non-noise pixel points. According to the initial dark channel values of the reference pixel points within the neighborhood range of the target pixel points and the reference value coefficient, it is possible to better realize defogging processing of the visible light image of the curtain wall to obtain a target image. Therefore, a more accurate quality detection result of the curtain wall to be measured can be obtained by using the target image.
[0007] Optionally, the reference value coefficient of the reference pixel points is determined in the following manner: , where Q is the reference value coefficient of the reference pixel point, exp is the exponential function with the natural constant as the base, R is the noise probability value of the reference pixel point, N is the number of channels of the visible light image, is the pixel value of the reference pixel point in the nth channel, is the average value of the pixel values of the pixel points within the neighborhood range of the target pixel point in the nth channel, and C is the complexity value of the neighborhood range of the reference pixel point.
[0008] In this way, since the complexity of the pixel points within the neighborhood range of the pixel points affected by noise is higher, the reference value coefficient obtained through the noise probability value and the complexity value of the reference pixel points can better reflect the probability that the reference pixel points belong to non-noise pixel points, thereby characterizing the contribution degree of the reference pixel points relative to the target pixel points.
[0009] Optionally, the complexity value of the neighborhood range of the reference pixel points is determined in the following manner: , C is the complexity value of the neighborhood range of the reference pixel point, T is the number of pixel points within the neighborhood range of the reference pixel point, is the proportion of the frequency of occurrence of the t-th eigenvalue in the set of eigenvalues within the neighborhood range of the corresponding reference pixel point, and ln is the logarithmic function with the natural constant as the base; the eigenvalue of a pixel point is equal to the average of the variances of the pixel values of the pixel points within the neighborhood range of the same pixel point in all channels.
[0010] In this way, when the types or proportions of pixel values within the neighborhood range of a pixel point are more diverse, the complexity of the neighborhood range of the pixel point is higher. Therefore, by considering the difference in the proportion of the frequency of occurrence of the eigenvalues of the pixel points within the neighborhood range of the reference pixel point, the complexity value can better characterize the complexity of the neighborhood range of the reference pixel point.
[0011] Optionally, the noise probability value of the reference pixel point is determined by the following method: , is the noise probability value of the i-th reference pixel point within the neighborhood range of the target pixel point, norm is the normalization function, is the gray value of the target pixel point, is the gray value of the i-th reference pixel point within the neighborhood range of the target pixel point, is the average gray value of the other pixel points within the neighborhood range of the target pixel point except the i-th reference pixel point, is to take the absolute value.
[0012] Optionally, obtaining the target dark channel value of the target pixel point according to the initial dark channel value and the reference value coefficient of the reference pixel points within the neighborhood range of the target pixel point includes: , D is the target dark channel value of the target pixel point, M is the number of reference pixel points within the neighborhood range of the target pixel point, is the reference value coefficient of the i-th reference pixel point within the neighborhood range of the target pixel point, is the initial dark channel value of the i-th reference pixel point within the neighborhood range of the target pixel point; the initial dark channel value of a pixel point is the minimum value of the pixel values of the pixel point in all channels.
[0013] In this way, by weighted summing the initial dark channel values of the reference pixel points using the reference value coefficients of the reference pixel points, the contribution of the initial dark channel value of the reference pixel point to the target dark channel value of the target pixel point can be adaptively determined according to the reference value coefficient of the reference pixel point.
[0014] Optionally, using the dark channel image to perform defogging processing on the visible light image to obtain the target image includes: determining multiple candidate pixel points with the largest pixel values from the dark channel image, and taking the largest value among the brightness values of the corresponding pixel points of the candidate pixel points in the visible light image as the atmospheric light value; using the dark channel defogging algorithm and the atmospheric light value to perform defogging processing on the visible light image to obtain the target image.
[0015] Optionally, the visible light image is dehazed to obtain a target image by using the dark channel dehazing algorithm and the atmospheric light value, including: determining the transmittance map corresponding to the visible light image by using the determination step of the pixel points in the transmittance map in the dark channel dehazing algorithm and the atmospheric light value, so as to obtain the target image by using the transmittance map; , where J is the pixel value of the target pixel point in the target image, E is the pixel value of the target pixel point in the visible light image, F is the atmospheric light value, and g is the pixel value of the target pixel point in the transmittance map.
[0016] In this way, by using the pixel value of the target pixel point in the visible light image and the atmospheric light value, the contrast between the pixel points in the target image is improved, and the influence of fog on the contrast of the image is effectively avoided.
[0017] Optionally, the quality detection model is obtained by training in the following manner: obtaining a sample image of a curtain wall sample and a quality detection label pre-annotated for the sample image, where the quality detection label is used to characterize the quality detection result of the curtain wall sample; taking the sample image as the input of a pre-constructed network model and taking the quality detection label corresponding to the sample image as the output of the network model, so as to train the network model by using the sample images and quality detection labels corresponding to multiple curtain wall samples, and taking the trained network model as the quality detection model.
[0018] Optionally, the quality detection label includes at least one of the following: the curtain wall glass is damaged, the frame of the curtain wall has scratches or damage, and the joint is uneven.
[0019] Optionally, the quality detection model is obtained by training in the following manner: obtaining a sample image of a curtain wall sample and a mask image corresponding to the sample image, where the pixel values of the other pixel points in the mask image except the pixel points with abnormalities are 0; taking the sample image as the input of a pre-constructed network model and taking the mask image corresponding to the sample image as the output of the network model, so as to train the network model by using the sample images and mask images corresponding to multiple curtain wall samples, and taking the trained network model as the quality detection model.
[0020] The technical solutions provided by the embodiments of the present application may include the following beneficial effects: determining the reference value coefficient of the reference pixel points within the neighborhood range of the target pixel point, where the reference value coefficient is at least used to characterize the probability that the reference pixel point belongs to a non-noise pixel point. According to the initial dark channel value and the reference value coefficient of the reference pixel points within the neighborhood range of the target pixel point, the target dark channel value of the target pixel point can be obtained while avoiding the influence of noise. Using the dark channel image to perform defogging processing on the visible light image to obtain the target image, and obtaining the quality inspection result of the to-be-tested curtain wall based on the target image, a more accurate inspection result of the construction quality of the curtain wall can be obtained.
[0021] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. Brief Description of the Drawings
[0022] Figure 1 is a flowchart of a curtain wall construction quality inspection method shown according to an exemplary embodiment. Detailed Embodiments
[0023] First, a brief introduction to the application scenario of the embodiments of the present application is given. In the application scenario of the present application, the defect detection of the curtain wall can be realized by using the surface image of the curtain wall. However, the images collected by image acquisition devices such as drones may be affected by fog or noise, making it difficult to obtain a relatively accurate quality inspection result when using the surface image of the curtain wall for defect detection.
[0024] To solve the above technical problems, the embodiments of the present application provide a curtain wall construction quality inspection method. Figure 1 is a flowchart of a curtain wall construction quality inspection method shown according to an exemplary embodiment, as Figure 1 shown, the method includes the following steps.
[0025] In step S101, a visible light image of the to-be-tested curtain wall is acquired. For the target pixel point in the visible light image, other pixel points within the neighborhood range of the target pixel point are used as the reference pixel points of the target pixel point.
[0026] The visible light image of the to-be-tested curtain wall for construction quality inspection can be acquired through an image acquisition device. For example, the visible light image of the to-be-tested curtain wall can be acquired by using a drone or a vertical pole equipped with an image acquisition device.
[0027] The acquired images may be interfered by factors such as fog and noise, thus affecting the quality inspection result of the to-be-tested curtain wall. To avoid the influence of fog or noise, the acquired visible light image can be defogged.
[0028] For the target pixel points in the visible light image, other pixel points within the neighborhood range of the target pixel points can be used as the reference pixel points of the target pixel points; the target pixel points can be any pixel point in the visible light image; the size of the neighborhood range can be adaptively set according to actual needs. For example, the neighborhood range can be set to ranges such as 3×3, 5×5, and 7×7.
[0029] In step S102, determine the reference value coefficient of the reference pixel points of the target pixel points relative to the target pixel points.
[0030] The reference value coefficient is at least used to characterize the probability that the reference pixel points belong to non-noise pixel points.
[0031] In one embodiment, the reference value coefficient of the reference pixel points is determined in the following manner: , where Q is the reference value coefficient of the reference pixel points, exp is the exponential function with the natural constant as the base, R is the noise probability value of the reference pixel points, N is the number of channels of the visible light image, is the pixel value of the reference pixel points in the nth channel, is the average value of the pixel values of the pixel points within the neighborhood range of the target pixel points in the nth channel, and C is the complexity value of the neighborhood range of the reference pixel points.
[0032] The noise probability value of the reference pixel points is used to characterize the probability or degree to which the reference pixel points are affected by noise; the larger the noise probability value of the reference pixel points, the greater the probability or degree to which the reference pixel points are affected by noise, and the lower the reference value of the reference pixel points to the target pixel points. Therefore, the reference value coefficient corresponding to the reference pixel points with a larger noise probability value is lower.
[0033] Due to the high randomness and discreteness of the noise pixel points, the difference degree between the noise pixel points and the surrounding non-noise pixel points is greater. The noise probability value of the reference pixel points can be determined by comparing the gray values of the reference pixel points with the gray values of other pixel points within the neighborhood range of the reference pixel points, so as to characterize the probability or degree to which the reference pixel points are affected by noise.
[0034] By comparing the pixel value of the reference pixel points in the nth channel with the average value of the pixel values of the pixel points within the neighborhood range of the target pixel points in the nth channel, it can reflect the difference between the reference pixel points and the pixel values of the pixel points within the neighborhood range of the target pixel points in the same channel, thereby reflecting the color consistency between the reference pixel points and the pixel points within the neighborhood range of the target pixel points. The visible light image can be an RGB image, and the channels of the visible light image can include three channels: red, green, and blue.
[0035] The complexity value of the neighborhood range of the reference pixel is used to characterize the complexity of the pixel values of the pixels within the neighborhood range of the reference pixel in at least one image channel; compared with the noise probability value of the reference pixel, the complexity value of the reference pixel can reflect the probability that the reference pixel is located in the area affected by noise through the complexity of the neighborhood range of the reference pixel, thereby reflecting the probability that the pixel belongs to a noise pixel.
[0036] In this way, through the noise probability value and the complexity value of the reference pixel, and considering the difference degree of the pixel values of the pixels within the neighborhood ranges of the reference pixel and the target pixel, the obtained reference value coefficient can better characterize the contribution degree of the reference pixel relative to the target pixel.
[0037] Since the surface of the curtain wall has a certain reflection ability, in the perspective of image acquisition by the image acquisition device, there may be some other objects reflected by the curtain wall in the visible light image of the surface of the curtain wall to be measured.
[0038] For example, in the angle of image acquisition by the image acquisition device, the surface image of the curtain wall may reflect other elements such as people, vehicles or buildings other than the glass of the curtain wall itself, which increases the complexity of some image areas in the visible light image of the surface of the curtain wall.
[0039] Since the glass of the curtain wall itself usually has a high consistency, compared with the other objects reflected by the surface of the curtain wall glass other than the curtain wall glass, the color characteristics or gray characteristics of the pixels belonging to the curtain wall glass itself in the surface image have a higher consistency. Therefore, determining the complexity of the pixels within the neighborhood range of the reference pixel can not only reduce the influence of the possible noise pixels in the visible light image, but also reduce the reference value coefficient of the pixels corresponding to the objects reflected by the surface of the curtain wall glass, so as to avoid the influence of the objects reflected by the surface of the curtain wall glass on the identification of the surface defects of the curtain wall.
[0040] By determining the complexity value of the pixels within the neighborhood range of the reference pixel and determining a lower reference value coefficient for the reference pixel with a higher complexity value, the reference value coefficient of the reference pixel can be used to characterize the probability that the reference pixel belongs to the element of the curtain wall itself.
[0041] For example, the elements of the curtain wall itself can be the curtain wall glass or metal veneer with specular reflection ability provided on the curtain wall.
[0042] For components such as curtain wall glass or metal veneer panels installed on the curtain wall, since components such as curtain wall glass or metal veneer panels have a certain specular reflection ability, in the same image area of the visible light image on the surface of the curtain wall, there may be only components of the curtain wall itself, or may include both components of the curtain wall itself and the objects specularly reflected by the curtain wall; or, the same image area may include specular reflection information from different objects or people.
[0043] Since the same image area of the visible light image on the curtain wall surface may include specular reflection information from different objects or people; for example, it includes different sub-image areas belonging to curtain wall glass, curtain wall frame, sky, and building respectively, and in the embodiments of the present application, the dark channel value of the target pixel point can be determined according to the reference pixel point. Therefore, in order to avoid the influence of the reflection information from different objects in the image area on the subsequent defogging process, the reference value coefficient of the reference pixel point with a higher complexity value can be reduced.
[0044] In one embodiment, the noise probability value of the reference pixel point is determined by the following method: , is the noise probability value of the i-th reference pixel point within the neighborhood range of the target pixel point, norm is the normalization processing function, is the gray value of the target pixel point, is the gray value of the i-th reference pixel point within the neighborhood range of the target pixel point, is the average gray value of other pixel points except the i-th reference pixel point within the neighborhood range of the target pixel point, is to take the absolute value.
[0045] For the pixel points in the visible light image of the curtain wall, compared with non-noise pixel points, the difference degree between noise pixel points and other surrounding pixel points is greater. Therefore, by comparing the gray value of the target pixel point and the gray value of the reference pixel point, the similarity between the reference pixel point and the target pixel point can be reflected, thereby characterizing the reference value of the reference pixel point relative to the target pixel point.
[0046] The normalization processing function is used to normalize the variable to be normalized within the range of 0 to 1. The normalization processing can be implemented, for example, by the minimum - maximum method, which will not be elaborated here.
[0047] By comparing the gray value of a reference pixel with the average gray value of other pixels except the reference pixel within the neighborhood range of the target pixel, the uniqueness of the reference pixel can be evaluated; since the gray value of a noise pixel is more unique, the greater the difference between the gray value of the reference pixel and the average gray value of other pixels except the i-th reference pixel within the neighborhood range of the target pixel, the more unique the reference pixel is among the pixels within the neighborhood range of the target pixel. Therefore, the probability that the reference pixel belongs to a noise pixel is greater.
[0048] For example, for a target pixel with a gray value of 125, the gray values of the pixels within the 8-neighborhood range of the target pixel are 133, 122, 119, 131, 128, 122, 131, and 127 in sequence. For the pixel with a gray value of 133, the average gray value of the other pixels except 133 within the 8-neighborhood range of the target pixel is (122 + 119 + 131 + 128 + 122 + 131 + 127) / 7 = 125.71; the difference between the gray value 133 and 125.71 is 7.29.
[0049] For the pixel with a gray value of 122, the average gray value of the other pixels except 133 within the 8-neighborhood range of the target pixel is (133 + 119 + 131 + 128 + 122 + 131 + 127) / 7 = 127.29, and the difference between the gray value 122 and 127.29 is 5.29.
[0050] It can be seen that the pixel with a gray value of 133 has a greater probability of being a noise pixel within the neighborhood range. Therefore, by comparing the gray value of the reference pixel with the average gray value of other pixels except the reference pixel within the neighborhood range of the target pixel, the probability that the reference pixel belongs to a noise pixel can be reflected.
[0051] In this way, by comparing the gray values of the target pixel and the reference pixel, and comparing the gray value of the reference pixel with the average gray value of other pixels except the reference pixel within the neighborhood range of the target pixel, the obtained noise probability value can better characterize the probability or degree that the reference pixel belongs to a noise pixel.
[0052] In one embodiment, the complexity value of the neighborhood range of the reference pixel is determined in the following manner: , where C is the complexity value of the neighborhood range of the reference pixel, and T is the number of pixels within the neighborhood range of the reference pixel. is the proportion of the frequency of occurrence of the t-th eigenvalue in the set of eigenvalues within the neighborhood range of the corresponding reference pixel point, and ln is the logarithmic function with the natural constant as the base; the eigenvalue of a pixel point is equal to the average of the variances of the pixel values of the pixel points within the neighborhood range of the same pixel point in all channels.
[0053] For example, for the first pixel point within the neighborhood range of the reference pixel point, the variance of the pixel values of the pixel points within the neighborhood range of the first pixel point in the red channel can be determined, the variance of the pixel values of the pixel points within the neighborhood range of the first pixel point in the green channel can be determined, and the variance of the pixel values of the pixel points within the neighborhood range of the first pixel point in the blue channel can be determined. The average value of the three variances corresponding to the red channel, the green channel, and the blue channel respectively is used as the eigenvalue of the first pixel point.
[0054] Variance is a parameter value that measures the degree of dispersion of data. For example, if the variance of the pixel values within the neighborhood range of the first pixel point in the red channel is small, it indicates that the pixel values of the pixel points within the neighborhood range of the first pixel point in the red channel are relatively concentrated, and the color distribution of the pixel points within the neighborhood range of the first pixel point in the red channel is relatively uniform.
[0055] Through the variance of the pixel values of the pixel points within the neighborhood range of the first pixel point on the same channel, the color characteristics of the pixel points within the neighborhood range of the first pixel point on the same channel can be reflected; through the average value of the three variances corresponding to the three channels respectively, the color characteristics of the pixel points within the neighborhood range of the first pixel point can be reflected.
[0056] In the calculation formula of the complexity value of the neighborhood range of the reference pixel point, the larger the number of types of eigenvalues in the eigenvalue set, or the greater the degree of difference between the frequency proportions of the eigenvalues in the eigenvalue set, the larger the value of the obtained complexity value. Therefore, the complexity value can characterize the complexity of the eigenvalues in the eigenvalue set.
[0057] For the first pixel point within the neighborhood range of the reference pixel point, the eigenvalue of the first pixel point can reflect the color characteristics of the pixel points within the neighborhood range of the first pixel point, and the complexity value can characterize the complexity of the eigenvalues in the eigenvalue set. Therefore, the complexity value can characterize the complexity of different first pixel points in terms of color characteristics, and the first pixel point is a feature point within the neighborhood range of the reference pixel point, so that the complexity value can characterize the complexity of the pixel points within the neighborhood range of the reference pixel point in terms of color characteristics.
[0058] In this way, through the eigenvalues of the pixel points within the neighborhood range of the reference pixel point, the color characteristics of the pixel points can be better characterized, and according to the difference in the proportion of the frequencies of occurrence of the eigenvalues of the pixel points within the neighborhood range of the reference pixel point, the obtained complexity value can better characterize the complexity of the neighborhood range of the reference pixel point.
[0059] In step S103, according to the initial dark channel value of the reference pixel points and the reference value coefficient within the neighborhood range of the target pixel point, the target dark channel value of the target pixel point is obtained, so as to obtain a dark channel image composed of the target dark channel values of different pixel points.
[0060] For the second pixel point within the neighborhood range of the target pixel point, the dark channel value of the second pixel point is equal to the minimum value among the pixel values of the second pixel point in the red, blue, and green channels respectively.
[0061] For example, for the second pixel point within the neighborhood range of the pixel points in the surface image of the curtain wall, if the pixel value of the second pixel point in the red channel is 40, the pixel value of the second pixel point in the green channel is 180, and the pixel value of the second pixel point in the blue channel is 50, then the initial dark channel value of the second pixel point is the minimum value among 40, 180, and 50, that is, the initial dark channel value of the second pixel point is 40.
[0062] Since the pixel values of the pixel points in the visible light image in different channels may be affected by noise, when directly using the dark channel values of the pixel points in the visible light image for defogging processing, it is difficult to effectively defog the visible light image, resulting in a poor defogging effect on the visible light image. Therefore, the initial dark channel value of the reference pixel point can be adjusted in combination with the reference value coefficient of the reference pixel point, and a more accurate target dark channel value of the target pixel point can be obtained after adjustment.
[0063] After determining the target dark channel values of all target pixel points in the visible light image, the dark channel values of all target pixel points in the visible light image can be used to form a dark channel image.
[0064] In one embodiment, obtaining the target dark channel value of the target pixel point according to the initial dark channel value of the reference pixel point and the reference value coefficient within the neighborhood range of the target pixel point includes: , D is the target dark channel value of the target pixel point, M is the number of reference pixel points within the neighborhood range of the target pixel point, is the reference value coefficient of the i-th reference pixel point within the neighborhood range of the target pixel point, is the initial dark channel value of the i-th reference pixel point within the neighborhood range of the target pixel point; the initial dark channel value of the pixel point is the minimum value of the pixel values of the pixel point in all channels.
[0065] By considering the initial dark channel values and reference value coefficients of each reference pixel point in the neighborhood, the dark channel value of the target pixel point can be estimated more accurately, which helps to better retain the details and structure of the image during the defogging process of the visible light image, and makes the defogged image closer to the real scene.
[0066] The initial dark channel value of the reference pixel points is weighted and averaged according to the reference value coefficient of the reference pixel points, which can reduce the noise and halo effects caused by the inaccuracy of a single pixel point, so as to reduce the possible artifacts in the dehazed image while smoothing the initial dark channel value in the neighborhood of the target pixel points.
[0067] Since the initial dark channel value of the pixel points reflects the transmittance of the scene where the target area is located, such as the transmittance of the light when the target area is imaged, by determining the dark channel value of the target pixel points, it is convenient to improve the local contrast of the image after dehazing the visible light image. For example, the edges or texture details of the objects in the original visible light image can be retained.
[0068] In this way, by using the reference value coefficient of the reference pixel points to perform weighted summation on the initial dark channel value of the reference pixel points, the contribution of the initial dark channel value of the reference pixel points with a higher reference value coefficient to the target dark channel value of the target pixel points can be improved, and the contribution of the initial dark channel value of the reference pixel points with a lower reference value coefficient to the target dark channel value of the target pixel points can be reduced, so as to obtain a more accurate target dark channel value of the target pixel points.
[0069] Since the visible light image on the curtain wall surface may include specular reflection information from different objects or people in the same image area, for the first reference pixel point and the second reference pixel point within the neighborhood range of the target pixel point in the visible light image, only the curtain wall glass set on the curtain wall may be included within the neighborhood range of the first reference pixel point, and both the curtain wall glass and the first object reflected by the curtain wall glass may be included within the neighborhood range of the second reference pixel point; or, both the curtain wall glass, the first object specularly reflected by the curtain wall glass, and the second object specularly reflected by the curtain wall glass may be included within the neighborhood range of the second reference pixel point.
[0070] The first reference pixel point and the second reference pixel point can be any two different pixel points within the neighborhood range of the target pixel point; the first object and the second object can be different objects among the objects such as people, vehicles, buildings, sky, and green plants specularly reflected by the curtain wall glass.
[0071] For the first reference pixel point and the second reference pixel point, since the reference value coefficient of the reference pixel point is negatively correlated with the complexity of the neighborhood range of the reference pixel point, and the complexity of the neighborhood range of the first reference pixel point is lower than that of the neighborhood range of the second reference pixel point, therefore, the reference value coefficient of the first reference pixel point of the target pixel point is higher than that of the second reference pixel point of the target pixel point.
[0072] The greater the reference value coefficient of the reference pixel points of the target pixel point, the higher the contribution degree of the reference pixel points to the target dark channel of the target pixel point. Therefore, the contribution degree of the first reference pixel point to the target dark channel of the target pixel point is higher than that of the second reference pixel point to the target dark channel of the target pixel point.
[0073] Compared with only determining the target dark channel value of the target pixel point based on the initial dark channel values of the pixel points within the neighborhood range of the target pixel point, in the embodiments of the present application, the reference value coefficient of the reference pixel points of the target pixel point is considered. Therefore, it is possible to reduce the contribution of the reference pixel points with specular reflection information within the neighborhood range to the target dark channel value of the target pixel point, or to reduce the contribution of the reference pixel points with more diverse specular reflection information within the neighborhood range to the target dark channel value of the target pixel point, so as to better achieve the defogging processing of the visible light image on the curtain wall surface.
[0074] In step S104, the visible light image is defogged using the dark channel image to obtain a target image, and the target image is input into a pre-trained quality detection model to obtain the quality detection result of the curtain wall to be measured.
[0075] The quality detection model is used to output the quality detection result of the curtain wall to be measured. The visible light image is defogged using the dark channel image to obtain a target image. Since the dark channel value of the pixel points in the dark channel image is determined according to the reference value coefficients of other pixel points within the neighborhood range of the pixel points in the visible light image, the dark channel image can better reflect the actual transmittance in the visible light image. Therefore, a target image that is more consistent with the information in the target area under fog-free conditions can be obtained, so as to better achieve the detection of the construction quality of the curtain wall and avoid misidentifying or missing the defects existing in the curtain wall after construction.
[0076] For most outdoor natural fog-free images, the pixel values of the pixel points in at least one local area in the fog-free image have very low intensity values in at least one color channel, that is, there is at least one pixel point in the fog-free image whose dark channel value is close to 0; the dark channel value of the pixel point is the minimum value among the pixel values of the pixel point in the red, green, and blue channels respectively.
[0077] By using the characteristic that there is at least one pixel point in the outdoor natural fog-free image whose dark channel value is close to 0, it is possible to perform defogging processing on the foggy image of the curtain wall to be measured, so as to avoid the influence of the fog in the foggy image on the information carried in the image and obtain a defogged image whose carried information is consistent with the actual information of the curtain wall to be measured.
[0078] In one embodiment, haze removal processing is performed on a visible light image using a dark channel image to obtain a target image, including: determining a plurality of candidate pixel points with the largest pixel values from the dark channel image, and taking the largest value among the brightness values of the corresponding pixel points of the candidate pixel points in the visible light image as the atmospheric light value; using the dark channel haze removal algorithm and the atmospheric light value to perform haze removal processing on the visible light image to obtain the target image.
[0079] In the dark channel haze removal algorithm, the atmospheric light value determined according to the dark channel image represents the brightness of the fog-free area in the scene of the visible light image.
[0080] By determining a plurality of candidate pixel points with the largest pixel values in the dark channel image, it is possible to determine the area in the visible light image that is least affected by haze or not affected by haze, so as to perform haze removal processing on the area affected by haze in the visible light image according to these areas that are least affected by haze or not affected by haze.
[0081] In this way, taking the largest value among the brightness values of the corresponding pixel points of the candidate pixel points in the visible light image as the atmospheric light value, and using the dark channel haze removal algorithm and the atmospheric light value to perform haze removal processing on the visible light image to obtain the target image can avoid the influence of haze in the obtained target image.
[0082] In one embodiment, using the dark channel haze removal algorithm and the atmospheric light value to perform haze removal processing on the visible light image to obtain the target image includes: using the determination step of the pixel points in the transmittance map in the dark channel haze removal algorithm and the atmospheric light value to determine the transmittance map corresponding to the visible light image, so as to obtain the target image using the transmittance map; , where J is the pixel value of the target pixel point in the target image, E is the pixel value of the target pixel point in the visible light image, F is the atmospheric light value, and g is the pixel value of the target pixel point in the transmittance map.
[0083] When the visible light image is affected by haze, due to the scattering effect of haze, the consistency of the gray values in the visible light image is higher than that in the fog-free case, and the contrast of the visible light image decreases. Since the transmittance map is determined based on the dark channel information of the visible light image itself, the haze-removed image can maintain the naturalness and local details of the original visible light image; and through the fog processing of the visible light image, the transmittance map can help restore the contrast of the visible light image, making the details and structures in the image more obvious.
[0084] The calculation formula for the pixel value of the target pixel point in the target image and the addition operation performed on the atmospheric value can ensure that no negative value appears during the haze removal process of the visible light image, thus avoiding unnatural color distortion of the visible light image.
[0085] For two pixel points with gray values of 100 and 70 respectively in a foggy image, the gray difference between the two pixel points is equal to 30; when the atmospheric light value is 50, the transmittances at the two pixel points can be 0.6 and 0.4 respectively; for the pixel point with a gray value of 100 in the foggy image, the gray value after defogging is equal to 50 + (100 - 50) / 0.6 = 133; for the pixel point with a gray value of 70 in the foggy image, the gray value after defogging is equal to 50 + (70 - 50) / 0.6 = 83.
[0086] The gray difference between the two pixel points after defogging is equal to 50, and the gray difference between the pixel points after defogging becomes larger; the contrast between the two pixel points before defogging is equal to (100 - 70) / 70 = 42.86%, and the contrast between the two pixel points after defogging is equal to (133 - 83) / 83 = 60.24%. The contrast between the two pixel points is improved after defogging.
[0087] In this way, by using the pixel value of the target pixel point in the visible light image and the atmospheric light value, the contrast between the pixel points in the obtained target image is improved, and the texture information and other detailed information in the visible light image can be presented more clearly, effectively avoiding the influence of fog on the contrast of the image.
[0088] In one embodiment, using the determination step of the pixel points in the transmittance map in the dark channel defogging algorithm and the atmospheric light value, to determine the transmittance map corresponding to the visible light image, includes: , where g is the pixel value of the target pixel point in the transmittance map, is a preset positive coefficient less than 1, min is to take the minimum value, E is the pixel value of the target pixel point in the visible light image, and F is the atmospheric light value.
[0089] The atmospheric light value is the global illumination component caused by the scattering of the atmosphere in the image. By comparing the gray value of the target pixel point with the atmospheric light value and taking the minimum value, the influence of the atmosphere on the image can be reduced, making the obtained transmittance more accurate.
[0090] Since the calculation of the transmittance takes into account the ratio of the pixel value of the pixel point to the atmospheric light value, the determination process of the atmospheric light value can adapt to the scenario of defogging foggy images with different fog concentrations; for example, under the condition of thick fog, the actual transmittance becomes lower, and the value of E / F will approach 1, making the obtained transmittance decrease accordingly; under the condition of thin fog, the actual transmittance becomes higher, and the value of E / F will be less than 1, making the obtained transmittance increase as the actual transmittance becomes higher.
[0091] Preset positive coefficient less than 1 , for example, it can be between 0.9 and 0.95; by adaptively adjusting the preset positive coefficient, the defogging effect or degree of the visible light image can be adjusted; for example, by setting a smaller preset positive coefficient , the defogging effect of the visible light image can be improved while retaining the detail information in the image.
[0092] In this way, according to the pixel value of the target pixel point in the visible light image and the atmospheric light value, the transmittance matching the actual transmittance can be determined, so as to use the transmittance map to perform defogging processing on the visible light image.
[0093] In one embodiment, the quality detection model is obtained through training in the following manner: obtaining a sample image of a curtain wall sample and a quality detection label pre-annotated for the sample image, where the quality detection label is used to characterize the quality detection result of the curtain wall sample; using the sample image as the input of a pre-constructed network model, and using the quality detection label corresponding to the sample image as the output of the network model, so as to train the network model using the sample images and quality detection labels corresponding to multiple curtain wall samples, and using the trained network model as the quality detection model.
[0094] For multiple sample images corresponding to multiple curtain wall samples, the quality detection labels of the curtain wall samples in the sample images can be annotated; for example, the quality detection label includes at least one of the following: the curtain wall glass is damaged, the frame of the curtain wall has scratches or damage, and the joint is uneven.
[0095] In this way, training a pre-constructed network model using the sample image and the quality detection label corresponding to the sample image to obtain a quality detection model can output the quality detection result of the target image corresponding to the curtain wall in subsequent steps, realizing the automatic detection of the construction quality of the curtain wall and reducing the labor intensity of personnel for visual inspection.
[0096] At the same time, since the curtain wall is set on the exterior facade of the building, a visible light image of the curtain wall is obtained through devices such as drones, and the visible light image is processed to obtain a target image, and then the target image is input into the quality detection model to output the quality detection result. Compared with manual detection, it can avoid the threat to personnel safety when personnel perform high-altitude operations. Therefore, it can ensure the safety of personnel.
[0097] The model structure of the pre-constructed network model can be a convolutional neural network, a deep neural network, a deep residual network, etc. The embodiments of the present application do not limit the model structure of the pre-constructed network model.
[0098] In one embodiment, the quality detection model is obtained through training in the following manner: obtaining a sample image of a curtain wall and a mask image corresponding to the sample image, wherein the pixel values of the other pixel points in the mask image except for the pixel points with abnormalities are 0; using the sample image as the input of a pre-constructed network model, and using the mask image corresponding to the sample image as the output of the network model, so as to train the network model by using the sample images and mask images corresponding to a plurality of curtain wall samples, and using the trained network model as the quality detection model.
[0099] Through the training of the quality detection model, it is convenient to use the quality detection model to output an image composed of the pixel points with defects in the surface image of the curtain wall, so that the user can go to the location of the defect of the curtain wall to process the defects existing in the curtain wall.
[0100] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include well-known common general knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only regarded as exemplary.
[0101] It should be understood that the present application is not limited to the exact structure already described and shown in the drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A curtain wall construction quality detection method, characterized in that: include: Obtain a visible light image of the curtain wall to be measured, and for a target pixel point in the visible light image, use other pixel points within the neighborhood of the target pixel point as reference pixel points of the target pixel point; Determine the reference value coefficient of the reference pixel point relative to the target pixel point by: , Q is the reference value coefficient of the reference pixel, exp is the exponential function with the natural constant as the base, R is the noise probability value of the reference pixel, N is the number of channels of the visible light image, is the pixel value of the reference pixel in the nth channel, is the average value of the pixel values of the target pixel in the neighborhood of the nth channel, and C is the complexity value of the reference pixel’s neighborhood; The reference value coefficient is at least used to characterize the probability that the reference pixel point belongs to a non-noise pixel point; The complexity value of the neighborhood range of the reference pixel is determined in the following way: , T is the total number of characteristic values of pixels in the neighborhood of the reference pixel, is the frequency ratio of the t-th eigenvalue in the eigenvalue set of the neighborhood range of the reference pixel point, ln is a logarithmic function with a natural constant as the base; the eigenvalue of a pixel point is equal to the average value of the variance of the pixel values of all channels of the pixel points in the neighborhood range of the same pixel point; According to the initial dark channel value of the reference pixel within the neighborhood of the target pixel and the reference value coefficient, a target dark channel value of the target pixel is obtained to obtain a dark channel image composed of target dark channel values of different pixels; The dark channel image is used to perform dehazing processing on the visible light image to obtain a target image, and the target image is input into a pre-trained quality detection model to obtain a quality detection result of the curtain wall to be tested; the quality detection model is used to output the quality detection result of the curtain wall to be tested.
2. The curtain wall construction quality detection method according to claim 1, characterized in that: The noise probability value of the reference pixel is determined in the following way: , is the noise probability value of the i-th reference pixel in the neighborhood of the target pixel, norm is the normalization function, is the gray value of the target pixel, is the gray value of the i-th reference pixel in the neighborhood of the target pixel, is the average gray value of all pixels in the neighborhood of the target pixel except the i-th reference pixel. To take the absolute value.
3. The curtain wall construction quality detection method according to claim 1, characterized in that: According to the initial dark channel value of the reference pixel within the neighborhood of the target pixel and the reference value coefficient, the target dark channel value of the target pixel is obtained, including: , D is the target dark channel value of the target pixel, M is the number of reference pixels in the neighborhood of the target pixel, is the reference value coefficient of the i-th reference pixel in the neighborhood of the target pixel, is the initial dark channel value of the i-th reference pixel in the neighborhood of the target pixel; the initial dark channel value of the pixel is the minimum value of the pixel value in all channels.
4. The curtain wall construction quality detection method according to claim 1, characterized in that: The dark channel image is used to defog the visible light image to obtain the target image, including: Determine multiple candidate pixels with the largest pixel values from the dark channel image, and use the largest brightness value of the corresponding pixel points of the candidate pixels in the visible light image as the atmospheric light value; The dark channel defogging algorithm and the atmospheric light value are used to defog the visible light image to obtain the target image.
5. The curtain wall construction quality detection method according to claim 4, characterized in that: Using the dark channel defogging algorithm and the atmospheric light value, the visible light image is defogged to obtain the target image, including: Determine the transmittance map corresponding to the visible light image by using the pixel determination step in the transmittance map in the dark channel defogging algorithm and the atmospheric light value, so as to obtain the target image by using the transmittance map; , J is the pixel value of the target pixel in the target image, E is the pixel value of the target pixel in the visible light image, F is the atmospheric light value, and g is the pixel value of the target pixel in the transmittance image.
6. The curtain wall construction quality detection method according to claim 1, characterized in that: The quality detection model is trained in the following way: Acquire a sample image of a curtain wall sample and a quality inspection label pre-annotated for the sample image, wherein the quality inspection label is used to represent a quality inspection result of the curtain wall sample; The sample image is used as the input of a pre-built network model, and the quality detection label corresponding to the sample image is used as the output of the network model. The network model is trained using the sample images and quality detection labels corresponding to multiple curtain wall samples, and the trained network model is used as the quality detection model.
7. The curtain wall construction quality detection method according to claim 6, characterized in that: The quality inspection label includes the quality inspection passing or at least one of the following: the curtain wall glass is damaged, the curtain wall frame is scratched or damaged, and the seams are uneven.
8. The curtain wall construction quality detection method according to claim 1, characterized in that: The quality detection model is trained in the following way: Obtain a sample image of a curtain wall sample and a mask image corresponding to the sample image, wherein the pixel values of other pixels in the mask image except for the abnormal pixel are 0; The sample image is used as the input of a pre-built network model, and the mask image corresponding to the sample image is used as the output of the network model, so that the network model is trained using the sample images and mask images corresponding to multiple curtain wall samples, and the trained network model is used as the quality detection model.
Citation Information
Patent Citations
Curtain wall defect identification method, control terminal, server and readable storage medium
CN114326794A
Bridge detection image recognition method and system based on artificial intelligence
CN118823481A
Rapid defect marking, training and image screening method and system for stone curtain wall millimeter wave image
CN119417813A