Curtain wall construction quality detection method
By defogging the visible light image of the curtain wall, using dark channel images and pre-trained quality detection models, the problem that the images acquired by the drone are affected by fog is solved, and the accurate detection of the quality of the curtain wall is achieved.
Patent Information
- Application Number
- CN202510472202.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-05-13
- 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 CN119991673A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image data processing, and in particular to a curtain wall construction quality detection method. Background Art
[0002] Curtain wall, also known as exterior wall panel or building curtain wall, is usually hung on the structural frame of a building. The main function of the curtain wall is to serve as the building's enclosing structure. At the same time, it can provide insulation, heat insulation, waterproofing, fire prevention, sound insulation and aesthetic effects for the building. The completed curtain wall may have defects such as broken glass panels, damaged sealants, uneven glue joints and deformed frames. These defects will not only affect the appearance quality of the curtain wall, but may also threaten the structural strength or thermal insulation performance of the curtain wall. Therefore, it is necessary to conduct quality inspection on the completed curtain wall.
[0003] In order to achieve quality inspection of curtain walls, a Chinese patent application document with publication number CN114326794A provides a method for identifying curtain wall defects, including: when receiving a detection command, obtaining environmental information around a target building; determining a 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 the shooting parameters, and sending the flight command to a drone; controlling the drone to fly according to the target detection path through the flight command, and controlling the shooting device of the drone to perform a shooting action according to the shooting parameters, wherein after the drone captures curtain wall image data, the curtain wall image data is sent to a server, so that the server determines curtain wall defects according to the curtain wall image data.
[0004] In the related art, the defects of the curtain wall are mainly detected by using the image data of the curtain wall obtained by the drone. However, the images obtained by the drone may be affected by the fog in the environment. When the defects of the curtain wall are directly detected by using the images affected by the fog, it is difficult to obtain a more accurate detection result of the quality of the curtain wall. Summary of the invention
[0005] In order to overcome the problem that it is difficult to obtain relatively accurate detection results of the quality of curtain walls in related technologies, the present application provides a curtain wall construction quality detection method, including: obtaining a visible light image of the curtain wall to be tested, and for a target pixel point in the visible light image, taking other pixel points within the neighborhood of the target pixel point as reference pixel points of the target pixel point; determining a reference value coefficient of the reference pixel point of the target pixel point relative to the target pixel point; the reference value coefficient is at least used to characterize the probability that the reference pixel point belongs to a non-noise pixel point; obtaining a target dark channel value of the target pixel point based on an initial dark channel value of the reference pixel point within the neighborhood of the target pixel point and the reference value coefficient, so as to obtain a dark channel image composed of target dark channel values of different pixels; using the dark channel image to defog the visible light image to obtain a target image, and inputting the target image 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.
[0006] In this way, the reference value coefficient is at least used to characterize the probability that the reference pixel is a non-noise pixel. According to the initial dark channel value of the reference pixel in the neighborhood of the target pixel and the reference value coefficient, the visible light image of the curtain wall can be better dehazed to obtain the target image. Therefore, the target image can be used to obtain more accurate quality inspection results for the curtain wall to be tested.
[0007] Optionally, the reference value coefficient of the reference pixel is determined by: , where Q is the reference value coefficient of the reference pixel, exp is an exponential function with a natural constant as the base, R is the noise probability value of the reference pixel, and 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 pixel value of the target pixel in the neighborhood of the nth channel, and C is the complexity value of the reference pixel’s neighborhood.
[0008] In this way, since the complexity of the pixels in the neighborhood of the pixel affected by noise is higher, the reference value coefficient obtained by the noise probability value and complexity value of the reference pixel can better reflect the probability that the reference pixel belongs to a non-noise pixel, thereby characterizing the contribution of the reference pixel to the target pixel.
[0009] Optionally, the complexity value of the neighborhood range of the reference pixel is determined by: , C is the complexity value of the neighborhood range of the reference pixel, T is the number of pixels in the neighborhood range of the reference pixel, is the frequency ratio of the tth eigenvalue in the eigenvalue set of the neighborhood range corresponding to 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 in the neighborhood range of the same pixel point.
[0010] In this way, when the types or proportions of pixel values in the neighborhood of a pixel point are more diverse, the complexity of the neighborhood of the pixel point is higher. Therefore, by considering the difference in the frequency proportion of the characteristic values of the pixels in the neighborhood of the reference pixel point, the complexity value can better characterize the complexity of the neighborhood of the reference pixel point.
[0011] Optionally, the noise probability value of the reference pixel is determined by: , 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.
[0012] Optionally, obtaining a target dark channel value of the target pixel according to the initial dark channel value of the reference pixel within the neighborhood of the target pixel and the reference value coefficient includes: , 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.
[0013] In this way, by utilizing the reference value coefficient of the reference pixel point and performing weighted summation on the initial dark channel value of the reference pixel point, 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 based on the reference value coefficient of the reference pixel point.
[0014] Optionally, the target image is obtained by dehazing the visible light image using the dark channel image, including: determining multiple candidate pixel points with the largest pixel values from the dark channel image, and taking the maximum brightness value of the corresponding pixel points of the candidate pixel points in the visible light image as the atmospheric light value; and obtaining the target image by dehazing the visible light image using the dark channel dehazing algorithm and the atmospheric light value.
[0015] Optionally, using a dark channel defogging algorithm and the atmospheric light value, defogging the visible light image to obtain a target image, comprising: using a step of determining pixel points in a transmittance map in the dark channel defogging algorithm and the atmospheric light value to determine a transmittance map corresponding to the visible light image, so as to obtain the target image 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.
[0016] In this way, the pixel value of the target pixel in the visible light image and the atmospheric light value are used to improve the contrast between the pixels in the target image, effectively avoiding the influence of fog on the contrast of the image.
[0017] Optionally, the quality inspection model is trained in the following manner: obtaining sample images of curtain wall samples and quality inspection labels pre-annotated for the sample images, wherein the quality inspection labels are used to characterize the quality inspection results of the curtain wall samples; using the sample images as the input of a pre-constructed network model, and using the quality inspection labels corresponding to the sample images as the output of the network model, so as to train the network model using the sample images and quality inspection labels corresponding to multiple curtain wall samples, and using the trained network model as the quality inspection model.
[0018] Optionally, the quality inspection label includes passing the quality inspection 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.
[0019] Optionally, the quality inspection model is trained in the following manner: obtaining a sample image of a curtain wall sample and a mask image corresponding to the sample image, wherein the pixel values of pixels other than abnormal pixels in the mask image 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 using the sample images and mask images corresponding to multiple curtain wall samples, and using the trained network model as the quality inspection model.
[0020] The technical solution 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 of the target pixel point, the reference value coefficient being at least used to characterize the probability that the reference pixel point belongs to a non-noise pixel point, and according to the initial dark channel value of the reference pixel points within the neighborhood of the target pixel point and the reference value coefficient, the target dark channel value of the target pixel point can be obtained while avoiding the influence of noise, the dark channel image is used to dehaze the visible light image to obtain the target image, and the quality inspection result of the curtain wall to be tested is obtained according to the target image, so as to obtain a more accurate inspection result of the construction quality of the curtain wall.
[0021] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The present invention is a flow chart of a curtain wall construction quality detection method according to an exemplary embodiment. DETAILED DESCRIPTION
[0023] First, the application scenario of the embodiment of the present application is briefly introduced. In the application scenario of the present application, the surface image of the curtain wall can be used to realize the defect detection of the curtain wall. However, the images captured by image acquisition devices such as drones may be affected by fog or noise, making it difficult to obtain more accurate quality inspection results when using the surface image of the curtain wall for defect detection.
[0024] In view of the above technical problems, the present application provides a curtain wall construction quality detection method. Figure 1 is a flow chart of a curtain wall construction quality detection method according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps.
[0025] In step S101, a visible light image of the curtain wall to be measured is obtained, and for a target pixel in the visible light image, other pixels in the neighborhood of the target pixel are used as reference pixels of the target pixel.
[0026] Visible light images of the curtain wall to be tested for construction quality inspection can be obtained through the image acquisition device. For example, the visible light image of the curtain wall to be tested can be acquired through a drone or a pole equipped with the image acquisition device.
[0027] The collected images may be affected by factors such as fog and noise, thereby affecting the quality inspection results of the curtain wall to be tested. In order to avoid the influence of fog or noise, the collected visible light images can be defogged.
[0028] For a target pixel in a visible light image, other pixels in a neighborhood of the target pixel can be used as reference pixels for the target pixel; the target pixel can be any pixel in the visible light image; the size of the neighborhood can be adaptively set according to actual needs, for example, the neighborhood can be set to 3×3, 5×5, 7×7, etc.
[0029] In step S102, a reference value coefficient of a reference pixel point relative to the target pixel point is determined.
[0030] The reference value coefficient is at least used to characterize the probability that the reference pixel point belongs to a non-noise pixel point.
[0031] In one embodiment, the reference value coefficient of the reference pixel is determined by: , where Q is the reference value coefficient of the reference pixel, exp is an exponential function with a natural constant as the base, R is the noise probability value of the reference pixel, and 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 pixel value of the target pixel in the neighborhood of the nth channel, and C is the complexity value of the reference pixel’s neighborhood.
[0032] The noise probability value of the reference pixel is used to characterize the probability or degree of the reference pixel being affected by noise; the larger the noise probability value of the reference pixel, the greater the probability or degree of the reference pixel being affected by noise, and the lower the reference value of the reference pixel to the target pixel. Therefore, the reference value coefficient corresponding to the reference pixel with a larger noise probability value is lower.
[0033] Since noise pixels are highly random and discrete, the difference between noise pixels and the surrounding non-noise pixels is greater. The noise probability value of a reference pixel can be determined by comparing the grayscale values of the reference pixel with those of other pixels in its neighborhood to characterize the probability or degree of the reference pixel being affected by noise.
[0034] By comparing the pixel value of the reference pixel in the nth channel with the average pixel value of the pixel in the neighborhood of the target pixel in the nth channel, the difference in the pixel values of the reference pixel and the pixel in the neighborhood of the target pixel in the same channel can be reflected, thereby reflecting the color consistency of the pixel in the neighborhood of the reference pixel and the pixel in the neighborhood of the target pixel. 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 point is used to characterize the complexity of the pixel value of the pixel point in the neighborhood range of the reference pixel point in at least one image channel; compared with the noise probability value of the reference pixel point, the complexity value of the reference pixel point can reflect the probability that the reference pixel point is located in an area affected by noise through the complexity of the neighborhood range of the reference pixel point, thereby reflecting the probability that the pixel point is a noise pixel point.
[0036] In this way, by using the noise probability value and complexity value of the reference pixel point, and considering the difference in pixel values between the reference pixel point and the target pixel point in the neighborhood, the reference value coefficient obtained can better characterize the contribution of the reference pixel point to the target pixel point.
[0037] Since the surface of the curtain wall has a certain reflective ability, when the image acquisition device is performing image acquisition, the visible light image of the surface of the curtain wall to be measured acquired by the image acquisition device may contain some other objects reflected by the curtain wall.
[0038] For example, at the angle at which the image acquisition device acquires images, the acquired surface image of the curtain wall may reflect elements other than the glass of the curtain wall itself, such as people, vehicles or buildings, thereby increasing the complexity of some image areas in the visible light image of the curtain wall surface.
[0039] Since the glass of the curtain wall itself usually has a high consistency, the color characteristics or grayscale characteristics of the pixels belonging to the curtain wall glass itself in the surface image have a higher consistency than other objects other than the curtain wall glass reflected by the surface of the curtain wall glass. Therefore, determining the complexity of the pixels in the neighborhood of the reference pixel can not only reduce the influence of noise pixels that may exist 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 surface defects of the curtain wall.
[0040] By determining the complexity value of pixels within the neighborhood of the reference pixel and determining a lower reference value coefficient for reference pixels with higher complexity values, the reference value coefficient of the reference pixel can be used to characterize the probability that the reference pixel belongs to an element of the curtain wall itself.
[0041] For example, the elements of the curtain wall itself may be curtain wall glass or metal decorative panels with mirror reflection capability provided on the curtain wall.
[0042] For components such as curtain wall glass or metal decorative panels arranged on the curtain wall, since components such as curtain wall glass or metal decorative panels have a certain mirror reflection ability, in the same image area of the visible light image of the surface of the curtain wall, there may be only components of the curtain wall itself, or it may include components of the curtain wall itself and objects mirror-reflected by the curtain wall; or, the same image area may include mirror reflection information from different objects or people.
[0043] Since the same image area of the visible light image of the curtain wall surface may include mirror reflection information from different objects or people; for example, including different sub-image areas belonging to the curtain wall glass, curtain wall frame, sky and building, and in the embodiment of the present application, the dark channel value of the target pixel can be determined based on the reference pixel. Therefore, in order to avoid the influence of reflection information from different objects in the image area on the subsequent defogging process, the reference value coefficient of the reference pixel with a higher complexity value can be reduced.
[0044] In one embodiment, the noise probability value of the reference pixel is determined in the following manner: , 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.
[0045] For the pixels in the visible light image of the curtain wall, the difference between the noise pixels and other surrounding pixels is greater than that between the non-noise pixels. Therefore, by comparing the grayscale value of the target pixel and the grayscale value of the reference pixel, the similarity between the reference pixel and the target pixel can be reflected, thereby characterizing the reference value of the reference pixel relative to the target pixel.
[0046] The normalization function is used to normalize the variable to be normalized to the range of 0 to 1. The normalization process can be implemented, for example, by the minimum-maximum method, which will not be described in detail here.
[0047] By comparing the grayscale value of the reference pixel with the average grayscale value of other pixels in the neighborhood of the target pixel except the reference pixel, the uniqueness of the reference pixel can be evaluated; since the grayscale value of the noise pixel is more unique, the greater the difference between the grayscale value of the reference pixel and the average grayscale value of other pixels in the neighborhood of the target pixel except the i-th reference pixel, the reference pixel is more unique among the pixels in the neighborhood of the target pixel, and therefore, the probability that the reference pixel belongs to the noise pixel is greater.
[0048] For example, for a target pixel with a grayscale value of 125, the grayscale values of the pixels in the 8-neighborhood range of the target pixel are 133, 122, 119, 131, 128, 122, 131 and 127 respectively. For a pixel with a grayscale value of 133, the grayscale mean of the other pixels in the 8-neighborhood range of the target pixel except 133 is (122+119+131+128+122+131+127) / 7=125.71; the difference between the grayscale values 133 and 125.71 is 7.29.
[0049] For a pixel with a grayscale value of 122, the grayscale mean of the other pixels except 133 in the 8-neighborhood range of the target pixel is (133+119+131+128+122+131+127) / 7=127.29. The difference between the grayscale values 122 and 127.29 is 5.29.
[0050] It can be seen that the pixel with a grayscale value of 133 is more likely to be a noise pixel in the neighborhood. Therefore, by comparing the grayscale value of the reference pixel with the average grayscale value of other pixels in the neighborhood of the target pixel except the reference pixel, the probability that the reference pixel belongs to a noise pixel can be reflected.
[0051] In this way, the grayscale value of the target pixel is compared with that of the reference pixel, and the grayscale value of the reference pixel is compared with the average grayscale value of other pixels in the neighborhood of the target pixel except the reference pixel. The obtained noise probability value can better characterize the probability or degree that the reference pixel is a noise pixel.
[0052] In one embodiment, the complexity value of the neighborhood range of the reference pixel is determined in the following manner: , C is the complexity value of the neighborhood range of the reference pixel, T is the number of pixels in the neighborhood range of the reference pixel, is the frequency ratio of the tth eigenvalue in the eigenvalue set of the neighborhood range corresponding to 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 in the neighborhood range of the same pixel point.
[0053] For example, for the first pixel point within the neighborhood of the reference pixel point, the variance of the pixel value of the pixel point in the red channel within the neighborhood of the first pixel point can be determined, and the variance of the pixel value of the pixel point in the green channel within the neighborhood of the first pixel point can be determined, as well as the variance of the pixel value of the pixel point in the blue channel within the neighborhood of the first pixel point. The mean of the three variances corresponding to the red channel, green channel and blue channel, respectively, is used as the characteristic value of the first pixel point.
[0054] Variance is a parameter value that measures the degree of discreteness of data. For example, if the variance of the pixel values in the neighborhood of the first pixel on the red channel is small, it means that the pixel values of the pixels in the neighborhood of the first pixel on the red channel are relatively concentrated, and the color distribution of the pixels in the neighborhood of the first pixel on the red channel is relatively uniform.
[0055] The variance of the pixel values in the neighborhood of the first pixel on the same channel can reflect the color characteristics of the pixels in the neighborhood of the first pixel on the same channel; the average of the three variances corresponding to the three channels can reflect the color characteristics of the pixels in the neighborhood of the first pixel.
[0056] In the calculation formula of the complexity value of the neighborhood range of the reference pixel point, the more types of eigenvalues in the eigenvalue set, or the greater the difference between the frequency proportions of the eigenvalues in the eigenvalue set, the larger the complexity value obtained. Therefore, the complexity value can characterize the complexity of the eigenvalues in the eigenvalue set.
[0057] For the first pixel point within the neighborhood of the reference pixel point, the eigenvalue of the first pixel point can reflect the color characteristics of the pixel points within the neighborhood 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 the color characteristics of different first pixels, and the first pixel point is a feature point within the neighborhood of the reference pixel point, so that the complexity value can characterize the complexity of the color characteristics of the pixel points within the neighborhood of the reference pixel point.
[0058] In this way, the color characteristics of the pixels can be better characterized by the characteristic values of the pixels in the neighborhood of the reference pixel. The complexity value obtained according to the difference in the frequency ratio of the characteristic values of the pixels in the neighborhood of the reference pixel can better characterize the complexity of the neighborhood of the reference pixel.
[0059] In step S103, a target dark channel value of the target pixel is obtained according to the initial dark channel value of the reference pixel in the neighborhood of the target pixel and the reference value coefficient, so as to obtain a dark channel image composed of the target dark channel values of different pixels.
[0060] For a second pixel point within the neighborhood of the target pixel point, the dark channel value of the second pixel point is equal to the minimum value of the pixel values of the second pixel point in the red, blue and green channels respectively.
[0061] For example, for a second pixel point within the neighborhood of a pixel point 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 of 40, 180 and 50, that is, the initial dark channel value of the second pixel point is 40.
[0062] Since the pixel values of pixels in different channels in the visible light image may be affected by noise, it is difficult to effectively achieve the defogging of the visible light image when the dark channel values of the pixels in the visible light image are directly used for defogging, resulting in poor defogging effect on the visible light image. Therefore, the initial dark channel value of the reference pixel can be adjusted in combination with the reference value coefficient of the reference pixel to obtain a more accurate target dark channel value of the target pixel after adjustment.
[0063] After the target dark channel values of all target pixels in the visible light image are determined, the dark channel values of all target pixels in the visible light image may be combined into a dark channel image.
[0064] In one embodiment, obtaining a target dark channel value of a target pixel point according to the initial dark channel value of a reference pixel point within the neighborhood of the target pixel point and a reference value coefficient includes: , 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.
[0065] By considering the initial dark channel value and reference value coefficient of each reference pixel in the neighborhood, the dark channel value of the target pixel can be estimated more accurately, which helps to better preserve the details and structure of the image during the dehazing process of the visible light image and make the dehazed image closer to the real scene.
[0066] By weighted averaging the initial dark channel values of the reference pixels according to their reference value coefficients, the noise and halo effects caused by the inaccuracy of a single pixel can be reduced, thereby reducing possible artifacts in the dehazed image while smoothing the initial dark channel values in the neighborhood of the target pixel.
[0067] Since the initial dark channel value of the pixel reflects the transmittance of the scene in which the target area is located, such as the transmittance of light when the target area is imaged, by determining the dark channel value of the target pixel, it is possible to facilitate the local contrast of the image after dehazing the visible light image. For example, the texture of the edge or detail of the object in the original visible light image can be retained.
[0068] In this way, by utilizing the reference value coefficient of the reference pixel point and performing weighted summation on the initial dark channel values of the reference pixel point, the contribution of the initial dark channel values of the reference pixel point with a higher reference value coefficient to the target dark channel value of the target pixel point can be increased, and the contribution of the initial dark channel values of the reference pixel point with a lower reference value coefficient to the target dark channel value of the target pixel point can be reduced, thereby obtaining a more accurate target dark channel value for the target pixel point.
[0069] Since the same image area of the visible light image of the curtain wall surface may include mirror reflection information from different objects or people, for the first reference pixel and the second reference pixel within the neighborhood range of the target pixel in the visible light image, the neighborhood range of the first reference pixel may only include the curtain wall glass set on the curtain wall, and the neighborhood range of the second reference pixel may include both the curtain wall glass and the first object reflected by the curtain wall glass; or, the neighborhood range of the second reference pixel may include both the curtain wall glass, the first object mirror-reflected by the curtain wall glass, and the second object mirror-reflected by the curtain wall glass.
[0070] The first reference pixel and the second reference pixel may be any two different pixels within the neighborhood of the target pixel; the first object and the second object may be different objects such as people, vehicles, buildings, sky, and green plants reflected by the curtain wall glass.
[0071] For the first reference pixel and the second reference pixel, since the reference value coefficient of the reference pixel is negatively correlated with the complexity of the neighborhood range of the reference pixel, and the complexity of the neighborhood range of the first reference pixel is lower than the complexity of the neighborhood range of the second reference pixel, the reference value coefficient of the first reference pixel of the target pixel is higher than the reference value coefficient of the second reference pixel of the target pixel.
[0072] The larger the reference value coefficient of the reference pixel of the target pixel, the higher the contribution of the reference pixel to the target dark channel of the target pixel. Therefore, the contribution of the first reference pixel to the target dark channel of the target pixel is higher than the contribution of the second reference pixel to the target dark channel of the target pixel.
[0073] Compared to determining the target dark channel value of a target pixel only based on the initial dark channel value of the pixel within the neighborhood of the target pixel, the reference value coefficient of the reference pixel of the target pixel is taken into account in the embodiment of the present application. Therefore, the contribution of the reference pixel with mirror reflection information within the neighborhood to the target dark channel value of the target pixel can be reduced, or the contribution of the reference pixel with more diverse mirror reflection information within the neighborhood to the target dark channel value of the target pixel can be reduced, so as to better realize the dehazing processing of the visible light image of the curtain wall surface.
[0074] In step S104, 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 inspection model to obtain a quality inspection result of the curtain wall to be inspected.
[0075] The quality inspection model is used to output the quality inspection results of the curtain wall to be tested. The target image is obtained by defogging the visible light image using the dark channel image. Since the dark channel value of the pixel in the dark channel image is determined based on the reference value coefficient of other pixels in the neighborhood of the pixel 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 of the target area in the fog-free condition can be obtained, thereby better realizing the inspection of the construction quality of the curtain wall and avoiding the misidentification or omission of defects in the curtain wall after the construction is completed.
[0076] For most natural outdoor fog-free images, the pixel value of at least one color channel in at least one local area of the fog-free image has a very low intensity value, that is, there is at least one pixel in the fog-free image whose dark channel value is close to 0; the dark channel value of the pixel is the minimum value of the pixel value in the three channels of red, green and blue.
[0077] By utilizing the fact that there is at least one pixel with a dark channel value close to 0 in a natural outdoor fog-free image, the foggy image of the curtain wall to be tested can be defogged to avoid the influence of fog in the foggy image on the information carried in the image, and a defogged image with information consistent with the actual information of the curtain wall to be tested can be obtained.
[0078] In one embodiment, a dark channel image is used to perform dehazing processing on a visible light image to obtain a target image, including: determining multiple candidate pixel points with the largest pixel values from the dark channel image, and taking the largest brightness value of the corresponding pixel points of the candidate pixel points in the visible light image as the atmospheric light value; and using a dark channel dehazing algorithm and the atmospheric light value to perform dehazing processing on the visible light image to obtain the target image.
[0079] In the dark channel dehazing algorithm, the atmospheric light value determined from the dark channel image represents the brightness of the fog-free area in the scene of the visible light image.
[0080] By determining multiple candidate pixel points with the largest pixel values in the dark channel image, the areas in the visible light image that are least affected by fog or not affected by fog can be determined, so that defogging of the areas affected by fog in the visible light image can be achieved based on these areas that are least affected by fog or not affected by fog.
[0081] In this way, the maximum of the brightness values of the corresponding pixel points of the candidate pixel in the visible light image is taken as the atmospheric light value, and the dark channel defogging algorithm and the atmospheric light value are used to defog the visible light image to obtain the target image, which can avoid the influence of fog in the obtained target image.
[0082] In one embodiment, a dark channel defogging algorithm and the atmospheric light value are used to defog the visible light image to obtain a target image, including: using the step of determining the pixel points in the transmittance map in the dark channel defogging algorithm and the atmospheric light value, determining the transmittance map corresponding to the visible light image, so as to obtain the target image 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.
[0083] When the visible light image is affected by fog, due to the scattering effect of fog, the consistency of the grayscale value 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 defogged image can maintain the naturalness and local details of the original visible light image; and by processing the fog 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 of the pixel value of the target pixel in the target image and the addition operation of the atmospheric value can ensure that no negative value will appear in the process of defogging the visible light image, thereby avoiding unnatural color distortion of the visible light image.
[0085] For two pixels with grayscale values of 100 and 70 in the foggy image, the grayscale difference between the two pixels is 30; when the atmospheric light value is 50, the transmittance at the two pixels can be 0.6 and 0.4 respectively; for a pixel with a grayscale value of 100 in the foggy image, the grayscale value after defogging is 50+(100-50) / 0.6=133; for a pixel with a grayscale value of 70 in the foggy image, the grayscale value after defogging is 50+(70-50) / 0.6=83.
[0086] After dehazing, the grayscale difference between two pixels is equal to 50, and the grayscale difference between pixels becomes larger after dehazing; the contrast between two pixels before dehazing is equal to (100-70) / 70=42.86%, and the contrast between two pixels after dehazing is equal to (133-83) / 83=60.24%. The contrast between two pixels is improved after dehazing.
[0087] In this way, by utilizing the pixel value of the target pixel in the visible light image and the atmospheric light value, the contrast between the pixels in the obtained target image is improved, and the texture information and other detail information in the visible light image can be presented more clearly, effectively avoiding the influence of fog on the image contrast.
[0088] In one embodiment, the transmittance map corresponding to the visible light image is determined by using the step of determining the pixel points in the transmittance map in the dark channel defogging algorithm and the atmospheric light value, including: , g is the pixel value of the target pixel in the transmittance map, is a preset positive coefficient less than 1, min is the minimum value, E is the pixel value of the target pixel in the visible light image, and F is the atmospheric light value.
[0089] The atmospheric light value is the global illumination component caused by atmospheric scattering in the image. By comparing the grayscale value of the target pixel with the atmospheric light value and taking the minimum value, the influence of atmospheric light 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 process of determining the atmospheric light value can adapt to the scenario of defogging foggy images under different fog concentrations; for example, under dense fog conditions, the actual transmittance becomes lower, and the E / F value will be close to 1, so that the obtained transmittance will be correspondingly reduced; under light fog conditions, the actual transmittance becomes higher, and the E / F value will be less than 1, so that the obtained transmittance will increase as the actual transmittance increases.
[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 , which can improve the dehazing effect of visible light images while retaining the detail information in the image.
[0092] In this way, according to the pixel value of the target pixel in the visible light image and the atmospheric light value, the transmittance matching the actual transmittance can be determined, so as to realize the defogging process of the visible light image by using the transmittance map.
[0093] In one embodiment, the quality detection model is trained in the following manner: obtaining a sample image of a curtain wall sample and a quality detection label pre-annotated for the sample image, wherein 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, quality inspection labels of the curtain wall samples in the sample images can be marked; for example, the quality inspection label includes quality inspection passed 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.
[0095] In this way, the pre-constructed network model is trained using sample images and quality inspection labels corresponding to the sample images to obtain a quality inspection model. In subsequent steps, the quality inspection model can be used to output the quality inspection results of the target image corresponding to the curtain wall, thereby realizing automated inspection of the construction quality of the curtain wall and reducing the workload of personnel performing visual inspections.
[0096] At the same time, since the curtain wall is set on the facade of the building, the visible light image of the curtain wall is obtained by drones and other equipment, and the visible light image is processed to obtain the target image, so that the target image is input into the quality inspection model to output the quality inspection result. Compared with manual inspection, it can avoid the threat to personnel safety when performing high-altitude operations, and therefore can ensure the safety of personnel.
[0097] The model structure of the pre-built 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 impose any limitation on the model structure of the pre-built network model.
[0098] In one embodiment, the quality detection model is trained in the following manner: a sample image of a curtain wall sample and a mask image corresponding to the sample image are obtained, wherein the pixel values of pixels other than abnormal pixels in the mask image are 0; the sample image is used as the input of a pre-constructed network model, and the mask image corresponding to the sample image is used as the output of the network model, so as to train the network model 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.
[0099] By training the quality inspection model, it is possible to use the quality inspection model to output an image composed of defective pixels 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 deal with the defect.
[0100] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary technical means in the art that are not disclosed in the present application, and the specification and embodiments are only considered as exemplary.
[0101] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
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 of the target pixel point relative to the target pixel point; 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 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 reference value coefficient of the reference pixel is determined in the following way: , where Q is the reference value coefficient of the reference pixel, exp is an exponential function with a natural constant as the base, R is the noise probability value of the reference pixel, and 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 pixel value of the target pixel in the neighborhood of the nth channel, and C is the complexity value of the reference pixel’s neighborhood.
3. The curtain wall construction quality detection method according to claim 2, characterized in that: The complexity value of the neighborhood range of the reference pixel is determined in the following way: , C is the complexity value of the neighborhood range of the reference pixel, T is the number of pixels in the neighborhood range of the reference pixel, is the frequency ratio of the tth eigenvalue in the eigenvalue set of the neighborhood range corresponding to 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 in the neighborhood range of the same pixel point.
4. 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.
5. 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.
6. 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.
7. The curtain wall construction quality detection method according to claim 6, 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.
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: 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.
9. The curtain wall construction quality detection method according to claim 8, 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.
10. The curtain wall construction quality detection method according to claim 1, characterized in that: The quality detection model is trained in the following way: Obtaining 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
Online detection method for damage of printing scraper
CN119131016A
Rapid defect marking, training and image screening method and system for stone curtain wall millimeter wave image
CN119417813A
Method for image defogging based on dark channel prior
US20240104702A1