A decoration quality detection method and system based on artificial intelligence

By building reference blocks and neighborhood blocks in decoration quality detection, calculating filter weights, and using segmented neural network to detect coating quality, solving the impact of image noise on detection effect, and achieving efficient coating quality detection.

CN117764967BActive Publication Date: 2025-08-12SHAANXI DONGWEILI ARCHITECTURAL DECORATION ENG CO LTD

Patent Information

Application Number
CN202311838072.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-28
Publication Date
2025-08-12
Estimated Expiration
2043-12-28

AI Technical Summary

Technical Problem

Among the existing decoration quality detection methods based on artificial intelligence, image noise has a great impact on coating construction quality detection, resulting in poor filtering effect.

Method used

By collecting the wall coating images, filtering out the pixel points to be filtered, the reference block and neighborhood block are constructed according to the gradient direction of the pixel points, the filter weight is calculated, and the coating quality is detected using a segmented neural network.

Benefits of technology

It improves the accuracy and efficiency of coating quality detection, effectively removes noise interference, and ensures efficient detection of coating quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117764967B_ABST
    Figure CN117764967B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image data processing technology, and in particular to an artificial intelligence-based decoration quality detection method and system, comprising: collecting a wall coating image and screening out noise pixels to be filtered; obtaining a reference block and a plurality of target neighborhood blocks for each noise pixel to be filtered based on the gradient direction of each noise pixel to be filtered and its surrounding pixels; obtaining a filtering weight for each target neighborhood block corresponding to each noise pixel to be filtered based on the direction difference between the reference block and the corresponding target neighborhood block of each noise pixel to be filtered; obtaining a filtering result for each noise pixel to be filtered based on the filtering weight of each neighborhood block corresponding to each noise pixel to be filtered, and performing coating quality detection. The present invention improves the quality of the wall coating by filtering the noise pixels to be filtered with different filtering weights, thereby achieving efficient decoration coating quality detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing, and in particular to a decoration quality detection method and system based on artificial intelligence. Background Art

[0002] With the continuous development of artificial intelligence technology, artificial intelligence-based decoration quality inspection methods and systems are gradually becoming a hot area in the decoration industry. Artificial intelligence decoration quality inspection methods and systems mainly use on-site image data to achieve rapid and accurate assessment of decoration quality. Generally, coating surface defects are relatively small, so image noise has a greater impact on the detection effect.

[0003] Non-local mean filtering is usually used for denoising. However, since the brushing directions at different locations may be different, the directions of the brush marks in the image are different, and the possibility of brush marks appearing at different locations and the density of the brush marks are different. At this time, the reference blocks with the same direction may cause the features within the reference blocks to be quite different from the overall features of the image, resulting in fewer neighborhood blocks and low similarity, which leads to poor filtering effect and reduces the effect of decoration quality detection. Summary of the Invention

[0004] The present invention provides a decoration quality detection method and system based on artificial intelligence to solve the existing problem that image noise has a significant impact on the detection of paint construction quality.

[0005] The invention provides an artificial intelligence-based decoration quality detection method and system using the following technical solutions:

[0006] An embodiment of the present invention provides a decoration quality detection method based on artificial intelligence, which includes the following steps:

[0007] Collect wall coating images;

[0008] In the wall coating image, the noise pixels to be filtered are selected based on the differences between the grayscale values of the pixels.

[0009] According to the gradient direction of each noise pixel to be filtered and its surrounding pixels, the texture vertical direction of each noise pixel to be filtered is obtained; according to the texture vertical direction of each noise pixel to be filtered, the reference block of each noise pixel to be filtered is obtained;

[0010] According to the reference block of each noise pixel to be filtered, several neighborhood blocks of each noise pixel to be filtered are obtained; according to the difference between the reference block of each noise pixel to be filtered and its neighborhood blocks, several target neighborhood blocks of each noise pixel to be filtered are obtained;

[0011] According to the direction difference between the reference block of each noise pixel to be filtered and the corresponding target neighborhood block, the filtering weight of each target neighborhood block corresponding to each noise pixel to be filtered is obtained;

[0012] According to the filtering weight of each neighborhood block corresponding to each noise pixel to be filtered, the grayscale value of each noise pixel to be filtered is obtained; and the coating quality is detected according to the filtered grayscale value of each noise pixel to be filtered.

[0013] Furthermore, the method of filtering out noise pixels to be filtered in the wall coating image according to the difference between the grayscale values of the pixels comprises the following specific steps:

[0014] Calculate the average absolute difference of each pixel on the coating image, where the average absolute difference is the absolute value of the difference between the grayscale value of each pixel on the coating image and the average grayscale value of all pixels;

[0015] On the coating image, the pixels whose mean absolute difference is greater than the preset grayscale threshold are recorded as noise pixels to be filtered;

[0016] Pixels whose mean absolute difference is less than or equal to the preset grayscale threshold are recorded as normal pixels.

[0017] Furthermore, the step of obtaining the texture vertical direction of each noise pixel to be filtered according to the gradient direction of each noise pixel to be filtered and its surrounding pixels includes the following steps:

[0018] Use the Sobel operator to calculate the gradient of each pixel in the wall coating image;

[0019] On the coating image, a local neighborhood block of size N1×N1 is constructed with any noise pixel to be filtered as the center, where N1 is the preset neighborhood block side length;

[0020] The sum of the gradients of all pixels in the local neighborhood block is calculated, and the direction corresponding to the sum of the gradients is recorded as the texture vertical direction of the noise pixel to be filtered.

[0021] Furthermore, the step of obtaining a reference block of each noise pixel to be filtered according to the texture vertical direction of each noise pixel to be filtered comprises the following specific steps:

[0022] On the coating image, with any noise pixel to be filtered as the center, a reference block of noise pixels to be filtered of size N0×N0 is constructed, where N0 is the preset side length of the reference block, and the side length directions of the reference block of noise pixels to be filtered are respectively the texture vertical direction Y and the texture direction X of the noise pixel to be filtered;

[0023] The lengths of the sides corresponding to the X and Y directions of the reference block of the noise pixel to be filtered are recorded as the X side and the Y side respectively;

[0024] The texture direction X is obtained by recording the direction perpendicular to the Y direction of the noise pixel to be filtered as the texture direction X.

[0025] Furthermore, the step of obtaining a plurality of neighborhood blocks of each noise pixel to be filtered based on the reference block of each noise pixel to be filtered comprises the following specific steps:

[0026] On the coating image, a search range with a radius of r is constructed with any noise pixel to be filtered as the center, where r is a preset search range radius;

[0027] According to the acquisition process of the reference block of each noise pixel to be filtered, the reference block of each pixel in the search range and the X side and Y side of the reference block of each pixel are obtained;

[0028] Within the search range, with any pixel as the center, the reference block of the pixel is rotated by θ1 degrees and θ2 degrees in the clockwise and counterclockwise directions, respectively, to obtain several rotated reference blocks; θ1 is a preset first rotation angle; θ2 is a preset second rotation angle;

[0029] The reference blocks of each pixel point in the search range and all rotated reference blocks are recorded as the neighborhood blocks of the noise pixel point to be filtered.

[0030] Furthermore, the step of obtaining a plurality of target neighborhood blocks of each noise pixel to be filtered based on the difference between the reference block of each noise pixel to be filtered and its neighborhood blocks includes the following specific steps:

[0031] On the coating image, in a reference block and several neighboring blocks of any noise pixel to be filtered, the variance of the grayscale values of all pixels in the reference block is recorded as the eigenvalue of the reference block;

[0032] The variance of the grayscale values of all pixels in each neighborhood block is recorded as the characteristic value of each neighborhood block;

[0033] The absolute value of the difference between the feature values of the reference block and each neighboring block is recorded as the similarity between the reference block and each neighboring block;

[0034] The N2 neighborhood blocks with the greatest similarity to the reference block are recorded as target neighborhood blocks, where N2 is the preset number of target neighborhood blocks.

[0035] Furthermore, the filtering weight of each target neighborhood block corresponding to each noise pixel to be filtered is obtained according to the direction difference between the reference block and the corresponding target neighborhood block of each noise pixel to be filtered, including the specific steps of:

[0036] The jth target neighborhood block corresponding to the i-th noise pixel to be filtered is recorded as the corresponding block;

[0037] Calculate the sum of the gradients of all pixels in the corresponding block and record it as the vector of the corresponding block;

[0038] The horizontal right direction is recorded as 0 ° , counterclockwise rotation is the direction of angle increase, and the angle value corresponding to each direction is obtained;

[0039] The filter weight calculation formula for the corresponding block is as follows:

[0040]

[0041] Among them, P i,j Indicates the filter weight of the corresponding block, SSIM i,j Represents the structural similarity index between the reference block and the corresponding block of the i-th noise pixel to be filtered, Δθ i,j Yθ is the minimum value of the angle between any X edge of the reference block of the i-th noise pixel to be filtered and any X edge of the corresponding block, i Indicates the Y-direction angle value of the reference block of the i-th noise pixel to be filtered, Dθ i,j It represents the angle value of the vector direction of the corresponding block, || represents the absolute value, and norm() represents the normalization function.

[0042] Furthermore, the grayscale value of each noise pixel to be filtered after filtering is obtained according to the filtering weight of each neighborhood block corresponding to each noise pixel to be filtered, including the specific formula:

[0043]

[0044] Among them, f i is the grayscale value of the i-th noise pixel to be filtered after filtering, q i,j P represents the gray value of the pixel at the center of the jth target neighborhood block corresponding to the i-th noise pixel to be filtered, i,j It represents the filtering weight of the jth target neighborhood block corresponding to the i-th noise pixel to be filtered, and N2 represents the number of target neighborhood blocks corresponding to the j-th noise pixel to be filtered.

[0045] Furthermore, the coating quality detection is performed according to the filtered grayscale value of each noise pixel to be filtered, including the following specific steps:

[0046] The image composed of the grayscale values of all the noise pixels to be filtered and the grayscale values of all the normal pixels is recorded as the enhanced image;

[0047] Use the trained segmentation neural network to segment the brush mark area and normal area in the enhanced image;

[0048] The ratio of the brush mark area to the normal area is recorded as the coating quality index;

[0049] When the coating quality index is greater than or equal to the preset quality threshold, the quality of the wall coating is judged to be unqualified;

[0050] When the coating quality index is less than the preset quality threshold, the quality of the decorated wall coating is determined to be qualified.

[0051] The present invention also proposes an artificial intelligence-based decoration quality inspection system, including a memory, a processor, and a computer program stored in the memory and runnable on the processor. The processor executes the computer program stored in the memory to implement the steps of the aforementioned artificial intelligence-based decoration quality inspection method.

[0052] The beneficial effects of the technical solution of the present invention are:

[0053] In the embodiment of the present invention, a wall coating image is collected and noise pixels to be filtered are obtained. According to the gradient direction of each noise pixel to be filtered and its surrounding pixels, a reference block and a reference block direction of each noise pixel to be filtered are obtained, so that the reference block has more obvious feature expression, thereby improving its filtering accuracy. According to the reference block of each noise pixel to be filtered, a target neighborhood block is obtained, and the consistency of texture expression between the neighborhood block and the reference block is improved. At the same time, the neighborhood block is rotated to avoid texture expression deviation caused by changes in texture direction between the neighborhood block position and the reference block position, thereby further improving texture consistency between the neighborhood block and the reference block, and facilitating the acquisition of texture consistency. Neighborhood blocks with higher similarity are conducive to improving the filtering effect of noise points; according to the direction difference between each noise pixel point to be filtered and the corresponding target neighborhood block, the filtering weight of each target neighborhood block corresponding to each noise pixel point to be filtered is obtained, and the coating quality is detected according to the filtering weight of each neighborhood block corresponding to each pixel point to be filtered, thereby further improving the influence of texture consistency on the filtering result, and avoiding the texture performance difference caused by the change of texture direction at different positions, thereby effectively improving the final filtering effect. The present invention improves the quality of wall coating by filtering the noise pixel points to be filtered with different filtering weights, and realizes efficient detection of decoration coating quality. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0055] Figure 1 The present invention is a flowchart of the steps of a decoration quality detection method based on artificial intelligence. DETAILED DESCRIPTION

[0056] To further illustrate the technical means and effectiveness of the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, describes in detail the specific implementation, structure, features, and effectiveness of an artificial intelligence-based decoration quality inspection method and system proposed by the present invention. In the following description, different references to "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics of one or more embodiments may be combined in any suitable manner.

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

[0058] The following describes in detail a specific solution of a decoration quality detection method and system based on artificial intelligence provided by the present invention with reference to the accompanying drawings.

[0059] See also Figure 1 , which shows a flowchart of a decoration quality detection method based on artificial intelligence provided by an embodiment of the present invention, the method includes the following steps:

[0060] Step S001: Collect wall coating images.

[0061] It should be noted that during the construction of wall coating, the brushing direction at different positions may be different, resulting in different directions of brush marks in the image, and the possibility of brush marks appearing at different positions and the density of brush marks appearing are different. At this time, the reference block with the same direction may cause the features within the reference block to be quite different from the overall features of the image, resulting in fewer neighborhood blocks and low similarity, which leads to poor filtering effect.

[0062] For the wall coating in the decoration process, it can be either indoor wall coating or outdoor wall coating. For indoor wall coating, the coating image is directly captured by a fixed camera indoors. For outdoor wall coating, a fixed camera or a drone is used to collect images and grayscale processing is performed to obtain the wall coating image.

[0063] At this point, the wall coating image is obtained through the above method.

[0064] Step S002: In the wall coating image, noise pixels to be filtered are screened out based on the differences between the grayscale values of the pixels.

[0065] It should be noted that wall coatings are generally required to be flat and smooth, so there are relatively few features in the captured coating images. The main detail features are the coating brush marks, and the noise mainly interferes with the recognition of brush marks. Therefore, it is necessary to obtain noise pixels first. Since most pixels in the image are non-noise, in order to facilitate calculation, it is necessary to first filter out all noise pixels to be filtered. The noise performance of general pixels can be directly expressed by the mean absolute difference, where the mean absolute difference is to first calculate the mean of the grayscale values of all pixels, and then calculate the absolute value of the difference between the grayscale value of each pixel and the mean, which is the average absolute difference of each pixel. The larger the mean absolute difference, the higher the pixel noise performance.

[0066] Specifically, calculate the mean absolute difference MAD of each pixel c In this embodiment, the grayscale threshold MAD0=50 is preset. This is used as an example for description. In other implementations, it can be set to other values. This embodiment does not limit it. c Pixels with >MAD0 are recorded as noise pixels to be filtered, and the others are normal pixels.

[0067] At this point, the noise pixels to be filtered on the image are obtained through the above method.

[0068] Step S003: Obtain the texture vertical direction of each noise pixel to be filtered according to the gradient direction of each noise pixel to be filtered and its surrounding pixels; obtain the reference block of each noise pixel to be filtered according to the texture vertical direction of each noise pixel to be filtered.

[0069] It should be noted that in the process of non-local mean filtering of noise points, the characteristics of the reference block constructed for the noise point will directly affect the filtering effect. Generally, it is required that the reference block has relatively obvious image features, and its image features are convenient for determining the neighborhood blocks. The coating on the wall may be painted in different directions at different positions during the construction process, resulting in different brush marks in the image. The possibility of brush marks appearing at different positions and the density of brush marks appearing are different. At this time, the same reference block may cause the characteristics within the reference block to be quite different from the image characteristics, resulting in a small number of neighborhood blocks and low similarity, resulting in poor filtering effect. Therefore, when constructing a reference block for the pixel to be filtered, it is necessary to consider the texture direction around the pixel to be filtered, that is, the reference block construction direction is close to the texture direction, and then the filtering weight of the neighborhood block is determined according to the relationship between the reference block and the neighborhood block direction. In order to improve the feature performance of the reference block, a more similar neighborhood block is determined, and the reference block direction of the noise pixel to be filtered needs to be close to the texture direction around the pixel to be filtered. Therefore, the texture direction and corresponding texture performance around the noise pixel to be filtered should be determined first.

[0070] The gradient of each pixel in the wall coating image is calculated using the Sobel operator, which is a well-known technique and will not be described in detail here.

[0071] Specifically, the texture direction of the location of the noise pixel to be filtered is mainly reflected by the local gradient direction. Therefore, first, with each noise pixel to be filtered as the center, the size of the local neighborhood block of each noise pixel to be filtered is determined to be N1×N1. The neighborhood block side length N1=9 is preset in this embodiment and is described as an example. Other implementations may set it to other values, which are not limited in this embodiment. Then, the gradients of all pixels in the current local neighborhood block are calculated, and the corresponding gradient vectors are determined. At this time, the direction of the sum vector obtained by summing all the gradient vectors in the local neighborhood block is the texture vertical direction of the current local neighborhood block, that is, the texture vertical direction of each noise pixel to be filtered is obtained.

[0072] Furthermore, after determining the texture direction of the position of the noise pixel to be filtered, a reference block is constructed. The reference block is a rectangle centered on the noise pixel to be filtered. At this time, the two mutually perpendicular side directions of the rectangle need to be divided into the texture direction of the position of the noise pixel to be filtered and the texture vertical direction. The reference block side in the texture direction is recorded as the X direction, and the reference block side in the texture vertical direction is recorded as the Y direction, that is, the X direction is the vertical direction of the Y direction, and X and Y represent the reference block direction. After determining the reference block direction, it is necessary to determine the size of the reference block. In this embodiment, the size of the reference block is directly set to N0×N0. The reference block side length N0=11 preset in this embodiment is described as an example. It can be set to other values in other implementation methods, and this embodiment does not limit it.

[0073] The edges corresponding to the X and Y directions of the reference block are recorded as X edge and Y edge respectively.

[0074] Step S004: obtain several neighborhood blocks of each noise pixel to be filtered based on the reference block of each noise pixel to be filtered; obtain several target neighborhood blocks of each noise pixel to be filtered based on the difference between the reference block of each noise pixel to be filtered and its neighborhood blocks.

[0075] It should be noted that after determining the reference block of the noise pixel to be filtered, it is first necessary to obtain its corresponding neighborhood block and filter out the target neighborhood block.

[0076] Specifically, for each noise pixel to be filtered, a neighborhood block with the same direction as the reference block is first constructed for each pixel within its search range. That is, according to the acquisition process of the reference block of each noise pixel to be filtered, the reference block of each pixel within the search range and the X and Y edges of the reference block of each pixel within the search range are obtained. The reference block of each pixel within the search range is the neighborhood block corresponding to the reference block of the noise pixel to be filtered.

[0077] The preset search range radius of this embodiment is r=100, which is used as an example for description. Other implementation methods may be set to other values, which are not limited in this embodiment. However, the direction of the brush marks on the wall coating may change, so the texture direction of the currently constructed neighborhood block with the same direction as the reference block may be significantly different from that of the reference block, thereby affecting the consistency of the texture features of the neighborhood block and the reference block. In order to improve the texture feature performance of the neighborhood block and the consistency with the texture performance of the reference block, this embodiment rotates the neighborhood block on the basis of the neighborhood block constructed above to form multiple neighborhood blocks in different directions, wherein each neighborhood block is rotated 5 times in the clockwise direction and counterclockwise direction around its center pixel point. ° with 10 ° , so that each position forms 5 neighborhood blocks with different directions, and the X and Y directions of the neighborhood blocks are determined based on the texture representation. Since only the neighborhood blocks are rotated, the X and Y sides of the neighborhood blocks are still determined.

[0078] In this embodiment, the preset first rotation angle θ1 is 5 degrees, and the preset second rotation angle θ2 is 10 degrees. This is described as an example. Other implementations may set it to other values, which are not limited in this embodiment.

[0079] Furthermore, for the search range corresponding to each noise pixel to be filtered, the neighborhood block corresponding to its reference block is determined according to the pixel similarity between the constructed neighborhood block and the reference block, the variance of the grayscale values of all pixels in the reference block is recorded as the eigenvalue of the reference block, the variance of the grayscale values of all pixels in each neighborhood block is recorded as the eigenvalue of each neighborhood block, and the absolute value of the difference between the eigenvalues of the reference block and each neighborhood block is recorded as the similarity between the reference block and each neighborhood block.

[0080] Furthermore, based on the similarity between the obtained reference block and the target neighborhood block, the target neighborhood block corresponding to the reference block of the current noise pixel to be filtered is screened out, and specifically, N2 neighborhood blocks with the highest similarity to the reference block are directly selected as the target neighborhood blocks. In this embodiment, the preset number of target neighborhood blocks N2=30 is described as an example. In other implementations, it can be set to other values, which is not limited in this embodiment.

[0081] Step S005 : Obtain a filtering weight of each target neighborhood block corresponding to each noise pixel to be filtered according to the direction difference between the reference block and the corresponding target neighborhood block of each noise pixel to be filtered.

[0082] It should be noted that in this embodiment, since the directions of the reference blocks are different, the neighborhood blocks required for filtering also require neighborhood blocks in different directions, and the neighborhood blocks in different directions have an impact on the filtering weights. In the actual filtering process, it is necessary to consider the impact of the neighborhood blocks and the reference block directions on the filtering weights.

[0083] Specifically, the above method is used to determine the N2 target neighborhood blocks corresponding to each reference block of the pixel point to be filtered, and then the obtained target neighborhood blocks are used to perform noise point filtering. At this time, different target neighborhood blocks have different local effects on the filtering results, that is, different target neighborhood blocks have different filtering weights.

[0084] The filtering weight of the target neighborhood block mainly depends on the consistency of the feature performance relative to the reference block, and the feature performance in the current coating image is mainly brush mark texture, that is, the texture performance relationship between the target neighborhood block and the reference block directly affects its filtering weight, and the direction of the corresponding target neighborhood block and the reference block in this embodiment further affects their feature performance relationship, thereby affecting their filtering weight.

[0085] The higher the texture consistency between the target neighborhood block and the reference block, the higher the filtering weight. The more consistent the direction of the target neighborhood block and the reference block, the higher the filtering weight. The more consistent the direction of the target neighborhood block and the texture direction, the higher the filtering weight. The texture consistency between the target neighborhood block and the reference block is represented by the structural similarity index. The larger the structural similarity index, the higher the texture consistency between the target neighborhood block and the reference block. The directional consistency between the target neighborhood block and the reference block can be expressed as the angle value in the X direction between the target neighborhood block and the reference block. The larger the angle value, the lower the directional consistency between the target neighborhood block and the reference block. The consistency between the direction of the target neighborhood block and the texture direction is the consistency between the texture direction of the target neighborhood block and the reference block in the X direction.

[0086] The reference block where the i-th noise pixel to be filtered is located and the corresponding j-th target neighborhood block are recorded as corresponding blocks, and the sum of the gradients of all pixels in the corresponding block is calculated to obtain the vector of the corresponding block.

[0087] The horizontal right direction is recorded as 0 ° , counterclockwise rotation means the angle increases, clockwise rotation means the angle decreases. Thus we can get the angle value corresponding to each direction.

[0088] Based on this, the filtering weight of the target neighborhood block corresponding to the pixel to be filtered is determined as:

[0089]

[0090] Among them, P i,j Indicates the filter weight of the corresponding block, SSIM i,j Represents the structural similarity index between the reference block and the corresponding block of the i-th noise pixel to be filtered, Δθ i,j Yθ is the minimum value of the angle between any X edge of the reference block of the i-th noise pixel to be filtered and any X edge of the corresponding block, i Indicates the Y-direction angle value of the reference block of the i-th noise pixel to be filtered, Dθ i,j It represents the angle value of the vector direction of the corresponding block, || represents the absolute value, and norm() represents the normalization function.

[0091] What needs to be explained is that since the corresponding block may be a rotated neighborhood block, Δθ i,j The larger the value, the larger the rotation angle, the greater the difference in direction from the reference block, and the smaller the filtering weight should be. i,j -Yθ i The smaller | is, the closer the texture directions of the reference block and the corresponding block are. The reason for adding 1 to the denominator in the formula is to prevent the denominator from being 0. The calculation of the structural similarity index between the reference block and the corresponding block is a well-known technology, and the specific method is not introduced here.

[0092] At this point, the reference block and the neighborhood block are obtained through the above method, and the filtering weight is determined.

[0093] Step S006: Obtain the filtered grayscale value of each noise pixel to be filtered according to the filtering weight of each neighborhood block corresponding to each noise pixel to be filtered; and perform coating quality detection according to the filtered grayscale value of each noise pixel to be filtered.

[0094] Specifically, after determining the filter weights of the plurality of neighborhood blocks corresponding to all noise pixels to be filtered, the noise points are directly filtered.

[0095] The filtering result of the noise pixel to be filtered is:

[0096]

[0097] Among them, f i is the grayscale value of the i-th noise pixel to be filtered after filtering, q i,j Indicates the gray value of the center point of the corresponding block, P i,j Represents the filtering weight of the corresponding block, and N2 represents the number of target neighborhood blocks corresponding to the jth noise pixel to be filtered.

[0098] According to the above method, the filtering result of each noise pixel to be filtered is obtained, and the enhanced image is obtained according to the threshold value after filtering of all noise pixels to be filtered and the threshold value of normal pixels.

[0099] Furthermore, the embodiment of the present invention uses a segmentation neural network to identify the brush mark area and the normal area in the segmentation enhanced image.

[0100] The relevant content of the segmentation neural network is as follows:

[0101] The segmentation neural network used in this example is the Mask R-CNN neural network, and the dataset used is an enhanced image dataset. Mask R-CNN is a well-known technique, and the specific method is not described here. Mask R-CNN stands for "Mask Region-based Convolutional Neural Network" in Chinese and "Mask Region-based Convolutional Neural Network" in English.

[0102] The pixels that need to be segmented are divided into two categories, that is, the labeling process of the training set is: single-channel semantic label, the corresponding position pixel belongs to the normal area is labeled as 0, and the corresponding position pixel belongs to the brush mark area is labeled as 1.

[0103] The task of the network is classification, so the loss function used is the cross entropy loss function.

[0104] The brush mark area and normal area in the enhanced image are obtained by segmenting the neural network. This process is a well-known technology and the specific method will not be introduced here.

[0105] Then, the decoration quality is judged according to the size of the brush mark area obtained, and the ratio of the brush mark area obtained by segmentation to the normal area is used to reflect the coating quality index, thereby realizing the detection of coating quality.

[0106] The preset quality threshold in this embodiment is 0.1, which is used as an example for description. In other implementations, it can be set to other values, which are not limited in this embodiment.

[0107] When the coating quality index is greater than or equal to the preset quality threshold, the quality of the decorated wall coating is judged to be unqualified.

[0108] When the coating quality index is less than the preset quality threshold, the quality of the decorated wall coating is determined to be qualified.

[0109] Through the above steps, the artificial intelligence decoration quality inspection is completed.

[0110] Another embodiment of the present invention provides an artificial intelligence-based decoration quality detection system, the system comprising a memory and a processor, wherein when the processor executes a computer program stored in the memory, the processor performs the following operations:

[0111] Collect wall coating images;

[0112] In the wall coating image, the noise pixels to be filtered are selected based on the differences between the grayscale values of the pixels.

[0113] According to the gradient direction of each noise pixel to be filtered and its surrounding pixels, the texture vertical direction of each noise pixel to be filtered is obtained; according to the texture vertical direction of each noise pixel to be filtered, the reference block and the reference block direction of each noise pixel to be filtered are obtained;

[0114] According to the reference block of each noise pixel to be filtered, several neighborhood blocks of each noise pixel to be filtered are obtained; according to the difference between the reference block of each noise pixel to be filtered and its neighborhood blocks, several target neighborhood blocks of each noise pixel to be filtered are obtained;

[0115] According to the direction difference between the reference block of each noise pixel to be filtered and the corresponding target neighborhood block, the filtering weight of each target neighborhood block corresponding to each noise pixel to be filtered is obtained;

[0116] According to the filtering weight of each neighborhood block corresponding to each noise pixel to be filtered, the filtering result of each noise pixel to be filtered is obtained; and according to the filtering result of each noise pixel to be filtered, the coating quality is detected.

[0117] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A decoration quality detection method based on artificial intelligence, characterized in that: The method comprises the following steps: Collect wall coating images; In the wall coating image, the noise pixels to be filtered are selected based on the differences between the grayscale values of the pixels. Construct a local neighborhood block centered on the noise pixel to be filtered; Calculate the direction corresponding to the sum of the gradients of all pixels in the local neighborhood block, and record it as the texture vertical direction of the noise pixel to be filtered; Construct a reference block with the noise pixel to be filtered as the center and the texture vertical direction of the noise pixel to be filtered as a side length direction; Construct a search range centered on the noise pixel to be filtered; construct a reference block for each pixel in the search range with the texture perpendicular direction of the noise pixel to be filtered as a side length direction; In the search range, with any pixel as the center, the reference block of the pixel is rotated clockwise and counterclockwise respectively. Degree and degrees, and obtain several rotated reference blocks; is a preset first rotation angle; is a preset second rotation angle; The reference block of each pixel point in the search range and all the rotated reference blocks are recorded as the neighborhood blocks of the noise pixel point to be filtered; according to the difference between the reference block of each noise pixel point to be filtered and its neighborhood blocks, several target neighborhood blocks of each noise pixel point to be filtered are obtained; According to the direction difference between the reference block of each noise pixel to be filtered and the corresponding target neighborhood block, the filtering weight of each target neighborhood block corresponding to each noise pixel to be filtered is obtained; According to the filtering weight of each neighborhood block corresponding to each noise pixel to be filtered, the grayscale value of each noise pixel to be filtered is obtained; and the coating quality is detected according to the filtered grayscale value of each noise pixel to be filtered.

2. The decoration quality detection method based on artificial intelligence according to claim 1 is characterized in that: The method of filtering out noise pixels to be filtered in the wall coating image based on the differences between the grayscale values of the pixels includes the following specific steps: Calculate the average absolute difference of each pixel on the coating image, where the average absolute difference is the absolute value of the difference between the grayscale value of each pixel on the coating image and the average grayscale value of all pixels; On the coating image, the pixels whose mean absolute difference is greater than the preset grayscale threshold are recorded as noise pixels to be filtered; Pixels whose mean absolute difference is less than or equal to the preset grayscale threshold are recorded as normal pixels.

3. The decoration quality detection method based on artificial intelligence according to claim 1 is characterized in that: The specific steps of obtaining a plurality of target neighborhood blocks of each noise pixel to be filtered based on the difference between the reference block of each noise pixel to be filtered and its neighborhood blocks are as follows: On the coating image, in a reference block and several neighboring blocks of any noise pixel to be filtered, the variance of the grayscale values of all pixels in the reference block is recorded as the eigenvalue of the reference block; The variance of the grayscale values of all pixels in each neighborhood block is recorded as the characteristic value of each neighborhood block; The absolute value of the difference between the feature values of the reference block and each neighboring block is recorded as the similarity between the reference block and each neighboring block; The N2 neighborhood blocks with the greatest similarity to the reference block are recorded as target neighborhood blocks, where N2 is the preset number of target neighborhood blocks.

4. The decoration quality detection method based on artificial intelligence according to claim 1 is characterized in that: The specific steps of obtaining the filtering weight of each target neighborhood block corresponding to each noise pixel to be filtered according to the direction difference between the reference block and the corresponding target neighborhood block of each noise pixel to be filtered are as follows: The first The noise pixel to be filtered corresponds to the target neighborhood blocks, recorded as corresponding blocks; Calculate the sum of the gradients of all pixels in the corresponding block and record it as the vector of the corresponding block; The horizontal right direction is recorded as , counterclockwise rotation is the direction of angle increase, and the angle value corresponding to each direction is obtained; The texture vertical direction of the noise pixel to be filtered is recorded as direction; The edge of the reference block that is perpendicular to the texture of the noise pixel to be filtered is recorded as the X edge; The filter weight calculation formula for the corresponding block is as follows: in, represents the filter weight of the corresponding block, Indicates the The structural similarity index between the reference block of noise pixels to be filtered and the corresponding block, For the The minimum value of the angle between any X side of the reference block and any X side of the corresponding block of the noise pixels to be filtered, Indicates the The reference block of noise pixels to be filtered The angle value of the direction, The angle value representing the vector direction of the corresponding block, Indicates taking the absolute value, Represents the normalization function.

5. The decoration quality detection method based on artificial intelligence according to claim 1 is characterized in that: The grayscale value of each noise pixel to be filtered after filtering is obtained according to the filtering weight of each neighborhood block corresponding to each noise pixel to be filtered, including the specific formula: in, For the The gray value of the noise pixel to be filtered after filtering, Indicates the The noise pixel to be filtered corresponds to the The grayscale value of the pixel at the center of the target neighborhood block, Indicates the The noise pixel to be filtered corresponds to the The filter weights of the target neighborhood blocks, Indicates the The number of target neighborhood blocks corresponding to the noise pixels to be filtered.

6. The decoration quality detection method based on artificial intelligence according to claim 2 is characterized in that: The coating quality detection is performed according to the filtered grayscale value of each noise pixel to be filtered, and the specific steps include: The image composed of the grayscale values of all the noise pixels to be filtered and the grayscale values of all the normal pixels is recorded as the enhanced image; Use the trained segmentation neural network to segment the brush mark area and normal area in the enhanced image; The ratio of the brush mark area to the normal area is recorded as the coating quality index; When the coating quality index is greater than or equal to the preset quality threshold, the quality of the wall coating is judged to be unqualified; When the coating quality index is less than the preset quality threshold, the quality of the decorated wall coating is determined to be qualified.

7. A decoration quality detection system based on artificial intelligence, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the artificial intelligence-based decoration quality detection method as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Multi-frame morphology area detection method based on frame difference

    CN101320478A

  • Saliency value determination of predictively encoded video streams

    EP2582136A1

Cited By

  • House refined decoration quality evaluation system and method

    CN120410316A

  • A house fine decoration quality evaluation system and method

    CN120410316B