A quality detection method for precast concrete parts in construction engineering

By constructing multiple reference blocks of different sizes in the quality inspection of concrete prefabricated parts, and calculating the weighted weight based on texture characteristics for filtering, the problem of poor noise reduction effect in the prior art is solved and the detection accuracy is improved.

CN119205763BActive Publication Date: 2025-02-25XINJIANG SHENGCHI ENG INSPECTION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411709208.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-02-25
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

During the noise reduction and enhancement treatment of existing concrete prefabricated quality detection methods, the non-local mean filtering effect is poor during the noise reduction and enhancement treatment, resulting in a decrease in the detection effect.

Method used

By collecting the surface image of the prefabricated part, filtering the pixel points to be filtered, and building multiple reference blocks of different sizes with the pixel points to be filtered as the center. Using the feature differences in the vertical direction of the texture and the texture direction, the texture extension weight and texture interval weight are calculated, weighted fusion is performed, and filtering is performed to obtain an enhanced image.

Benefits of technology

Improve the filtering effect, reduce the impact of noise, enhance the image quality, and thus improve the accuracy of quality detection of concrete prefabricated parts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205763B_ABST
    Figure CN119205763B_ABST
Patent Text Reader

Abstract

The present application relates to the field of image processing technology, and specifically to a method for quality inspection of concrete prefabricated parts in construction projects, including: obtaining a surface image and screening pixels to be filtered; obtaining reference blocks and neighborhood blocks of pixels to be filtered respectively; obtaining texture extension weights and texture interval weights of neighborhood blocks respectively based on the position distance distribution between target points in the neighborhood blocks and the texture extension characteristics of target points in a single direction in the neighborhood blocks; determining texture interval weight factors and texture extension weight factors respectively based on the distribution characteristics between texture feature points in the neighborhood blocks and the grayscale consistency characteristics between texture feature points in the texture direction, combining the texture interval weight and the texture extension weight for weighting to obtain an enhanced image, train a detection model, and determine the quality inspection results of concrete prefabricated parts. The present application improves the filtering effect and obtains more accurate quality inspection results by adjusting the filtering weights of different neighborhood blocks in the image filtering process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method for detecting the quality of precast concrete parts in construction projects. Background Art

[0002] Precast concrete is a component commonly used in the fields of construction, transportation, and water conservancy. In construction projects, since concrete can be processed in advance, the construction speed can be increased; compared with on-site construction, the proportion of raw materials in the manufacturing process of precast concrete can be strictly controlled in the factory, so that the size and quality of precast concrete are more in line with the requirements of construction projects.

[0003] Precast concrete parts are often an important part of the building's weight in construction projects, and their quality is crucial to the safety and durability of the building. Therefore, accurate quality testing of precast concrete parts is an important task in the field of construction engineering.

[0004] With the development of image processing technology, it is widely used in quality inspection in many fields, including quality inspection of concrete precast parts. The results of quality inspection are directly affected by image quality. Therefore, in the actual inspection process, the collected image needs to be subjected to noise reduction and enhancement processing first. However, since fine textures may form on the surface of the precast parts during the pouring process, non-local mean filtering is often used in its noise reduction process. The effect of non-local mean filtering is affected by the consistency of features between the reference block and the neighborhood block. The general non-local mean filtering constructs a reference block of the same size for all pixels to be filtered, and there are large differences in the feature performance at different positions of the collected image, which may lead to insufficient feature performance of the reference block for the pixels to be filtered, thereby affecting the final filtering effect, thereby reducing the effect of using images for quality inspection of concrete precast parts. Summary of the invention

[0005] The present application provides a method for detecting the quality of precast concrete parts in a construction project to solve the existing problems.

[0006] The present invention relates to a method for detecting the quality of precast concrete parts for construction projects, and the technical solution adopted comprises the following steps:

[0007] Collecting the surface image of the preform, and selecting a number of pixels to be filtered from the surface image;

[0008] Taking any pixel to be filtered as the center, multiple reference blocks of different sizes are constructed, and a number of neighborhood blocks corresponding to each reference block of the pixel to be filtered are obtained by using a non-local mean filtering algorithm;

[0009] The target points are screened by using the texture change difference of the pixel points in the vertical direction of the texture. The texture extension weight and texture interval weight of the neighborhood block are obtained based on the position distance distribution between the target points in the neighborhood block and the texture extension characteristics of the target points in the neighborhood block in a single direction.

[0010] The texture interval weight factor and the texture extension weight factor of the neighborhood block are determined based on the distribution characteristics between the texture feature points of the neighborhood block and the gray consistency characteristics between the texture feature points in the neighborhood block in the texture direction;

[0011] The texture interval weight factor and the texture extension weight factor are used to weightedly fuse the texture interval weight and the texture extension weight of the neighborhood block, and the enhanced image is obtained by filtering based on the weighted weights;

[0012] The detection results are obtained based on the detection model trained with the enhanced image.

[0013] Preferably, the step of selecting a plurality of pixels to be filtered from the surface image comprises the following specific steps:

[0014] A neighborhood range of a preset size is set with each pixel point as the center on the surface image;

[0015] Calculate the difference between the grayscale value of each pixel and the grayscale value of the pixels in the neighborhood of each pixel and take the absolute value, and take the mean of the cumulative sum of all the absolute values ​​in the neighborhood as the grayscale difference mean of each pixel;

[0016] The grayscale difference mean of all pixels in the surface image is calculated respectively, and the segmentation threshold of the grayscale difference mean of all pixels is determined by using the global threshold segmentation algorithm. All pixels whose grayscale difference mean is greater than the segmentation threshold are regarded as pixels to be filtered.

[0017] Preferably, the specific steps of screening target points are as follows:

[0018] Calculate the angle between the gradient direction of the pixel point and the vertical direction of the texture of the surface image, and based on the angle value of the angle, use the trigonometric function formula to obtain the projection value of the grayscale value of each pixel point in the vertical direction of the texture;

[0019] The average of the absolute values ​​of the differences between the projection values ​​of each pixel and the rest of the pixels in the neighborhood centered on each pixel in the vertical direction of the texture is taken as the unidirectional mutation degree of each pixel;

[0020] The unidirectional mutation degree of each pixel point in the surface image is calculated respectively, and the mutation points in all the unidirectional mutation degrees are obtained by using the mutation point detection method, and the pixel point corresponding to each mutation point is used as the target point.

[0021] Preferably, the steps for obtaining the texture extension weight of the neighborhood block are as follows:

[0022] The Sobel operator is used to obtain the gradient direction of each pixel point, and the distribution histogram of the gradient directions of all the pixels in the surface image is counted, and the number of pixels contained in each gradient direction is counted, and the gradient direction containing the largest number of pixels is used as the texture vertical direction of the surface image, and the direction perpendicular to the texture vertical direction is used as the texture direction;

[0023] Take each target point as the starting point, traverse along the vertical direction of the texture, record the first target point traversed as the reference point, and take the Euclidean distance between the reference point and the starting point as the texture interval between the reference point and the starting point;

[0024] Calculate the absolute value of the difference between the mean of the texture intervals between all target points and their reference points in each reference block of the target point and the mean of the texture intervals between all target points and their reference points in each neighborhood block of the target point, and take the normalized result of the reciprocal of the sum of the absolute value and 1 as the texture extension weight of each neighborhood block.

[0025] Preferably, the steps of obtaining the texture interval weight are as follows:

[0026] Take each target point as the starting point, and take the line segment formed by two or more consecutive target points traversed during the traversal of the starting point along the texture direction as the target line segment of the starting point;

[0027] Calculate the DTW distance between the probability distribution curve of the grayscale value of the pixel point on the longest target line segment in each neighborhood block of the target point and the probability distribution curve of the grayscale value of the pixel point on the longest target line segment in each reference block of the target point, and take the reciprocal of the sum of the DTW distance and the preset parameter as the first distance;

[0028] The reciprocal of the sum of the point absolute value of the difference between the mean of the target line segment lengths of all target points in each neighborhood block of the target point and the mean of the target line segment lengths of all target points in each reference block of the target point and the prediction parameter is taken as the second distance;

[0029] The normalized result of the product of the first distance and the second distance is used as the texture interval weight of each neighborhood block of the target point.

[0030] Preferably, the texture spacing weight factor of the neighborhood block is determined as follows:

[0031] The lengths of the target line segments of all the target points are respectively obtained, the first quartile of the lengths of all the target line segments is used as a judgment threshold, and the target points whose target line segment lengths are greater than the first quartile are used as texture feature points in the surface image;

[0032] The inverse of the sum of the distribution variance of the grayscale values ​​of all pixels on the target line segment between each texture feature point in the neighborhood block and the reference point of the texture feature point and the preset parameter;

[0033] The sum of the length of the target line segment of each texture feature point and the length of the target line segment of the reference point of each texture feature point is calculated, and the average of the results of accumulating the reciprocal and the sum on all texture feature points in the neighborhood block is used as the texture spacing weight factor of the neighborhood block.

[0034] Preferably, the steps for obtaining the texture extension weight factor are as follows:

[0035] The reciprocal of the sum of the preset parameters and the absolute value of the difference between the mean of the projection values ​​of the grayscale values ​​of all target points on the target line segment of each texture feature point in the texture direction and the mean of the projection values ​​of the grayscale values ​​of all target points on the target line segment of all texture feature points in the main neighborhood block in the texture direction is used as the first factor;

[0036] Calculate the product of the distribution variance of the projection values ​​of the grayscale values ​​of all target points on the target line segment of each texture feature point in the texture direction and the inverse of the sum of the preset parameters and the first factor, and take the mean of the accumulated results of the product on all texture feature points in the neighborhood block as the texture extension weight factor of the neighborhood block.

[0037] Preferably, the step of obtaining weighted fusion of the texture spacing weight and the texture extension weight of the neighborhood block by using the texture spacing weight factor and the texture extension weight factor is as follows:

[0038] The texture spacing weight factor and texture extension weight factor of the neighborhood block are respectively used as weighting factors of the texture spacing weight and texture extension weight of the neighborhood block, and the result obtained by linear weighting is used as the weighted weight of each neighborhood block.

[0039] Preferably, the specific steps of filtering based on weighted weights to obtain an enhanced image are as follows:

[0040] The ratio of the weighted weight of each neighborhood block of each target point to the accumulated sum of the weighted weights of all neighborhood blocks in all reference blocks of each target point is used as the final weight of each neighborhood block when filtering;

[0041] The non-local mean filtering algorithm is used to obtain the filtered grayscale value of the target point based on the final weight of each neighborhood block of each target point when filtering;

[0042] In the surface image, the filtered grayscale value of each target point replaces the original grayscale value of the target point in the surface image; for the non-filtered pixel points, the grayscale value is kept unchanged, and all target points are traversed to obtain the enhanced image corresponding to the surface image.

[0043] Preferably, the specific steps of obtaining the detection result based on the detection model trained with enhanced images are as follows:

[0044] Collecting surface images of batches of precast concrete parts, obtaining enhanced images corresponding to each surface image, and using the enhanced images to train a detection model for quality detection of precast concrete parts for construction projects;

[0045] The trained detection model is used to output quality detection results of the precast concrete parts to be detected, wherein the quality detection results include unqualified quality and qualified quality.

[0046] The beneficial effects of the technical solution of this application are:

[0047] Firstly, a number of pixels to be filtered are selected from the surface image based on the local grayscale difference of the pixels to be filtered in the surface image of the preform; secondly, the texture extension characteristics of the target points in each neighborhood block of multiple reference blocks of different sizes corresponding to the pixels to be filtered in the vertical direction of the texture and in the texture direction, as well as the position distribution characteristics between different target points, are analyzed to obtain the texture extension weight and texture spacing weight of the neighborhood block respectively; the evaluation of the filtering degree of each neighborhood block when filtering is realized from two angles; then, the texture feature points are selected according to the characteristic that the noise points usually do not form a line segment with a certain length in the surface image of the preform, so as to reduce the influence of the noise points on the final weight when determining the filtering later; then, the texture spacing weight factor and texture extension weight factor of the neighborhood block are determined respectively by analyzing the significance of the texture extension characteristics and the grayscale consistency characteristics between the texture feature points in the neighborhood block in the texture direction, and the texture spacing weight and texture extension weight of the neighborhood block are weighted to obtain the weighted weight, and the enhanced image is completed, so as to set the final weight when filtering for the neighborhood blocks corresponding to the reference blocks of different scales; finally, the detection result is obtained based on the detection model trained on the enhanced image. The present application takes into account the differences in the degree of expression of texture features in two directions by different neighborhood blocks caused by reference blocks of different sizes, that is, determines the influence of texture features in two directions on the filtering weights, thereby avoiding the deviation of filtering weights caused by large feature differences in one direction of the texture by neighborhood blocks of different sizes due to uneven texture, effectively improving the filtering effect and obtaining better quality image enhancement results, thereby improving the quality detection accuracy of prefabricated parts. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0049] Figure 1 A flowchart of a method for detecting quality of precast concrete parts in a construction project provided in an embodiment of the present application;

[0050] Figure 2 A flowchart for implementing the method of determining the texture spacing weight and texture extension weight of a main neighborhood block provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the following is a detailed description of the concrete prefabricated quality detection method for construction engineering proposed in accordance with the present application, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

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

[0053] The specific scheme of the quality inspection method of precast concrete parts for construction projects provided by the present application is described in detail below with reference to the accompanying drawings.

[0054] See also Figure 1 , which shows a flow chart of the steps of a method for quality inspection of precast concrete parts for construction projects provided by an embodiment of the present application, the method comprising the following steps:

[0055] Step S001: collecting a surface image of a precast concrete component, and selecting a number of pixels to be filtered from the surface image.

[0056] The embodiment of the present application analyzes the collected surface image of the precast concrete part, obtains the pixel points to be filtered in the surface image, obtains reference blocks of different sizes corresponding to the pixel points to be filtered, obtains multiple neighborhood blocks corresponding to each reference block, and performs filtering processing on the pixel points to be filtered by calculating the filtering weight corresponding to each neighborhood block, thereby achieving noise reduction and enhancement of the collected image, and further improving the accuracy of the inspection results when performing quality inspection on concrete structural parts.

[0057] It should be noted that in construction projects, precast concrete parts are often needed. The quality inspection of precast concrete parts mainly focuses on defect detection on the surface of precast concrete parts, so it is necessary to first collect surface images of precast concrete parts.

[0058] Specifically, an industrial camera is installed at the discharge port after the preform is produced, and the industrial camera lens is aimed at the surface of the preform to be inspected, and the surface image of the preform to be inspected is collected, and the collected surface image of the preform is grayed to obtain the surface image of the preform. The graying method is a well-known technology, and the specific method is not introduced here.

[0059] It should be noted that because there are fine textures on the surface of the prefabricated parts cast by molds, the obtained image has certain texture detail characteristics, so non-local mean filtering can be used for noise reduction. The production of concrete prefabricated parts generally adopts the method of mold casting, and the prefabricated parts produced are generally used for structural construction. During the structural construction process, the cracks on the surface of the prefabricated parts seriously affect their mechanical properties. The cracks on the surface of the prefabricated parts are relatively small, and the detection results are easily affected by noise when detecting cracks. The main purpose of filtering the surface image of the prefabricated part is to remove image noise and highlight the details of the crack texture, so the pixels targeted by the filtering process are noise points. In general images, the greater the difference between the grayscale value of a pixel and the grayscale values ​​of its surrounding pixels, the higher the probability that it is a noise pixel.

[0060] Specifically, the pixel to be filtered is obtained as follows: take any pixel as the center on the surface image, and define its w×w neighborhood area as the neighborhood range of the pixel. The preset neighborhood side length w in this embodiment is 5, which is used as an example for description. Other implementations can be set to other values, and this application does not make special restrictions. Calculate the gray value difference between the gray value of the i-th pixel and each pixel in its neighborhood and take the absolute value, sum and average all the absolute values ​​in the neighborhood to obtain the gray value difference mean The grayscale difference mean is used to characterize the necessity of filtering the i-th pixel. The larger the grayscale difference mean of the i-th pixel, the greater the grayscale difference between the i-th pixel and the pixels in its neighborhood, the higher the probability of being a noise point, and the more filtering should be performed.

[0061] Further, the grayscale difference mean of all pixels in the surface image is calculated respectively, and the segmentation threshold of the grayscale difference mean of all pixels is determined by using the global threshold segmentation algorithm, and all pixels whose grayscale difference mean is greater than the segmentation threshold are used as pixels to be filtered. Among them, the global threshold segmentation algorithm includes but is not limited to the Otsu threshold segmentation algorithm, the iteration method, and the one-dimensional maximum entropy method. Preferably, the embodiment of the present application uses the Otsu threshold segmentation algorithm to obtain the segmentation threshold. The Otsu threshold segmentation algorithm is a commonly used technology in the field of image processing, and the specific process will not be repeated.

[0062] Step S002: Taking any pixel to be filtered as the center, construct multiple reference blocks of different sizes, and obtain a number of neighborhood blocks corresponding to each reference block of the pixel to be filtered.

[0063] It should be noted that the general non-local mean filter constructs reference blocks of the same size for all pixels to be filtered, but the image features at different positions in the surface image of the concrete precast part vary greatly, which may result in insufficient processing capacity of the reference block for the pixels to be filtered, thus affecting the final filtering effect. Therefore, multiple reference blocks of different sizes are constructed for each pixel to be filtered, and the local image features of the pixels are more obvious by combining reference blocks of different sizes.

[0064] Specifically, the specific method of constructing multiple reference blocks of different sizes for any pixel to be filtered is to construct multiple reference blocks of different sizes with any pixel to be filtered as the center, where the size of the kth reference block is , the reference block side length preset in this embodiment is , where k={1,2,3,4}, which is described as an example, and other implementations can be set to other values ​​according to the actual size of the surface image, and this application does not make special limitations. Then, according to the method of obtaining neighborhood blocks in the non-local mean filtering algorithm, multiple neighborhood blocks corresponding to each reference block are obtained. The non-local mean filtering algorithm is a commonly used technology in the field of image processing, and the specific process will not be repeated.

[0065] Step S003: based on the position distance distribution between target points in the neighborhood block and the texture extension characteristics of the target points in the neighborhood block in a single direction, the texture extension weight and texture spacing weight of the neighborhood block are obtained respectively.

[0066] It should be noted that in the non-local mean filtering process, the neighborhood blocks corresponding to the reference blocks need to be used to filter the pixels to be filtered. However, the filtering weights of the multiple neighborhood blocks corresponding to the reference blocks are different, and the multiple reference blocks of different sizes corresponding to the pixels to be filtered have different neighborhood blocks, so it is necessary to determine the filtering weights of the neighborhood blocks of the pixels to be filtered when they correspond to different reference blocks, so as to achieve efficient filtering.

[0067] It should be further explained that, in the process of non-local mean filtering, the filtering weight of the neighborhood block mainly depends on the similarity of the features between the neighborhood block and the reference block. The higher the similarity, the higher the filtering weight. On the surface of the concrete precast part, there is generally an uneven texture formed by the extrusion of the casting mold. At this time, the characteristics of the surface image of the precast part are mainly manifested as texture extension and texture interval. Therefore, the present application considers using the similarity of texture extension and distance between textures to determine the filtering weight of the neighborhood block. On the one hand, the smaller the difference in texture interval between the neighborhood block and the reference block, the higher the filtering weight of the neighborhood block; on the other hand, the more consistent the texture extension between the neighborhood block and the reference block, the higher the filtering weight of the neighborhood block. The texture direction depends on the casting method of the precast part, and the texture direction is generally the same as the casting direction.

[0068] Specifically, in the surface image, the Sobel operator is used to obtain the gradient direction of each pixel point, the distribution histogram of the gradient directions of all the pixels in the surface image is counted, the number of pixels contained in each gradient direction is counted, the gradient direction containing the largest number of pixels is used as the texture vertical direction of the surface image, and the direction perpendicular to the texture vertical direction is used as the texture direction. The horizontal axis of the distribution histogram is the gradient direction of different pixels, and the vertical axis is the number of pixels contained in the gradient direction.

[0069] Furthermore, in the surface image of the precast concrete part, the direction perpendicular to the texture is the direction in which the grayscale of the pixel changes most frequently. If the pixel belongs to the crack area on the surface of the precast concrete part, there will be a certain deviation between the gradient direction of the pixel and the direction perpendicular to the texture. The grayscale change of the pixel in the direction perpendicular to the texture is higher than the grayscale change of the pixel in the non-crack area. Therefore, the target points in the surface image are screened based on the degree of change of the texture features of the pixel in the direction perpendicular to the texture, and the texture spacing weight and texture extension weight of the main neighborhood block are determined based on the analysis results of the texture extension features between the target points. The specific process is as follows: Figure 2 As shown, it includes steps 201 and 202:

[0070] 201, using the texture change difference of the pixel points in the vertical direction of the texture to screen the target points.

[0071] First, for any pixel point, the angle between the gradient direction of the pixel point and the texture vertical direction and texture direction of the surface image is calculated respectively, and based on the angle value of the angle, the gray value of each pixel point is used to obtain the projection value of the gray value of each pixel point in the texture vertical direction and texture direction respectively using the trigonometric function formula. Among them, the calculation of the trigonometric function formula is a common technology, and the specific process will not be repeated.

[0072] Secondly, the unidirectional mutation degree of each pixel is calculated to evaluate the degree of mutation of each pixel in the vertical direction of the texture. The calculation formula of the unidirectional mutation degree of the i-th pixel is as follows:

[0073]

[0074] In the formula, is the unidirectional mutation degree of the i-th pixel, , , They are respectively the projection values ​​of the grayscale values ​​of the i-1th, i-th, and i+1th pixels in the vertical direction of the texture.

[0075] Further, the unidirectional mutation degree of each pixel in the surface image is calculated respectively according to the above process. Afterwards, all the unidirectional mutation degrees are taken as input, and the mutation points in all the unidirectional mutation degrees are obtained by using the mutation point detection method, and the pixel points corresponding to each mutation point are taken as target points. Among them, mutation point detection includes but is not limited to Mann-Kendall test, t-test, heuristic segmentation BG algorithm, and anomaly detection algorithm. Preferably, in an embodiment of the present application, the Pettitt detection algorithm is used to obtain the mutation points in all unidirectional mutation degrees. Mutation point detection is a commonly used technology in the field of image processing, and the specific process will not be repeated.

[0076] 202 , determining the texture spacing weight and the texture extension weight of the main neighborhood block based on the analysis result of the texture extension feature between the target points.

[0077] For each target point in the surface image of the precast concrete part, take target point j as an example, take target point j as the starting point, traverse along the vertical direction of the texture, record the first traversed target point as the reference point, and take the Euclidean distance between the reference point and target point j as the texture interval between the two points.

[0078] Secondly, the target point j is taken as the starting point, and the line segment formed by the consecutively appearing target points is traversed along the texture direction, and the line segment formed by the consecutively appearing target points is taken as the target line segment. The consecutively appearing target points refer to two or more consecutively traversed target points.

[0079] It should be noted that if target point j is used as the starting point and no other target points can be traversed, target point j will no longer be calculated subsequently.

[0080] Furthermore, any reference block of the target point is recorded as the target block; any neighborhood block corresponding to the target block is recorded as the main neighborhood block. In the surface image, if the target point j belongs to the pixel point in the crack area caused by the pouring of the precast concrete part, then the reference points adjacent to it and the remaining target points on the target line segment where the target point j is located have a high probability of having the same texture features as the target point j, and should have similar texture features in the texture direction.

[0081] First, the texture interval weight of the main neighborhood block is calculated to characterize the uniformity of the texture interval between target points in the same neighborhood block. The calculation formula of the texture interval weight is as follows:

[0082]

[0083] In the formula, is the texture spacing weight of the primary neighborhood block, represents the linear normalization function, is the mean value of the texture interval between all target points in the target block and their reference points, It is the mean of the texture intervals between all target points and their reference points in the primary neighborhood block.

[0084] The more similar the overall distribution of texture intervals between the target point and the reference point in the main neighborhood block is to the overall distribution of texture intervals between the target point and the reference point in the target block, the closer the mean of the texture intervals in the main neighborhood block is to the mean of the texture intervals in the target block. The smaller the value of .

[0085] Secondly, the texture extension weight of the main neighborhood block is determined by combining the length difference of the target line segments of all target points in the main neighborhood block and the similarity of the grayscale distribution of the target points between the main neighborhood block and the target block in the texture direction. The calculation formula of the texture extension weight is as follows:

[0086]

[0087] In the formula, is the texture extension weight of the main neighborhood block, represents the linear normalization function, C, They are the probability distribution curves of the grayscale values ​​of the pixels on the longest target line segment in the main neighborhood block and the target block, Represents the DTW distance between probability distribution curves; is the mean length of the target line segments of all target points in the main neighborhood block, is the mean of the target line segment lengths of all target points in the target block. It is a tuning parameter used to prevent the denominator from being 0. The value of is any positive number not exceeding 0.01. Preferably, in the embodiment of the present application The empirical value of is 0.001.

[0088] Among them, the higher the consistency of the main grayscale distribution characteristics of the target point in the main neighborhood block in the texture direction with the main grayscale distribution characteristics of the target point in the target block in the texture direction, the more consistent the texture features with stronger significance in the target block are with the texture features with stronger significance in the main neighborhood block. The smaller the value of The larger the value of is, the more likely the longest target line segments in the main neighborhood block and the target block belong to the same area; the mean L of the target line segment lengths of the target points in the main neighborhood block and the mean L of the target line segment lengths of the target points in the target block The closer they are, the more similar the texture continuity characteristics of the target points in the main neighborhood block and the target block in the texture direction are. The smaller the value of The larger the value of .

[0089] Step S004: Determine the texture spacing weight factor and the texture extension weight factor of the main neighborhood block based on the distribution characteristics between the texture feature points of the main neighborhood block and the grayscale consistency characteristics between the texture feature points in the main neighborhood block in the texture direction.

[0090] It should be noted that the above steps respectively use the texture interval weight and texture extension weight of the target block and the main neighborhood block to reflect the filter weight of the main neighborhood block, so the filter weights reflected by the two are used to further determine the final filter weight of the main neighborhood block. In the filter weights reflected by the texture interval and texture extension, due to the different texture expression intensities in different main neighborhood blocks, the expression degrees of the above two filter weights are different, that is, their influence on the final filter weight is different. In addition, this embodiment determines multiple target blocks of different sizes for one target point, and the texture expression in the image is uneven, which further leads to a large difference in the texture interval weight and texture extension weight expression in different main neighborhood blocks. Therefore, when determining the final filter weight using the filter weights reflected by the above texture interval and texture extension, it is necessary to determine the influence factors of the above two weights on the final filter weight according to the texture expression in the main neighborhood block.

[0091] Furthermore, since noise points usually do not form line segments with a certain length in the surface image of the preform, the lengths of the target line segments of all target points are obtained respectively, the first quartile of the lengths of all the target line segments is used as a judgment threshold, and the target points whose target line segment lengths are greater than the first quartile are used as texture feature points in the surface image. Among them, the quartile is a commonly used technology in the field of data processing, and the specific process will not be repeated.

[0092] It should be further explained that, for different main neighborhood blocks corresponding to the target block constructed by a target point, the influencing factors of the two weights depend on the texture interval within the main neighborhood block and the obviousness of texture extension, among which the obviousness of texture interval depends on the significance of texture formed between the two target points corresponding to each texture interval. The smaller the grayscale difference between the two target points, the more obvious the formed texture is in the surface image.

[0093] Here, the texture interval weight factor is calculated to characterize the influence of the texture interval of the target point in the main neighborhood block on the final filtering weight of the main neighborhood block. The calculation formula of the texture interval weight factor is:

[0094]

[0095] In the formula, is the texture spacing weight factor of the main neighborhood block, N is the texture feature point in the main neighborhood block, is the distribution variance of the grayscale values ​​of all pixels on the target line segment between the ath texture feature point in the main neighborhood block and its reference point, , are the length of the target line segment of the a-th texture feature point and the length of the target line segment of the reference point of the a-th texture feature point, respectively. It is a tuning parameter used to prevent the denominator from being 0. The value of is any positive number not exceeding 0.01. Preferably, in the embodiment of the present application The empirical value of is 0.001.

[0096] Furthermore, in the main neighborhood block, the obviousness of texture extension depends on the uniformity of texture length and the consistency of extended texture grayscale. The more consistent the grayscale characteristics of texture feature points in the main neighborhood block in the texture direction, the better the smoothness of the texture at different positions, and the more obvious the texture extension characteristics at different texture feature points. On the other hand, the more uniform the length of the target line segments of different texture feature points, the more uniform the distribution of image texture in the main neighborhood block, and the greater the impact on the final weight during filtering.

[0097] Here, the texture extension weight factor is calculated to characterize the influence of the texture extension feature of the target point quality inspection in the main neighborhood block on the final filtering weight of the main neighborhood block. The calculation formula of the texture extension weight factor is:

[0098]

[0099] In the formula, is the texture extension weight factor of the main neighborhood block, It is the mean of the projection values ​​of the grayscale values ​​of all target points on the target line segment of the a-th texture feature point in the texture direction. It is the mean of the projection values ​​of the grayscale values ​​of all target points on the target line segment of all texture feature points in the main neighborhood block in the texture direction. It is the distribution variance of the projection values ​​of the grayscale values ​​of all target points on the target line segment of the a-th texture feature point in the texture direction. It is a tuning parameter used to prevent the denominator from being 0. The value of is any positive number not exceeding 0.01. Preferably, in the embodiment of the present application The empirical value of is 0.001.

[0100] Among them, the first factor It represents the difference between the grayscale features of the target line segment where the ath texture feature point in the main neighborhood block is located and the target line segment of all texture feature points in the main neighborhood block in the same texture direction. The more obvious the texture extension feature in the main neighborhood block is, the closer the projection values ​​of different texture feature points in the same texture direction are. The larger the value of .

[0101] Step S005: Use the texture interval weight factor and the texture extension weight factor to perform weighted fusion on the texture interval weight and the texture extension weight of the neighborhood block, filter based on the weighted weights to obtain an enhanced image, and obtain a detection result based on the detection model trained with the enhanced image.

[0102] According to the above process, the texture interval weight and texture extension weight, texture interval weight factor and texture extension weight factor of each neighborhood block of each target point are determined respectively. Among them, the texture interval weight factor and texture extension weight factor respectively reflect the influence of the distribution characteristics between the texture feature points in the neighborhood block on the final weight during the neighborhood block filtering, and the influence of the gray consistency characteristics between the texture feature points in the neighborhood block in the texture direction on the final weight during the neighborhood block filtering. Therefore, the final weight during the neighborhood block filtering is comprehensively determined based on the texture interval weight factor and texture extension weight factor.

[0103] Specifically, the weighted weight of the neighborhood block filter of each target point is calculated as follows:

[0104]

[0105] Where V is the weighted weight of the neighborhood block of each target point, , They are the texture spacing weight and texture extension weight of the neighborhood block, , They are the texture spacing weight factor and texture extension weight factor of the neighborhood block respectively.

[0106] Further, according to the above steps, the weighted weight of each neighborhood block corresponding to each reference block of each target point is obtained respectively. The ratio of the weighted weight of each neighborhood block of each target point to the accumulated sum of the weighted weights of all neighborhood blocks in all reference blocks of each target point is used as the final weight of each neighborhood block when filtering.

[0107] Secondly, the final weights of all the neighborhood blocks corresponding to each filtered pixel are determined respectively, and the non-local mean filtering algorithm is used for filtering to obtain the filtered gray value of each pixel to be filtered. Among them, non-local mean filtering is a commonly used technology in the field of image processing, and the specific process will not be repeated.

[0108] Afterwards, in the surface image of the precast concrete part, for each pixel to be filtered, the corresponding filtered grayscale value is obtained according to the above process to replace the original grayscale value of the filtered pixel in the surface image. For the non-filtered pixels, the grayscale value is kept unchanged. After the filtering is completed, the enhanced result of the surface image is obtained, which is recorded as the enhanced image.

[0109] Furthermore, surface images of batches of precast concrete parts are collected to obtain corresponding enhanced images for training a detection model for quality detection of precast concrete parts in construction projects. The training process is as follows:

[0110] s1: For each enhanced image, use the image annotation tool Labelimg to annotate the labels. The labels of the pixels in the enhanced image are divided into 0 and 1, where 0 and 1 respectively indicate that the pixel belongs to the crack area and does not belong to the crack area;

[0111] s2: A large number of annotated enhanced images are used as training sets. The detection model structure is Mask Region-based Convolutional Neural Network. The loss function used is the cross entropy loss function. The optimization algorithm is the stochastic gradient descent method. After the training is completed, a detection model for quality inspection of precast concrete parts in construction projects is obtained. The training of the neural network is a well-known technology and the specific process will not be repeated here.

[0112] s3: Collect the surface image of the concrete precast part to be inspected, obtain the corresponding enhanced image according to the above steps, input the enhanced image into the trained detection model, and output the detection result. When there is a crack area in the enhanced image, the quality of the concrete precast part is judged to be unqualified; when there is no crack area, the quality of the concrete precast part is judged to be qualified.

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

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

Claims

1. A method for detecting the quality of precast concrete parts in construction engineering, characterized in that: The method comprises the following steps: Collecting the surface image of the preform, and selecting a number of pixels to be filtered from the surface image; Taking any pixel to be filtered as the center, multiple reference blocks of different sizes are constructed, and a number of neighborhood blocks corresponding to each reference block of the pixel to be filtered are obtained by using a non-local mean filtering algorithm; The target points are screened by using the texture change difference of the pixel points in the vertical direction of the texture. The texture extension weight and texture interval weight of the neighborhood block are obtained based on the position distance distribution between the target points in the neighborhood block and the texture extension characteristics of the target points in the neighborhood block in a single direction. The texture interval weight factor and the texture extension weight factor of the neighborhood block are determined based on the distribution characteristics between the texture feature points of the neighborhood block and the gray consistency characteristics between the texture feature points in the neighborhood block in the texture direction; The texture interval weight factor and the texture extension weight factor are used to weightedly fuse the texture interval weight and the texture extension weight of the neighborhood block, and the enhanced image is obtained by filtering based on the weighted weights; The detection results are obtained based on the detection model trained with enhanced images; The steps for obtaining the texture extension weight of the neighborhood block are as follows: The Sobel operator is used to obtain the gradient direction of each pixel point, and the distribution histogram of the gradient directions of all the pixels in the surface image is counted, and the number of pixels contained in each gradient direction is counted, and the gradient direction containing the largest number of pixels is used as the texture vertical direction of the surface image, and the direction perpendicular to the texture vertical direction is used as the texture direction; Take each target point as the starting point, traverse along the vertical direction of the texture, record the first target point traversed as the reference point, and take the Euclidean distance between the reference point and the starting point as the texture interval between the reference point and the starting point; Calculate the absolute value of the difference between the mean of the texture intervals between all target points and their reference points in each reference block of the target point and the mean of the texture intervals between all target points and their reference points in each neighborhood block of the target point, and use the normalized result of the reciprocal of the sum of the absolute value and 1 as the texture extension weight of each neighborhood block; The steps for obtaining the texture interval weight are as follows: Take each target point as the starting point, and take the line segment formed by two or more consecutive target points traversed during the traversal of the starting point along the texture direction as the target line segment of the starting point; Calculate the DTW distance between the probability distribution curve of the grayscale value of the pixel point on the longest target line segment in each neighborhood block of the target point and the probability distribution curve of the grayscale value of the pixel point on the longest target line segment in each reference block of the target point, and take the reciprocal of the sum of the DTW distance and the preset parameter as the first distance; The reciprocal of the sum of the point absolute value of the difference between the mean of the target line segment lengths of all target points in each neighborhood block of the target point and the mean of the target line segment lengths of all target points in each reference block of the target point and the prediction parameter is taken as the second distance; The normalized result of the product of the first distance and the second distance is used as the texture interval weight of each neighborhood block of the target point; The texture spacing weight factor of the neighborhood block is determined as follows: The lengths of the target line segments of all the target points are respectively obtained, the first quartile of the lengths of all the target line segments is used as a judgment threshold, and the target points whose target line segment lengths are greater than the first quartile are used as texture feature points in the surface image; The inverse of the sum of the distribution variance of the grayscale values ​​of all pixels on the target line segment between each texture feature point in the neighborhood block and the reference point of the texture feature point and the preset parameter; Calculate the sum of the length of the target line segment of each texture feature point and the length of the target line segment of the reference point of each texture feature point, and use the average of the results of accumulating the reciprocal and the sum on all texture feature points in the neighborhood block as the texture interval weight factor of the neighborhood block; The steps for obtaining the texture extension weight factor are as follows: The reciprocal of the sum of the preset parameters and the absolute value of the difference between the mean of the projection values ​​of the grayscale values ​​of all target points on the target line segment of each texture feature point in the texture direction and the mean of the projection values ​​of the grayscale values ​​of all target points on the target line segment of all texture feature points in the main neighborhood block in the texture direction is used as the first factor; Calculate the product of the distribution variance of the projection values ​​of the grayscale values ​​of all target points on the target line segment of each texture feature point in the texture direction and the inverse of the sum of the preset parameters and the first factor, and take the mean of the accumulated results of the product on all texture feature points in the neighborhood block as the texture extension weight factor of the neighborhood block.

2. A method for detecting quality of precast concrete parts for construction projects according to claim 1, characterized in that: The specific steps of selecting a plurality of pixels to be filtered from the surface image include the following: A neighborhood range of a preset size is set with each pixel point as the center on the surface image; Calculate the difference between the grayscale value of each pixel and the grayscale value of the pixels in the neighborhood of each pixel and take the absolute value, and take the mean of the cumulative sum of all the absolute values ​​in the neighborhood as the grayscale difference mean of each pixel; The grayscale difference mean of all pixels in the surface image is calculated respectively, and the segmentation threshold of the grayscale difference mean of all pixels is determined by using the global threshold segmentation algorithm. All pixels whose grayscale difference mean is greater than the segmentation threshold are regarded as pixels to be filtered.

3. A method for detecting quality of precast concrete parts for construction projects according to claim 1, characterized in that: The specific steps of screening target points are as follows: Calculate the angle between the gradient direction of the pixel point and the vertical direction of the texture of the surface image, and based on the angle value of the angle, use the trigonometric function formula to obtain the projection value of the grayscale value of each pixel point in the vertical direction of the texture; The average of the absolute values ​​of the differences between the projection values ​​of each pixel and the rest of the pixels in the neighborhood centered on each pixel in the vertical direction of the texture is taken as the unidirectional mutation degree of each pixel; The unidirectional mutation degree of each pixel point in the surface image is calculated respectively, and the mutation points in all the unidirectional mutation degrees are obtained by using the mutation point detection method, and the pixel point corresponding to each mutation point is used as the target point.

4. A method for detecting quality of precast concrete parts for construction projects according to claim 1, characterized in that: The steps of obtaining weighted fusion of the texture spacing weight and texture extension weight of the neighborhood block by using the texture spacing weight factor and the texture extension weight factor are as follows: The texture spacing weight factor and texture extension weight factor of the neighborhood block are respectively used as weighting factors of the texture spacing weight and texture extension weight of the neighborhood block, and the result obtained by linear weighting is used as the weighted weight of each neighborhood block.

5. A method for detecting quality of precast concrete parts for construction projects according to claim 1, characterized in that: The specific steps of filtering based on weighted weights to obtain an enhanced image are as follows: The ratio of the weighted weight of each neighborhood block of each target point to the accumulated sum of the weighted weights of all neighborhood blocks in all reference blocks of each target point is used as the final weight of each neighborhood block when filtering; The non-local mean filtering algorithm is used to obtain the filtered grayscale value of the target point based on the final weight of each neighborhood block of each target point when filtering; In the surface image, the filtered grayscale value of each target point replaces the original grayscale value of the target point in the surface image; for the non-filtered pixel points, the grayscale value is kept unchanged, and all target points are traversed to obtain the enhanced image corresponding to the surface image.

6. A method for detecting quality of precast concrete parts for construction projects according to claim 1, characterized in that: The specific steps of obtaining the detection result based on the detection model trained with enhanced images are as follows: Collecting surface images of batches of precast concrete parts, obtaining enhanced images corresponding to each surface image, and using the enhanced images to train a detection model for quality detection of precast concrete parts for construction projects; The trained detection model is used to output quality detection results of the precast concrete parts to be detected, wherein the quality detection results include unqualified quality and qualified quality.

Citation Information

Patent Citations

  • Construction project quality detection supervision method and system

    CN117952979A