A method and system for detecting surface defects of a concrete precast member

By analyzing image sequences and calculating photoresistivity under multi-angle light sources, and combining geometric and albedo correction factors, the problem of distinguishing between deep honeycomb and shallow pores in photometric stereo method has been solved, and accurate detection of surface defects in precast concrete components has been achieved.

CN121955017BActive Publication Date: 2026-07-21SHAANXI NITYA NEW MATERIALS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHAANXI NITYA NEW MATERIALS TECH CO LTD
Filing Date
2026-03-30
Publication Date
2026-07-21

Smart Images

  • Figure CN121955017B_ABST
    Figure CN121955017B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of image recognition, and more particularly to a concrete prefabricated component surface defect detection method and system, which comprises the following steps: obtaining a shading vector of each pixel point based on a multi-angle image sequence; weighting and normalizing the shading vector by using a weight coefficient positively correlated with the zenith angle of a light source to obtain a light resistance amount; calculating the spatial gradient feature of the light resistance amount, and combining a geometric correction factor based on a local surface shape and an albedo correction factor to perform weighted fusion to obtain a steepness index; calculating the centripetal closeness of the light resistance amount gradient, fusing the same with the steepness index to generate a confidence index, and determining a defect region according to the confidence index. The present application can accurately distinguish between shallow pores, color spots and deep structural defects with steep and closed edges by constructing a light resistance amount and fusing multi-dimensional geometric features.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image recognition technology, and in particular to a method and system for detecting surface defects in precast concrete components. Background Technology

[0002] Precast concrete components, such as subway tunnel segments and precast concrete (PC) wall panels, play a crucial role in building and infrastructure construction. The surface quality of these precast components directly affects the safety and durability of the engineering structure. Precast component surfaces often contain tiny pores and deep honeycombing. Pores are typically shallow surface pits that are permissible and are considered non-critical defects. However, honeycombing, due to its depth and complex internal voids, severely affects the strength and impermeability of the component and is a defect that must be removed or repaired. Therefore, accurately detecting and differentiating these defects is a key aspect of component quality control.

[0003] Currently, photometric stereo vision technology is being attempted to detect such surface defects. This technology acquires images under illumination from different angles of light sources, analyzes the brightness changes in the images, and thus recovers the normal vector of the component surface and further obtains its three-dimensional morphology information. This method attempts to distinguish between deep honeycombs and shallow pores through depth information. Traditional photometric stereo vision assumes that the surface is a Lambertian body and relies on brightness changes to recover the normal vector.

[0004] However, existing photometric stereoscopic techniques have limitations when processing concrete honeycomb structures. Due to the large aspect ratio of the honeycomb cells, self-shadowing and occlusion effects occur on the inner walls and bottom of the cells when illuminated by side light sources. This prevents the pixels inside the cells from receiving effective illumination, resulting in extremely low image brightness, even approaching the ambient black level. Lacking effective light reflection information, traditional Lambertian volumetric photometric stereoscopic algorithms calculate normal vectors in these shadowed areas that are disordered, random, or flat, leading to information blind spots or pseudo-planes in the reconstructed 3D model at the cells. This makes it difficult to effectively distinguish deep honeycomb structures from shallow pores or simple black spots based on depth information, easily resulting in missed detections or false alarms. Summary of the Invention

[0005] To address the technical problem that traditional photometric stereo methods, when processing deep honeycomb structures, suffer from information blind spots or pseudo-planes in the 3D reconstruction model due to the self-shadowing effect, making it difficult for the system to distinguish between honeycomb structures, pores, and color spots, and easily leading to missed detections or false alarms, this invention provides solutions in the following aspects.

[0006] In a first aspect, the present invention provides a method for detecting surface defects in precast concrete components, the method comprising the steps of: Image sequences of the prefabricated component under illumination from multiple light sources at different angles are acquired. Based on the binarized shadow state distribution of each pixel in the image sequence, the shadow response vector of each pixel is obtained. The zenith angle of each light source is determined based on its incident direction. A weighting coefficient is determined using a mapping relationship positively correlated with the zenith angle. Each element in the shadow response vector is weighted and summed with its corresponding weighting coefficient, and then normalized to obtain the photoresistivity of each pixel. For any pixel, the spatial gradient feature of the photoresistivity in its neighborhood is calculated. A geometric correction factor is constructed based on the local surface morphology of the photoresistivity of the pixel, and an albedo correction factor is constructed based on the brightness information of the image sequence. The spatial gradient feature is weighted and fused using the geometric correction factor and the albedo correction factor to obtain the kurtosis index of each pixel. The cumulative value of the projection component of the gradient vector of the photoresistivity in the direction pointing to the center of the pixel is calculated to obtain the centripetal closure. The centripetal closure and the kurtosis index are fused to obtain the confidence index of each pixel. In response to the confidence index satisfying a preset defect condition, the defect area on the surface of the prefabricated component is determined.

[0007] This invention acquires image sequences of precast concrete components under different angular light sources, analyzes the binary shadow state distribution of pixels, and uses a weighting coefficient positively correlated with the zenith angle to weight and normalize the shadow response vector, thereby obtaining a photoresistance value that reflects the ease with which light enters the pixel. This photoresistance value utilizes the physical characteristic of deep honeycomb having strong blocking effect on lateral light, which can distinguish between deep defects and shallow depressions. Furthermore, it combines local curved surface morphology to construct a geometric correction factor and an albedo correction factor based on brightness information, and weightedly fuses the spatial gradient characteristics of the photoresistance value to obtain a kurtosis index. This reduces interference from non-geometric structures such as surface oil stains. Finally, by calculating the centripetal closure degree of the gradient vector and fusing it with the kurtosis index to generate a confidence index, the defect area is determined. By comprehensively evaluating the depth damping characteristics, edge steepness, and geometric closure characteristics of the defect, the accuracy and robustness of the system in identifying structural defects such as honeycomb in complex texture backgrounds are improved.

[0008] Preferably, the photoresistance satisfies the following relationship: ; In the formula, For pixels Optical resistivity; It is the first Pixels under illumination by a light source Binary shadow state; It is the first The zenith angle of each light source; It is the first The weighting coefficients corresponding to each light source; It is the preset first minute value; It represents the total number of light sources.

[0009] This invention calculates photoresist by using a specific ratio relationship, where the numerator is accumulated with weighted shadow states and the denominator is normalized by a cosine function to normalize the light source distribution. This calculation method can eliminate the influence of differences in the number or distribution density of light sources between different detection devices on the numerical magnitude, ensuring that the obtained photoresist can objectively reflect the degree of obstruction of light penetration through the pixel, and providing physically consistent basic data for subsequent differentiation between deep holes and shallow pits.

[0010] Preferably, determining the weighting coefficients using a mapping relationship positively correlated with the zenith angle includes: calculating the sine value of the zenith angle of the plurality of light sources; and using a natural exponential function to perform a nonlinear mapping on the sine value of each zenith angle to obtain the weighting coefficients corresponding to each light source.

[0011] Preferably, the pixel The steepness index satisfies the following relationship: ; In the formula, It is a pixel. Steepness index; Based on pixels It is the set of pixels in the neighborhood of the center pixel. It is a pixel. The coordinates of the pixels in the neighborhood; It is a pixel. The total number of pixels in the neighborhood; It is a pixel. Optical resistivity; It is a pixel. Optical resistivity; It is a pixel. and neighboring pixels The Euclidean distance between them; It is a pixel. Albedo correction factor; It is a pixel. Geometric correction factor; It is the preset second minute value.

[0012] In calculating the kurtosis index, this invention introduces a weighting mechanism based on the inverse square of the Euclidean distance and integrates an albedo correction factor and a geometric correction factor. By using distance weights to emphasize gradient changes closer to the center in the local neighborhood, and by using correction factors to remove color interference and enhance geometric feature responses, the obtained kurtosis index can more sensitively characterize the geometric morphological changes of defect edges and reduce detection bias caused by texture noise.

[0013] Preferably, the step of constructing a geometric correction factor based on the local surface morphology of the photoresistivity of the pixel includes: performing local morphological processing on the photoresistivity of the pixel to extract the local damping peak and the local gradient peak width of the pixel; calculating the ratio of the local gradient peak width to the local damping peak, converting the ratio into an angle value based on the arctangent function to obtain the aperture angle; extracting the largest eigenvalue of the Hessian matrix of the photoresistivity of the pixel as a second-order differential feature; and using the product of the second-order differential feature and the reciprocal of the aperture angle as an exponential term to construct a geometric correction factor using the natural exponential function.

[0014] This invention calculates the opening angle by extracting the local damping peak and the local gradient peak width, and constructs a geometric correction factor by combining the maximum eigenvalue of the Hessian matrix. The Hessian eigenvalue reflects the local curvature, and the opening angle reflects the aspect ratio. Combining the two can numerically enhance deep defects with large edge curvature and small opening angle, thereby highlighting the characteristic signals of severe defects such as honeycomb when calculating the steepness index, while suppressing the response value of smooth pores.

[0015] Preferably, the step of constructing the albedo correction factor based on the brightness information of the image sequence includes: calculating the difference between the average brightness of the pixel and a preset oil stain brightness threshold as a net brightness value; calculating the product of the net brightness value and a preset correction rate factor, and using the negative of the product as an exponent to calculate an exponential decay term using a natural exponential function; and recording the result of subtracting the exponential decay term from 1 as the albedo correction factor.

[0016] This invention constructs an albedo correction factor by calculating the difference between the average brightness and a preset oil stain brightness threshold. It uses the logic of exponential decay to suppress low-brightness areas. Since oil stains appear dark in the image, but are essentially a reduction in material albedo rather than geometric occlusion, this correction factor can distinguish between real geometric shadows and surface pigmentation at the algorithm level, thereby reducing the misjudgment of oil stains on concrete surfaces as structural pore defects.

[0017] Preferably, the step of fusing the centripetal closure and kurtosis indices to obtain the confidence index of each pixel includes: performing logarithmic processing on the kurtosis indices of each pixel to obtain a logarithmic kurtosis value; and adding the centripetal closure and logarithmic kurtosis values ​​to obtain the confidence index of each pixel.

[0018] This invention logarithmically processes the steepness index and adds it to the centripetal closure to obtain a confidence index. Logarithmic processing can compress the dynamic range of the data and amplify the relative numerical differences between deep holes and shallow pits, while fusing the centripetal closure supplements the contour geometric information of the defect. This fusion strategy integrates depth information and morphological information, enabling the final confidence index to more comprehensively assess the possibility of a pixel as a structural defect.

[0019] Preferably, the step of calculating the cumulative value of the projection component of the gradient vector of the photoresistivity in the direction pointing to the center of the pixel to obtain the centripetal closure includes: determining a neighborhood centered on the pixel; for each pixel in the neighborhood, recording it as a neighboring pixel, calculating the radial projection component of the photoresistivity gradient vector of the neighboring pixel in the direction pointing to the center of the pixel; filtering out the positive projection components with values ​​greater than zero from the radial projection components; and accumulating the positive projection components of all neighboring pixels in the neighborhood to obtain the centripetal closure.

[0020] Preferably, the step of determining the defect region on the surface of the precast component in response to the confidence index satisfying the preset defect condition includes: performing binarization processing on the confidence index using a double threshold hysteresis algorithm to obtain candidate defect connected regions; calculating the area of ​​each candidate defect connected region, and removing connected regions with an area smaller than a preset noise area threshold; the remaining connected regions are the defect regions on the surface of the precast component.

[0021] In a second aspect, the present invention provides a surface defect detection system for precast concrete components. The surface defect detection system for precast concrete components includes a memory and a processor. The memory stores computer program instructions, and when the computer program instructions are executed by the processor, a surface defect detection method for precast concrete components according to the first aspect of the present invention is implemented.

[0022] By adopting the above technical solution, a computer program for detecting surface defects of precast concrete components according to the first aspect of the present invention is generated and stored in a memory so that it can be loaded and executed by a processor. A terminal device can then be made based on the memory and the processor for convenient use.

[0023] The beneficial effects of this invention are as follows: This invention utilizes the shadow state under multi-angle light sources to construct photoresistivity. By applying nonlinear weighting to the lateral light shadow, it overcomes the blind zone limitation of traditional photometric stereo methods that rely on brightness reconstruction of the normal vector in deep hole regions. Utilizing the physical properties of deep honeycomb blocking lateral light intensity, it achieves a physical characterization of the depth of defects. This invention integrates albedo correction factors and geometric correction factors, enabling it to distinguish between oil stains and true geometric depressions on concrete surfaces from a mechanistic perspective. By analyzing the opening angle and second-order differential characteristics, it amplifies the difference in detection indicators between severe honeycomb defects and permissible shallow pores, reducing false detections and missed detections. This invention calculates the centripetal closure degree of the photoresistivity gradient and incorporates it into the confidence index. By utilizing the geometric topological feature of the hole defect gradient pointing towards the center, it eliminates interference from non-closed structures such as linear scratches or edge burrs, improving the reliability of the system for detecting structural defects on the surface of precast concrete components in complex industrial environments. Attached Figure Description

[0024] Figure 1 A flowchart of a method for detecting surface defects in precast concrete components provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the photoresistivity distribution provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the steepness index distribution provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the confidence index distribution provided in an embodiment of the present invention; Figure 5 This is a structural block diagram of a surface defect detection system for precast concrete components provided in an embodiment of the present invention. Detailed Implementation

[0025] The first aspect of this invention provides a method for detecting surface defects in precast concrete components, such as... Figure 1 As shown, the method includes steps S100-S400: Step S100: Obtain image sequences of the prefabricated component under illumination by multiple light sources at different angles, and obtain the shadow response vector of each pixel based on the binarized shadow state distribution of each pixel in the image sequence.

[0026] It should be noted that this invention aims to utilize the inherent self-shadowing and occlusion effects of deep-hole defects, such as honeycomb, as features for geometric discrimination, rather than relying on the brightness variations required by traditional photometric stereo methods. To comprehensively capture self-shadowing features from different orientations, this invention acquires illumination response vectors containing rich geometric information through multi-directional, sequential illumination acquisition. Simultaneously, to eliminate random noise interference in the image and address the problem of uneven reflection on concrete surfaces, Gaussian filtering denoising and adaptive threshold segmentation are required. Ultimately, accurately acquiring the shadow state under illumination at different angles is fundamental to evaluating the ease with which light penetrates a pixel, i.e., calculating photoresistance. Therefore, this invention requires acquiring illumination response vectors and shadow response vectors to provide basic illumination data for subsequent steps of photoresistance calculation and light source angle deviation correction.

[0027] Specifically, firstly, the hemispherical LED array light source is controlled to flash in a preset sequence, while simultaneously triggering an industrial camera to collect data synchronously. Original images of prefabricated components under different lighting angles. These images together constitute the original image sequence covering the prefabricated component in the illuminated space. The preferred value is 32 to ensure comprehensive coverage of the illumination angle.

[0028] Then, the acquired original image sequence is subjected to Gaussian filtering for noise reduction. Given the uneven reflectivity of the concrete surface, this invention employs the local dynamic thresholding method (Otsu) for threshold segmentation. The rule for setting the shadow threshold is: based on the average brightness of all pixels in the image sequence, its dynamic percentage is taken as the threshold. This design, which does not set a fixed threshold, can flexibly adapt to the differences in albedo among different batches of precast components. The specific value range is... .

[0029] Finally, for any pixel in the image, based on the results of adaptive threshold segmentation, the shadow mask under each light source is extracted by comparing the pixel grayscale value with a preset shadow threshold; a shadow response vector is then generated based on the shadow mask. The vector contains elements, where each element Representing the Pixels under illumination by a light source The shadow state is determined by the following rules: when the first shadow state is in shadow... When illuminated by a light source, if the pixel When the grayscale value is lower than the preset shadow threshold, it is determined to be a shadow. Otherwise, it is determined to be illuminated. .

[0030] At this point, the shadow response vector of each pixel under different lighting conditions has been obtained.

[0031] Step S200: Determine the zenith angle of each light source based on the incident direction of the light source, determine the weight coefficient using the mapping relationship that is positively correlated with the zenith angle, and perform weighted summation and normalization on each element in the shadow response vector and the corresponding weight coefficient to obtain the photoresistivity of each pixel.

[0032] It should be noted that deep honeycomb structures on concrete surfaces exhibit high resistance to lateral light. Incorrect damping assessments will fail to distinguish between pores with large depth-to-width ratios and shallow pores, leading to misjudgments. Therefore, this invention employs angle-weighted and exponentially amplified lateral light shadow states to assess the ease with which light enters the pixel, obtaining the light resistance as preliminary physical evidence of the presence of deep holes.

[0033] First, the least squares method is used to solve for the light source angle deviation correction matrix. This matrix is ​​then used to correct the preset direction vector of each light source to obtain the corrected direction vector. It should be noted that, to eliminate potential angle errors in the actual installation of the light source array, this invention introduces the least squares method for correction. The least squares method is an optimization technique that finds the best function match for data by minimizing the sum of squares of errors. This invention chooses this method, utilizing the redundant data of the light source array to smooth out random installation errors, thereby obtaining globally optimal angle correction parameters and ensuring the physical accuracy of subsequent weighted calculations based on geometric angles.

[0034] Specifically, a calibration image sequence of a standard high-reflectivity calibration sphere, such as a chromium sphere, is collected under illumination from various light sources. The center position of the highlight spot on the surface of the calibration sphere is extracted. Based on the principle of specular reflection geometry, the actual calibration direction vector of each light source is calculated. Using the preset direction vectors and actual calibration direction vectors of all light sources as inputs, an objective function is constructed with the constraint of minimizing the sum of the Euclidean distances between the transformed preset direction vectors and the actual calibration direction vectors. Based on the least squares criterion, a correction matrix is ​​solved to minimize the sum of the Euclidean distances. The preset direction vector of each light source is multiplied by the correction matrix to obtain the corrected direction vector.

[0035] Then, the zenith angle of each light source is calculated. It should be noted that the light impedance is used to distinguish the degree to which light rays at different incident angles are blocked, while the zenith angle reflects the angle between the light ray and the normal to the surface of the component, and is the geometric reference for determining whether the light ray is side light or perpendicular light.

[0036] Specifically, the cosine of the angle between the correction direction vector and the normal vector of the component surface is calculated, and the zenith angle corresponding to each light source is obtained through the inverse cosine function.

[0037] Finally, for each pixel in the image, the photoresistance is calculated based on the shadow response vector and zenith angle corresponding to that pixel. It should be noted that for honeycombs with a large aspect ratio, the internal sidewalls block almost all lateral light, allowing only a very small amount of vertical light to enter; while shallow pores only block light at very low angles. Therefore, a nonlinear weighted model needs to be constructed, giving higher suppression weights to lateral light blocking and lower weights to vertical light blocking, thereby increasing the numerical differentiation between deep pores and shallow pits.

[0038] Based on the above logic, the photoresistance satisfies the following relationship: ; In the formula, For pixels Optical resistivity; It is the first Pixels under illumination by a light source The binary shadow state, where 0 represents shadow and 1 represents illumination; It is the first The zenith angle of each light source; It is the angle weighting factor; This is a preset first tiny value used to prevent the denominator from being 0; it can be set to 0.001. It is the total number of light sources; It is a natural exponential function.

[0039] In this relation, Represents pixels In the The occlusion response state under illumination by a light source, only when the first light source is illuminated... Each light source at the pixel The shadow is produced at the place When the value is 1, the value of this item is 1, allowing subsequent weight items to participate in the accumulation; otherwise, it is 0, thus ensuring that only the light components blocked by the geometric structure are counted. It is the first The weighting coefficients corresponding to each light source, i.e. This coefficient utilizes The characteristic of the light resistivity approaching 1 when incident on the side, combined with the nonlinear amplification effect of the natural exponential function, gives a very high weight value to the shadow caused by the side light, highlighting the strong blocking effect of the deep aperture on the side light; the denominator is used to normalize the sum of the numerator, eliminating the influence of the difference in the number or distribution density of light sources between different devices on the magnitude of the photoresistivity.

[0040] It should be noted that the angle weighting factor... The value needs to be set according to the actual surface characteristics of the precast components and the testing standards: for scenarios with large surface roughness and a lot of micro-texture noise, the value can be appropriately reduced. Setting it to 1.5 reduces the model's sensitivity to subtle lateral shadows, decreasing false alarms caused by surface roughness. For scenarios with relatively smooth surfaces but extremely low tolerance for missing deep holes, where capturing high aspect ratio micro-holes is required, the value can be increased appropriately. If set to 3, the signal strength of lateral light shadows is exponentially enhanced, improving the ability to identify deep geometric structures. In this embodiment, the surface quality and detection accuracy of general-purpose tube segments are considered comprehensively. The preferred setting is 2.

[0041] like Figure 2 The diagram shows a schematic of photoresist distribution. Different hue regions in the diagram represent the magnitude of photoresist values. The circular area in the upper left corner of the diagram presents a warm hue representing high values, indicating that the area has a strong ability to block lateral light, which is consistent with the physical characteristics of deep hole defects. The surrounding background area presents a cool hue representing low values, indicating that the surface of the area is flat and light can easily penetrate.

[0042] At this point, the photoresistivity of each pixel has been obtained.

[0043] Step S300: For any pixel, calculate the spatial gradient features of the photoresistivity in its neighborhood; construct a geometric correction factor based on the local surface morphology of the photoresistivity of the pixel, and construct an albedo correction factor based on the brightness information of the image sequence; use the geometric correction factor and the albedo correction factor to perform weighted fusion of the spatial gradient features to obtain the steepness index of each pixel.

[0044] It should be noted that on the surface of precast components, severe honeycomb defects typically exhibit a topological structure with steep edges and deep interiors, while permissible pitted pores show smooth edges and shallow transitional characteristics. Furthermore, while surface oil stains appear as dark areas in grayscale, they lack true geometric depressions. To accurately capture these morphological differences, this invention, based on photoresistivity, further analyzes their spatial distribution. By introducing local spatial gradient calculations, combined with a second-order Hessian operator capable of responding to high-curvature edges and an opening angle inversion characterizing aspect ratio, a conical aperture index is constructed. This index transforms simple light occlusion information into a physical description of the steepness and geometric opening of defect edges, and integrates an albedo correction mechanism, thereby achieving sensitive capture of deep structural defects while eliminating planar color spot interference.

[0045] First, the aperture angle of the hole is inverted based on the photoresistivity. The aperture angle is a key indicator for converting light intensity information into core geometric parameters. The magnitude of the photoresistivity reflects the depth, while the distribution of its gradient reflects the width. By establishing the geometric relationship between the two, the equivalent aperture angle of the hole can be calculated, thereby evaluating the aspect ratio of the hole.

[0046] Specifically, each pixel and its corresponding photoresistance are traversed and mapped according to their coordinate positions in the original image to construct a single-channel photoresistance image. Based on this image, local morphological processing is performed to extract the local damping peak value representing the central light intensity attenuation limit and the local gradient peak width representing the lateral span of the edge gradient change. The ratio of the local gradient peak width to the local damping peak value is calculated, and the ratio is converted into an angle value based on the arctangent function to obtain the hole opening angle. The ratio reflects the proportional relationship between the lateral opening size and the longitudinal depth size in the hole geometry; the arctangent function reflects the equivalent angle of the hole opening when viewed from the bottom of the hole. When the damping value is larger and the distribution is narrower, the opening angle is smaller, numerically representing a deeper defect at that location.

[0047] Secondly, a geometric correction factor and an albedo correction function are constructed. It should be noted that, to enhance sensitivity to severe defects and eliminate interference from oil contamination, this invention utilizes higher-order differential features and brightness statistical features to construct the correction term. Relying solely on first-order gradient information is insufficient to distinguish between gently transitioning non-severe defects and steeply transitioning severe defects, and is easily affected by surface texture noise; furthermore, oil contamination resembles shadows in grayscale, easily leading to false detections. Therefore, it is necessary to introduce an operator sensitive to curvature to lock in structural abrupt changes and to introduce brightness statistics to identify material properties.

[0048] Specifically, the second-order Hessian matrix of the photoresistivity image is calculated, and the pixels are extracted. The maximum eigenvalue at a given location is used to construct a geometric correction factor in conjunction with the opening angle.

[0049] Based on the above logic, the geometric correction factor satisfies the following relationship: ; in, It is a pixel. Geometric correction factor; It is a pixel. The largest eigenvalue at; It is a weight hyperparameter; It is the natural exponential function; It is a pixel. The opening angle; It is a preset third micro value used to prevent It should be 0, or it can be set to 0.001.

[0050] In this relation, It is the largest eigenvalue of the second-order Hessian matrix of the photoresistivity surface at the current pixel. This value numerically represents the maximum principal curvature or edge curvature of the local geometric surface. For honeycomb defects with sharp edges, this eigenvalue is larger. Calculating the reciprocal of the opening angle of a hole reflects the geometric aspect ratio of the defect. The smaller the value, the larger the reciprocal value; this relationship indicates that when a pixel simultaneously has a large eigenvalue and a small aperture angle, the exponential term increases rapidly, making... A value greater than 1 is used to achieve numerical enhancement of severe defect signals.

[0051] Simultaneously, an albedo correction factor is constructed. It should be noted that while surface stains such as oil stains appear dark in the image, their true nature is a reduction in the material's albedo, not insufficient lighting due to geometric occlusion. By analyzing the average brightness of pixels, we can effectively distinguish between genuine geometric shadows and surface pigmentation, thereby eliminating such unstructured interference at the algorithmic level.

[0052] Based on the above logic, the albedo correction factor satisfies the following relationship: ; In the formula, It is a pixel. Albedo correction factor; The preset oil stain brightness threshold; It is a correction rate factor; It is a pixel. Average brightness; It is a natural exponential function. It is a maximum value function.

[0053] In this relation, Calculate pixels The difference between the brightness of a pixel and the oil stain threshold reflects the confidence level that the pixel belongs to a non-oil stain area. The negative exponential decay coefficient, calculated based on this difference, reflects the suppression strength of low-brightness areas. When pixel brightness approaches the oil stain threshold... At that time, the attenuation coefficient is close to 1, resulting in The attenuation coefficient approaches 0, thus suppressing the calculation result of that pixel; when the pixel brightness is high, the attenuation coefficient approaches 0, preserving the original calculation result.

[0054] It should be noted that the preset oil stain brightness threshold and correction rate factor Settings need to be adjusted according to actual working conditions: For production environments that are dirty or have dark-colored oil stains, the setting can be appropriately increased. For example, set it to 30% of the average brightness and increase it. For example, setting it to 0.8 can enhance the removal of stubborn oil stains; for cleaner environments where only minor stains need to be removed, the setting can be reduced. For example, set it to 15% of the average brightness and reduce it. For example, setting it to 0.3 is to avoid accidentally damaging dark-colored aggregates. In this embodiment, the production environment of general-purpose segments is taken into account. The preferred setting is 20% of the average brightness. The preferred value is 0.5.

[0055] Finally, the cone aperture of each pixel is calculated. It should be noted that the cone aperture is a comprehensive indicator characterizing the steepness of the defect edge. It is based on the spatial gradient of photoresistivity, incorporating albedo correction to eliminate artifacts and higher-order geometric correction to pinpoint deep hole edges.

[0056] Based on the above logic, the pixel point The steepness index satisfies the following relationship: ; In the formula, It is a pixel. Steepness index; Based on pixels It is the set of pixels within the local neighborhood of the center pixel. It is a pixel. The coordinates of the pixels in the neighborhood; It is a pixel. The total number of pixels in the neighborhood; It is a pixel. Optical resistivity; It is a pixel. Optical resistivity; It is a pixel. With neighboring pixels The Euclidean distance between them; It is a pixel. Albedo correction factor; It is a pixel. Geometric correction factor; It is a preset second tiny value used to prevent It should be 0, or it can be set to 0.001.

[0057] In this relation, The spatial rate of change of photoresistivity within the local neighborhood was calculated and normalized using the square of the Euclidean distance as the weight. This relation, by dividing by the square of the distance, assigns greater weight to gradient changes closer to the center within the neighborhood, thus capturing small, steep changes at the defect edge. Multiplying by a correction factor... High values ​​are only observed in areas with steep edges, deep structures, and no oil contamination, thus enabling accurate location of the cellular structure.

[0058] like Figure 3The diagram shows the distribution of the steepness index. The contrast between light and dark areas in the diagram represents the strength of the steepness index. The edge of the hole on the left side of the diagram shows a bright closed ring structure, indicating that there is a drastic gradient change in the photoresistivity at that location, and the edge is extremely steep. On the other hand, the edge of the hole on the right side is darker and has a blurred outline, indicating that its edge transition is smooth and does not form an effective steep structure.

[0059] At this point, the steepness index of each pixel has been obtained.

[0060] Step S400: Calculate the cumulative value of the projection component of the gradient vector of the photoresistivity in the direction pointing to the center of the pixel to obtain the centripetal closure degree. Combine the centripetal closure degree with the steepness index to obtain the confidence index of each pixel. In response to the confidence index satisfying the preset defect conditions, determine the defect area on the surface of the prefabricated component.

[0061] It should be noted that while the kurtosis index accurately characterizes the steepness of defect edges, relying solely on this single index is insufficient to completely distinguish between genuine pores and non-closed interference. For example, linear scratches or edge burrs may exhibit a high kurtosis index locally, but they do not possess the closed loop structure characteristic of pores in terms of geometric topology. Therefore, this invention introduces centripetal closure calculated based on the directional characteristics of photoresist in spatial distribution, and fuses this information with the kurtosis index to construct a single-dimensional confidence index. This index assesses the degree to which the current pixel's location is both deep and closed, thereby enabling the classification of shallow pores, surface spots, and deep honeycombing.

[0062] Based on the above logic, the pixel point The confidence index satisfies the following relationship: ; in, For pixels Confidence index; It is a pixel. Steepness index; It is a pixel. The gradient vector of the light resistivity; It revolves around the pixel. Along arrive Angle The changing unit direction vector; It is a maximum value function; It is a logarithmic function; It is the dot product operator.

[0063] In this relation, the first term By using a logarithmic function to compress the dynamic range of the steepness index, the relative numerical differences between deep holes and shallow pits are amplified, improving the index's sensitivity to depth changes while suppressing high-value overflow caused by individual noise points. (Second term) The term "centripetal closure" refers to the degree of centripetal convergence of the photoresist gradient field, which is evaluated using integral operations. A maximum function is used to eliminate divergent gradients away from the center, retaining only the convergent gradients pointing towards the center. Finally, the convergent components in all directions are accumulated through integration. For real honeycomb holes, the gradients at all four edges point towards the geometric center, resulting in a significantly larger integral. For linear scratches, the gradient field is mainly concentrated on both sides perpendicular to the scratch, failing to form a closed loop in the circumferential direction, and the integral result approaches zero.

[0064] like Figure 4 The diagram shows the distribution of the confidence index. The brightness difference of the regions in the diagram represents the level of the confidence index. The center of the hole on the left side of the diagram shows obvious bright features, indicating that the region has both high steepness and closed geometric features, and is judged as a serious structural defect. On the other hand, the brightness of the shallow pit and background noise region on the right side is generally low, indicating that they belong to non-structural defects or interference, thus achieving accurate differentiation of serious defects.

[0065] Based on the calculated confidence index The surface condition of precast components is classified into three levels: When confidence index Below the preset noise threshold When the confidence index is high, it indicates that the pixel location lacks obvious geometric depression features and is judged as a non-defect area such as background noise or surface oil stains; when the confidence index is high... lie in With structural defect threshold Between (i.e.) When the confidence index is high, it indicates that the pixel location has a certain edge steepness but insufficient depth, and is judged as a shallow defect such as pores or pitting. Such defects are only recorded and no alarm is triggered; when the confidence index is high... Greater than or equal to the structural defect threshold When this occurs, it indicates that the pixel's location simultaneously possesses high steepness and closed geometric features, classifying it as a severe structural defect such as a honeycomb structure, triggering an alarm or repair process. Furthermore, the structural defect threshold... The calibration method is as follows: Collect a set of typical cellular defect samples with known aspect ratios greater than or equal to 1:3, calculate their average confidence index, and set 80% of this average value as the benchmark. .

[0066] It should be noted that the noise threshold The value needs to be set according to the surface roughness and inspection accuracy requirements of the precast component: for scenarios with large surface roughness and obvious aggregate texture, the value can be appropriately increased. Setting it to 0.3 or 4 times the standard deviation of the background noise mean can enhance the suppression of background texture noise and prevent normal surface micro-unevenness from being misjudged as porosity defects. For scenarios with finely ground smooth surfaces and high requirements for appearance quality, the value can be appropriately reduced. Setting it to 0.1 or twice the standard deviation of the background noise mean can improve the sensitivity to capturing minute, shallow pitting and ensure a comprehensive appearance assessment. In this embodiment, the surface quality of general-purpose pipe segments is comprehensively considered. It is preferable to set it to 0.2 or 3 times the standard deviation of the mean background noise.

[0067] The second aspect of this embodiment provides a surface defect detection system for precast concrete components, such as... Figure 5 As shown, the surface defect detection system for precast concrete components includes a memory and a processor. The memory stores computer program instructions, which, when executed by the processor, implement a method for detecting surface defects in precast concrete components according to the first aspect of this invention.

[0068] The surface defect detection system for precast concrete components also includes other components well known to those skilled in the art, such as communication buses and communication interfaces. Their setup and functions are known in the art and will not be described in detail here.

[0069] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as resistive random access memory (DRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (DRAM), high-bandwidth memory, hybrid memory cube, etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device.

[0070] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A method for detecting surface defects in precast concrete components, characterized in that, Including the following steps: The image sequence of the prefabricated component under illumination by multiple light sources at different angles is obtained, and the shadow response vector of each pixel is obtained based on the binarized shadow state distribution of each pixel in the image sequence. The zenith angle of each light source is determined based on its incident direction. A mapping relationship positively correlated with the zenith angle is used to determine weighting coefficients. Each element in the shadow response vector is weighted and summed with its corresponding weighting coefficient, then normalized to obtain the photoresistance of each pixel. , ; It is the first Pixels under illumination by a light source Binary shadow state; It is the first The zenith angle of each light source; It is the first The weighting coefficients corresponding to each light source; It is the preset first minute value; It is the total number of light sources; For any pixel, calculate the spatial gradient characteristics of the photoresistivity in its neighborhood. A geometric correction factor is constructed based on the local surface morphology of the photoresistivity of each pixel, and an albedo correction factor is constructed based on the brightness information of the image sequence. The spatial gradient features are then weighted and fused using the geometric and albedo correction factors to obtain the kurtosis index of each pixel. , ; Based on pixels It is the set of pixels in the neighborhood of the center pixel. It is a pixel. The coordinates of the pixels in the neighborhood; It is a pixel. The total number of pixels in the neighborhood; It is a pixel. Optical resistivity; It is a pixel. and its neighboring pixels The Euclidean distance between them; It is a pixel. Albedo correction factor; It is a pixel. Geometric correction factor; It is the preset second minute value; The centripetal closure is obtained by calculating the cumulative value of the projection component of the photoresist gradient vector in the direction pointing to the center of the pixel. This includes: determining the neighborhood centered on the pixel; for each pixel in the neighborhood, recording it as a neighboring pixel, and calculating the radial projection component of the photoresist gradient vector of the neighboring pixel in the direction pointing to the center of the pixel; selecting the positive projection components with values ​​greater than zero from the radial projection components; accumulating the positive projection components of all neighboring pixels in the neighborhood to obtain the centripetal closure; fusing the centripetal closure with the kurtosis index to obtain the confidence index of each pixel. This includes: logarithmizing the kurtosis index of each pixel to obtain the logarithmic kurtosis value; adding the centripetal closure with the logarithmic kurtosis value to obtain the confidence index of each pixel; and determining the defect area on the surface of the prefabricated component in response to the confidence index satisfying the preset defect conditions.

2. The method for detecting surface defects in precast concrete components according to claim 1, characterized in that, The determination of weighting coefficients using a mapping relationship positively correlated with the zenith angle includes: Calculate the sine value of the zenith angle of the plurality of light sources; The natural exponential function is used to perform a nonlinear mapping of the product of the sine value of each zenith angle and the preset angle weighting factor to obtain the weighting coefficient corresponding to each light source.

3. The method for detecting surface defects in precast concrete components according to claim 1, characterized in that, The geometric correction factor is constructed based on the local surface morphology of the photoresistivity of the pixel, including: Local morphological processing is performed on the photoresistivity of the pixel to extract the local damping peak value and the local gradient peak width of the pixel. Calculate the ratio of the local gradient peak width to the local damping peak value, and convert the ratio into an angle value based on the arctangent function to obtain the opening angle; The maximum eigenvalue of the Hessian matrix of the photoresistivity of the pixel is extracted as a second-order differential feature. The product of the reciprocal of the sum of the opening angle and the preset third minute value and the second-order differential characteristic is used as the exponential term, and a geometric correction factor is constructed using the natural exponential function.

4. The method for detecting surface defects in precast concrete components according to claim 1, characterized in that, The construction of the albedo correction factor based on the brightness information of the image sequence includes: The difference between the average brightness of the pixel and the preset oil stain brightness threshold is calculated as the net brightness value; Calculate the product of the net brightness value and the preset correction rate factor, and use the negative of the product as the exponent to calculate the exponential decay term using the natural exponential function; The result of subtracting the exponential decay term from 1 is denoted as the albedo correction factor.

5. The method for detecting surface defects in precast concrete components according to claim 1, characterized in that, The step of determining the defect area on the surface of the precast component in response to the confidence index satisfying the preset defect condition includes: The confidence index is binarized using a double threshold hysteresis algorithm to obtain the candidate defect connected component. Calculate the area of ​​each candidate defect connected region, and remove connected regions with an area smaller than the preset noise area threshold; the remaining connected regions are the defect areas on the surface of the precast component.

6. A surface defect detection system for precast concrete components, characterized in that, The surface defect detection system for precast concrete components includes a processor and a memory. The memory stores computer program instructions, which, when executed by the processor, implement a method for detecting surface defects in precast concrete components according to any one of claims 1-5.