A prefabricated component surface defect detection method based on machine vision

By combining fractional-order operators with structural tensor decomposition, the problem of low accuracy in fine edge detection under complex working conditions is solved, achieving high-precision surface defect detection of precast concrete components and improving the anti-interference ability and feature extraction continuity of the detection system.

CN122368056APending Publication Date: 2026-07-10SHAANXI CONSTR ENG (ANKANG) NEW BUILDING MATERIALS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHAANXI CONSTR ENG (ANKANG) NEW BUILDING MATERIALS CO LTD
Filing Date
2026-06-08
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve high-precision detection of weak-contrast micro-edge defects under complex working conditions, especially in the context of overlapping defects and complex textures on the surface of precast concrete components. As a result, the detection accuracy is low and it is prone to false detections or missed detections.

Method used

A method combining fractional-order operators and structural tensor decomposition is adopted. The image is enhanced by denoising through fractional-order diffusion operators, and the high-frequency texture of the background and the edge transition components are separated by the structural tensor decomposition matrix. High-dimensional semantic feature vectors are generated by combining local binary patterns and gray-level co-occurrence matrices, and the defect results are output by comparing Mahalanobis projection distance.

Benefits of technology

It effectively suppresses noise interference in complex backgrounds, improves the accuracy of fine edge detection and the system's anti-interference ability, and enhances the continuity of defect feature extraction and detection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122368056A_ABST
    Figure CN122368056A_ABST
Patent Text Reader

Abstract

This invention belongs to the field of quality inspection technology for precast concrete components, and relates to a machine vision-based method for detecting surface defects in precast components. The method includes: separating high-frequency texture and edge transition components using a fractional-order diffusion operator and a structural tensor decomposition matrix; reconstructing the image matrix using a cascaded residual module; extracting local binary patterns and gray-level co-occurrence matrix feature values ​​from the reconstructed image matrix; and splicing these features to generate a high-dimensional semantic feature vector; comparing the high-dimensional feature vector with the Mahalanobis projection distance boundary magnitude of the standard central cluster to output a labeling result. This invention establishes a spatially adaptive fractional-order diffusion mechanism, utilizing the fractional-order weak memory property to block gray-level fusion across weak defect edges, thus resolving the reverse repulsion constraint between noise suppression and edge fidelity, and improving the peeling accuracy of weak-contrast fine edges.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quality inspection technology for precast concrete components, and relates to a machine vision-based method for detecting surface defects in precast components. It is used for surface defect detection in the factory quality inspection of precast concrete components for assembled buildings, and can improve the accuracy of detecting weak contrast micro-edge defects. Background Technology

[0002] The manufacturing quality of prefabricated concrete components directly affects the overall safety and durability of building structures. Accurate identification and quantitative assessment of surface defects have become a core aspect of ensuring component performance. However, existing automated inspection technologies still have limitations in handling complex background interference, collaborative identification of multiple types of defects, and low-cost engineering deployment. First, there is image preprocessing technology based on partial differential equations. For example, Chinese invention patent CN107085840B discloses an image denoising method based on fractional partial differential equations. This method utilizes the nonlocality of fractional derivatives to preserve texture details as much as possible while denoising. However, its drawback is that this technology essentially belongs to the category of low-level image enhancement, focusing on the physical repair of pixel-level details. It lacks the ability to extract and classify high-level semantic features of defects, making it difficult to directly map them into automated location instructions for defects. It also fails to form a logical closed loop between image processing and engineering quality judgment.

[0003] Second, lightweight detection technology based on structure-guided networks; for example, Chinese invention patent CN121746384B discloses a lightweight detection method for surface defects of precast components based on structure-guided networks. It enhances the perception of crack direction information through hierarchical feature extraction and LMES module. Its shortcomings are: the technology focuses on the feature description of a single type of defect. In real scenarios where multiple types of defects overlap, the depth and scale adaptability of feature fusion are still insufficient. Moreover, the ability to suppress shadow noise caused by unevenness of concrete surface is limited, and it is easy to generate cumulative drift in detection accuracy under complex texture background.

[0004] Third, multi-task detection technology based on deep feature fusion; for example, Chinese invention patent application CN121725289A discloses a multi-task detection method for surface defects of prefabricated components based on deep feature fusion. It achieves simultaneous identification of multiple types of defects through multi-view camera array and dynamic feature fusion. Its drawbacks are: the scheme is highly dependent on the hardware integration of multi-sensor arrays, and the system deployment cost and real-time computing power are high; at the same time, different detection tasks are inconsistent in semantic space distribution. When faced with extreme non-uniform interference such as release agent residue or stains, the lack of a mandatory semantic alignment mechanism can easily lead to feature interference between tasks, resulting in the risk of false detection or missed detection.

[0005] Therefore, how to construct a detection architecture with multi-scale feature adaptive interaction capability, so that the recognition logic converges to a high-precision geometric quantization evaluation boundary under complex working conditions, is the technical problem to be solved by this invention. Summary of the Invention

[0006] The purpose of this invention is to overcome the shortcomings of the prior art and solve the technical problem of low detection accuracy of weak contrast fine edges due to interference from material surface mixing under complex working conditions, and to provide a machine vision-based method for detecting surface defects of prefabricated components.

[0007] To achieve the above-mentioned objectives, the present invention provides a method for detecting surface defects in prefabricated components based on machine vision, comprising the following steps: Step S101: Obtain two-dimensional image data of the surface of the component on the inspection line: Obtain two-dimensional image data of the surface of the precast concrete component on the quality inspection line. Step S102: Output the reconstructed image using fractional-order operators and tensor decomposition: Input the two-dimensional image data into the spatial domain denoising and enhancement module, calculate the fractional-order differential terms of each pixel using fractional-order diffusion operators, and separate the background high-frequency texture components and edge transition components using the structural tensor decomposition matrix. Input the edge transition components into the cross-scale cascaded residual module for multi-scale convolution and reconstruction, and output the reconstructed image data matrix. Step S103, concatenating binary pattern and grayscale features to generate a high-dimensional feature vector: calculate the local binary pattern histogram component value and the grayscale co-occurrence matrix joint probability component value of the recombined image data matrix, and concatenate the local binary pattern histogram component value and the grayscale co-occurrence matrix joint probability component value into a multi-dimensional vector horizontally to generate a high-dimensional semantic feature vector containing 24 feature elements. Step S104, Mahalanobis projection distance comparison output component defect results: Input the high-dimensional semantic feature vector into the Mahalanobis distance classifier, calculate the Mahalanobis projection distance between the high-dimensional semantic feature vector and the known defect-free standard feature center cluster, compare the Mahalanobis projection distance with the projection distance boundary amplitude of the fixed classification hyperplane, and output the surface defect marking results of the precast concrete component based on the comparison results.

[0008] Step S102 of the present invention includes the following sub-steps: Step S1021, dividing the two-dimensional image data into multiple non-overlapping local pixel matrix blocks; Step S1022, performing spatial domain fractional first-order convolution filtering on each local pixel matrix block using a fractional-order diffusion operator to obtain the corresponding fractional-order diffusion matrix; Step S1023, performing anisotropic tensor decomposition on each fractional-order diffusion matrix using a structural tensor decomposition matrix to separate and output the background high-frequency texture component and the edge transition component.

[0009] In the present invention, under the condition of clearing surface noise interference using fractional diffusion operators and structural tensor decomposition matrices, step S102 of performing multi-scale convolutional reconstruction of edge transition components through a cross-scale cascaded residual module includes: inputting the edge transition components into a multi-layer cascaded residual convolution path, extracting multi-scale dense edge distribution feature values ​​using two feature kernels of different sizes, and adding the multi-scale dense edge distribution feature values ​​to the edge transition components element by element to output the reconstructed image data matrix.

[0010] The step S103 of this invention, which calculates the local binary pattern histogram component values ​​of the reconstructed image data matrix, includes: taking each pixel in the reconstructed image data matrix as the center pixel, comparing the gray values ​​of the eight neighboring pixels in the neighborhood of the center pixel with the gray value of the center pixel; when the gray value of the neighboring pixels is greater than or equal to the gray value of the center pixel, setting the position code value of the neighboring pixels to the number 1; when the gray value of the neighboring pixels is less than the gray value of the center pixel, setting the position code value of the neighboring pixels to the number 0; arranging and combining the obtained 8-bit binary numbers clockwise and converting them into decimal values ​​as the local binary pattern transform value of the center pixel; statistically analyzing the local binary pattern transform values ​​of all pixels in the reconstructed image data matrix to construct a local binary pattern histogram; and using the segmental statistical frequency of the local binary pattern histogram as the local binary pattern histogram component value.

[0011] The step S103 of the present invention, which calculates the joint probability component value of the gray-level co-occurrence matrix of the reconstructed image data matrix, includes: statistically analyzing the joint probability distribution values ​​of gray-level between pixel pairs that are spatially separated by 2 pixels and have a horizontal angle of 0° in the reconstructed image data matrix to construct a two-dimensional reference matrix; calculating the energy index value, entropy index value, and contrast index value based on the two-dimensional reference matrix; and concatenating the energy index value, entropy index value, and contrast index value into a multi-dimensional horizontal vector to generate the joint probability component value of the gray-level co-occurrence matrix.

[0012] The known defect-free standard feature center cluster described in this invention is obtained through the following method: acquiring sample image data of known defect-free precast concrete components, inputting the sample image data of known defect-free precast concrete components into a denoising and enhancement module to output a sample reconstructed image data matrix, extracting the corresponding sample local binary mode histogram component values ​​and sample gray-level co-occurrence matrix joint probability component values, splicing them to generate multiple sets of sample high-dimensional semantic feature vectors, calculating the geometric mean center of the multiple sets of sample high-dimensional semantic feature vectors in the multi-dimensional feature space, and using the geometric mean center as the center coordinate of the known defect-free standard feature center cluster.

[0013] In step S101 of the present invention, when acquiring two-dimensional image data of the surface of a precast concrete component on a quality inspection line, the two-dimensional image data is captured by a camera assembly and a lighting assembly installed at the inspection station. The axis of the strip light source of the lighting assembly is inclined at an angle of 35° to 45° to the surface of the precast concrete component to be tested, so that the reflected light is projected into the vertical optical axis lens of the camera assembly.

[0014] After outputting the surface defect marking result of the precast concrete component in step S104 of the present invention, a judgment feedback step is also included: when the surface defect marking result of the precast concrete component indicates the presence of a defect, an alarm data control command is generated and a pulse signal for switching the reversing valve is sent to the automated sorting cylinder at the back end of the inspection line to control the automated sorting cylinder to push the corresponding heterogeneous precast concrete component away from the transmission track.

[0015] In step S102 of the present invention, the fractional order of the fractional diffusion operator is controlled within the range of 0.3 to 0.8. The fractional order decreases linearly and monotonically to a lower limit of 0.3 as the local pixel gray-level gradient value of the two-dimensional image data increases, and increases linearly and monotonically to an upper limit of 0.8 as the local pixel gray-level gradient value decreases, thereby dynamically adjusting the integral mask weight of the denoising filter.

[0016] Compared with the prior art, the present invention has at least the following beneficial effects: 1. In the detection of surface defects of prefabricated components using machine vision, by dividing the two-dimensional original image matrix and combining it with the Shannon information entropy of the gray-level histogram data of the sub-image blocks, a spatially adaptive fractional-order parameter is established. This causes the image data matrix to generate localized anisotropic diffusion during the numerical solution of partial differential equations. When the gray-level abrupt change in the local pixel neighborhood exhibits a random speckle distribution, the low-order fractional-order partial differential control parameter output by the high-entropy threshold mapping is based on the forward smoothing weight of the diffusion coefficient matrix, which attenuates the discrete pseudo-gradient noise caused by isotropic scattering. When the gray-level jump in the local pixel neighborhood exhibits a continuous geometric linear direction, the high-order parameter output by the low-entropy threshold mapping triggers reverse diffusion, locking the steepness of the gray-level jump in the vertical direction of the continuous edge. The nonlinear weak memory property of the multi-order fractional-order operator and the directional gradient magnitude control mechanism are decoupled from each other, allowing the image data to evolve towards a specific state of structural gradient enhancement and discrete noise smoothing. This avoids the blurring of weak contrast fine edges caused by the indiscriminate smoothing of conventional integer-order filtering, ensuring the accuracy of subsequent high-dimensional semantic feature vector construction at the image data level.

[0017] 2. The reconstructed image matrix introduces structural tensor analysis based on second-order partial derivatives to extract orthogonal eigenvalues ​​of pixel neighborhoods and calculate their ratios. This provides a geometric constraint discrimination capability for image data flow based on the ability to identify discrete point-like mutations and continuous linear mutations. When the anisotropy control parameter is greater than the preset speckle threshold, the algorithm determines that the target pixel is located in the inherent aggregate speckle region of the material and distributes equal positive diffusion weights to the surrounding areas to accelerate the homogenization of pixel grayscale in this region. When the anisotropy control parameter is less than the preset linear threshold, the algorithm determines that the target pixel is located at the edge of a potential micro-mutation. By extracting the eigenvector direction corresponding to the smaller eigenvalue, positive diffusion weights are distributed only along the eigenvector direction, while blocking grayscale fusion in the direction of the maximum rate of change. This mechanism separates the overlapping features of speckle patches and continuous edges of micro-defects on the material surface in the grayscale gradient in the anisotropy control dimension through orthogonal decoupling calculation of geometric space tensors, suppressing false contour extraction caused by point noise.

[0018] 3. In the feature vector construction stage, a low-resolution image matrix is ​​generated by spatial downsampling the reconstructed image matrix. The first feature vector of the original resolution and the second feature vector of the low resolution are extracted in a cascade manner to construct a cross-scale Euclidean distance residual observation chain. When the feature residuals under multiple scales present extreme points that conform to the preset straight line distribution in the spatial topology, the algorithm identifies pixel-level edge breaks caused by local imaging limitations or residual release agent. The connectivity weights of the breakpoint region are reshaped in the high-dimensional feature space. This dual-scale cascade extraction and residual correction mechanism work together to separate the isolated noise mutations and the homologous discontinuous micro-edges in the single-scale space on the scale evolution path, enhancing the continuity of the feature space for extracting weak break features and the system's anti-interference ability. Attached Figure Description

[0019] Figure 1 This is a schematic diagram of the data processing flow of the precast component surface defect detection method of the present invention; Figure 2 This is a schematic diagram illustrating the principle of splicing high-dimensional feature vectors of the local binary pattern and gray-level joint probability components in this invention. Detailed Implementation

[0020] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments and accompanying drawings.

[0021] Example 1: This embodiment discloses a method for detecting surface defects in prefabricated components based on machine vision, including the following steps: Step S101: Obtain two-dimensional image data of the surface of the component on the inspection line: Obtain two-dimensional image data of the surface of the precast concrete component on the quality inspection line. Step S102: Output the reconstructed image using fractional-order operators and tensor decomposition: Input the two-dimensional image data into the spatial domain denoising and enhancement module, calculate the fractional-order differential terms of each pixel using fractional-order diffusion operators, and separate the background high-frequency texture components and edge transition components using the structural tensor decomposition matrix. Input the edge transition components into the cross-scale cascaded residual module for multi-scale convolution and reconstruction, and output the reconstructed image data matrix. Step S103, concatenating binary pattern and grayscale features to generate a high-dimensional feature vector: calculate the local binary pattern histogram component value and the grayscale co-occurrence matrix joint probability component value of the recombined image data matrix, and concatenate the local binary pattern histogram component value and the grayscale co-occurrence matrix joint probability component value into a multi-dimensional vector horizontally to generate a high-dimensional semantic feature vector containing 24 feature elements. Step S104, Mahalanobis projection distance comparison output component defect results: Input the high-dimensional semantic feature vector into the Mahalanobis distance classifier, calculate the Mahalanobis projection distance between the high-dimensional semantic feature vector and the known defect-free standard feature center cluster, compare the Mahalanobis projection distance with the projection distance boundary amplitude of the fixed classification hyperplane, and output the surface defect marking results of the precast concrete component based on the comparison results.

[0022] Step S102 in this embodiment includes the following sub-steps: Step S1021, dividing the two-dimensional image data into multiple non-overlapping local pixel matrix blocks; Step S1022, using a fractional-order diffusion operator to perform spatial domain fractional-order first-order convolution filtering on each local pixel matrix block to obtain the corresponding fractional-order diffusion matrix; Step S1023, using a structural tensor decomposition matrix to perform anisotropic tensor decomposition on each fractional-order diffusion matrix to separate and output the background high-frequency texture component and the edge transition component.

[0023] In this embodiment, under the condition of removing surface noise interference using fractional diffusion operators and structural tensor decomposition matrices, step S102, which involves multi-scale convolutional reconstruction of edge transition components using a cross-scale cascaded residual module, includes: inputting the edge transition components into a multi-layer cascaded residual convolution path, extracting multi-scale dense edge distribution feature values ​​using two feature kernels of different sizes, and adding the multi-scale dense edge distribution feature values ​​to the edge transition components element by element to output the reconstructed image data matrix.

[0024] In this embodiment, step S103, calculating the local binary pattern histogram component values ​​of the reconstructed image data matrix, includes: taking each pixel in the reconstructed image data matrix as the center pixel, comparing the gray values ​​of the eight neighboring pixels in the neighborhood of the center pixel with the gray value of the center pixel; when the gray value of the neighboring pixels is greater than or equal to the gray value of the center pixel, setting the position code value of the neighboring pixel to the number 1; when the gray value of the neighboring pixels is less than the gray value of the center pixel, setting the position code value of the neighboring pixel to the number 0; arranging and combining the obtained 8-bit binary numbers clockwise and converting them into decimal values ​​as the local binary pattern transform value of the center pixel; statistically analyzing the local binary pattern transform values ​​of all pixels in the reconstructed image data matrix to construct a local binary pattern histogram; and using the segmental statistical frequency of the local binary pattern histogram as the local binary pattern histogram component value.

[0025] In this embodiment, step S103, calculating the joint probability component value of the gray-level co-occurrence matrix of the reconstructed image data matrix, includes: statistically analyzing the joint probability distribution values ​​of gray-level between pixel pairs that are spatially separated by 2 pixels and have a horizontal angle of 0° in the reconstructed image data matrix to construct a two-dimensional reference matrix; calculating the energy index value, entropy index value, and contrast index value based on the two-dimensional reference matrix; and concatenating the energy index value, entropy index value, and contrast index value into a multi-dimensional horizontal vector to generate the joint probability component value of the gray-level co-occurrence matrix.

[0026] The known defect-free standard feature center cluster described in this embodiment is obtained in the following way: acquiring sample image data of known defect-free precast concrete components, inputting the sample image data of known defect-free precast concrete components into a denoising and enhancement module to output a sample reconstructed image data matrix, extracting the corresponding sample local binary mode histogram component values ​​and sample gray-level co-occurrence matrix joint probability component values, splicing them to generate multiple sets of sample high-dimensional semantic feature vectors, calculating the geometric mean center of the multiple sets of sample high-dimensional semantic feature vectors in the multi-dimensional feature space, and using the geometric mean center as the center coordinate of the known defect-free standard feature center cluster.

[0027] In step S101 of this embodiment, when acquiring two-dimensional image data of the surface of a precast concrete component on the quality inspection line, the two-dimensional image data is captured by a camera assembly and a lighting assembly installed at the inspection station. The axis of the strip light source of the lighting assembly is inclined at an angle of 35° to 45° to the surface of the precast concrete component to be tested, so that the reflected light is projected into the vertical optical axis lens of the camera assembly.

[0028] After outputting the surface defect marking result of the precast concrete component in step S104 of this embodiment, a judgment feedback step is also included: when the surface defect marking result of the precast concrete component indicates the presence of a defect, an alarm data control command is generated and a pulse signal for switching the reversing valve is sent to the automated sorting cylinder at the back end of the inspection line to control the automated sorting cylinder to push the corresponding heterogeneous precast concrete component away from the transmission track.

[0029] In step S102 of this embodiment, the fractional order of the fractional diffusion operator is controlled within the range of 0.3 to 0.8. The fractional order decreases linearly and monotonically to a lower limit of 0.3 as the local pixel gray-level gradient value of the two-dimensional image data increases, and increases linearly and monotonically to an upper limit of 0.8 as the local pixel gray-level gradient value decreases, thereby dynamically adjusting the integral mask weight of the denoising filter.

[0030] Example 2: In this embodiment, on the factory quality inspection line for prefabricated components of assembled buildings, when a two-dimensional grayscale image of the surface of a precast concrete component is acquired via a camera assembly under an optical environment where a strip light source is projected at an angle of 35° to 45°, the system faces random high-frequency noise interference caused by the inherent texture of the concrete substrate. This phenomenon manifests as discontinuous abrupt changes in grayscale gradient caused by the distribution of fine sand and cement gel in the pixel matrix. To achieve accurate removal of microcracks and dark pore features, the system divides the two-dimensional image data into multiple sub-image blocks of 32×32 pixels and calculates a one-dimensional grayscale histogram for each sub-image block to extract Shannon information entropy. This entropy value quantitatively characterizes the degree of disorder in the gray-level distribution within a sub-image block. Based on the Grünwald Letnikov fractional difference theory, the nonlinear expression of the intensity of gray-level jumps in the spatial domain depends on the weighted weights of historical pixel data within the window. This theory is applied to a two-dimensional image matrix, using a 5×5 pixel difference mask in the single-axis direction. Local pixel gray-level gradient values ​​are generated by the fractional order diffusion matrix of the difference mask convolutional integral. The fractional order decreases linearly and monotonically with the increase of the local pixel gray-level gradient value. The control parameters at each pixel node are determined by the following formula: ,in, This is the spatially adaptive fractional order, with a value ranging from 0.3 to 0.8; For the normalized gradient operator, Based on the Shannon information entropy The adaptive adjustment coefficient, whose value is obtained by dividing the local pixel gray-level gradient value of the current pixel node by the absolute value of the maximum gray-level gradient within the sub-image block, ranges from 0 to 1. This control relationship constructs an anisotropic diffusion damping barrier at the pixel level, and the Shannon information entropy of the sub-image block... The system generates spatially adaptive fractional-order parameters based on a preset monotonically decreasing mapping function, which corresponds to the spatial distribution of local pixel grayscale gradient values. Among them, for For regions exceeding the first preset high-entropy threshold, the mapping output uses low-order parameters approaching 0.3 to enhance the diffusion smoothing weights. For regions smaller than the second preset low entropy threshold, the mapping output is a higher-order parameter approaching 0.8 to enhance edge sharpening.

[0031] The system constructs a fractional-order anisotropic diffusion partial differential equation, and converts the fractional-order parameters corresponding to the sub-image patches. Substituting into the equation, a diffusion coefficient control matrix is ​​generated by calculating the fractional-order directional gradient magnitude of each pixel node in the original two-dimensional image matrix. When the fractional-order directional gradient magnitude of a local pixel is lower than a preset base texture gradient threshold, the diffusion coefficient control matrix outputs forward diffusion weights to perform a smoothing operation; when the magnitude is higher than the edge feature gradient threshold, it outputs reverse diffusion weights to perform an edge sharpening operation. This process is solved through 10 to 15 iterations, with a time step of [missing information - likely a time step size]. The value is set to 0.15 to 0.20 to ensure the stability of the numerical solution process. The matrix output by the iterative solution forms the edge transition component. The steps of separating the background high-frequency texture component and the edge transition component using the structural tensor decomposition matrix are as follows: The system constructs a second-order symmetric structural tensor matrix in the local spatial neighborhood of each pixel in the fractional diffusion matrix. This matrix is ​​composed of the first-order outer product matrix of the first-order partial derivatives of the fractional first-order pixels in the horizontal and vertical directions, which is then weighted and smoothed by a Gaussian window function. The processing terminal performs orthogonal eigenvalue decomposition on the second-order symmetric structural tensor matrix to solve for the first eigenvalue indicating the maximum rate of change of local gray level. The second eigenvalue indicating the minimum rate of change And their corresponding orthogonal eigenvectors; when the ratio of the first eigenvalue to the second eigenvalue is greater than the preset anisotropic morphology threshold, the algorithm determines that the pixel is located on the continuous geometric direction of the defect edge. At this time, only the positive smoothing diffusion weight is allocated along the eigenvector direction corresponding to the second eigenvalue, and the step-like gray-level difference matrix in the direction of the maximum rate of change is extracted and input into the cascaded residual module as the edge transition component; when the ratio is less than the threshold, the pixel is determined to be located in the aggregate speckle region of the inherent material. At this time, equal isotropic positive smoothing weights are allocated to the surrounding area, and the discrete random scattering values ​​of the region are stripped and assigned to the background high-frequency texture component matrix. According to the scale-space invariance theory, the true defect edge geometric contour is scaled in space. While maintaining topological connectivity, high-frequency speckle noise tends to decay rapidly as resolution decreases. A cross-scale cascaded residual module downsamples edge transition components proportionally to construct a dual-layer resolution space, including two parallel residual paths. A first feature kernel of size 3×3 pixels and a second feature kernel of size 5×5 pixels are used to extract edge distribution feature values ​​at different spatial spans. The extracted multi-scale feature matrix is ​​added to the corresponding elements of the edge transition components to generate a cross-scale Euclidean distance residual observation chain. The connectivity weights at pixel breaks are reshaped based on the residual extreme points of adjacent pixel nodes, outputting a reconstructed image data matrix. The spatial topology update rule for reshaping the connectivity weights at pixel breaks based on the residual extreme points of adjacent pixel nodes is: the algorithm follows the cross-scale Euclidean distance residual observation... The system measures the chain by searching for local maxima of residual intensity in a two-dimensional topological matrix. When two spatially isolated local maxima satisfy geometric collinearity constraints within a preset 5×5 pixel window, and the absolute value of the residual of the relay bridging pixel between the two points is lower than a preset connectivity threshold, the system determines that the structure is a pixel-level edge discontinuity break caused by limited local illumination or residual mold release agent. At this point, the processing terminal calls the connectivity reshaping operator to calculate the spatial Euclidean distance and the geometric angle between the two local maxima. A directional grayscale enhancement weight matching the potential edge direction angle is injected into the matrix space corresponding to the relay bridging pixel. The magnitude of this enhancement weight is related to the residual intensity of the two maxima. The difference is proportional to the mean and inversely proportional to the geometric Euclidean distance between them. By superimposing the directional enhancement weight matrix with the original image matrix element by element, the fracture area of ​​the defect edge is compensated and connected in the feature space, thereby reshaping the spatial topological connectivity. For the recombined image data matrix, the local binary mode feature components are calculated through the equivalent mode mapping rule, and the original 256-dimensional local binary mode histogram is converged to a 59-dimensional statistical frequency matrix. Principal component analysis is calculated using the histogram matrix of offline collected defect-free component samples. The top 21 principal component feature vectors with a cumulative variance contribution rate of 95% are selected to construct the projection matrix. The 59-dimensional statistical frequency matrix is ​​multiplied by the projection matrix to output a sparse histogram vector containing 21 independent feature elements.

[0032] After obtaining the reconstructed image matrix, the system extracts local binary mode feature components and gray-level co-occurrence matrix feature components, and concatenates them to generate a high-dimensional semantic feature vector containing 24 feature elements. The system calculates the Mahalanobis projection distance between this high-dimensional semantic feature vector and the known defect-free standard feature center cluster, and compares this projection distance with the projection distance boundary magnitude of the preset fixed classification hyperplane. The classification decision in the multidimensional feature space is based on the multivariate statistical analysis distance metric theory. The fixed classification hyperplane is defined by a one-dimensional mapping axis projected onto a set of defect-free standard features in the high-dimensional space. The Mahalanobis projection distance is converted into a one-dimensional scalar distance along this mapping axis, and the defect labeling result is established by the following formula: ,in, The output defect status is marked as a logical binary variable. A value of 1 indicates the presence of a defect, and a value of -1 indicates the absence of a defect. The calculated Mahalanobis projection distance is a dimensionless one-dimensional scalar value, and its value range is a real number greater than or equal to 0. The preset fixed classification hyperplane projection distance boundary magnitude is a dimensionless judgment threshold, and its value range is a real number greater than 0. Specifically, the Mahalanobis projection distance... The computation essentially involves a multi-dimensional dimensionality reduction mapping in a 24-dimensional semantic feature space, transforming real-time high-dimensional feature vectors into known defect-free standard feature center clusters using spatial distance metrics. During the computation, the system acquires the covariance matrix of the defect-free standard feature center clusters obtained from offline calibration and calculates its inverse matrix. It then performs a subtraction matrix operation between the currently constructed 24-dimensional high-dimensional semantic feature vectors and the coordinates of the geometric mean center to obtain a residual column vector. This residual column vector is then subjected to quadratic matrix multiplication and square root extraction using the inverse matrix, thereby directly mapping the 24-dimensional high-dimensional feature space into a one-dimensional Mahalanobis distance absolute scalar value. Correspondingly, the fixed classification hyperplane in the geometric topological space is represented by a sphere centered at the geometric mean center and with a decision threshold as its boundary. Determining the boundary of a high-dimensional hypersphere with radius, the so-called comparison of the projection distance to the boundary magnitude is equivalent to a one-dimensional algebraic scalar value. With the high-dimensional hyperspherical radius threshold The system directly compares the magnitudes in the distance dimension, and outputs a binary judgment result directly through the one-dimensional hard classification decision of the scalar difference. When the judgment result indicates that there is a defect, the system generates an alarm data control command and sends a pulse signal to the automatic sorting cylinder at the back end of the inspection line to switch the reversing valve. The sorting cylinder controls the corresponding heterogeneous precast concrete component to be pushed away from the transmission track. The operation status of this embodiment shows that, through the weak memory mathematical properties of fractional calculus operators and the spatial adaptive anisotropic diffusion mechanism, the high-frequency base texture noise randomly distributed on the concrete surface and the microcrack edge features with a width of 1 to 2 pixels are effectively decoupled, thereby improving the peeling accuracy of weak contrast micro-edges.

[0033] Example 3: This embodiment aims to quantitatively verify the noise resistance stability and detection accuracy of fractional differential operators and structural tensor decomposition mechanisms in an industrial environment. This experiment constructs a physical simulation testing platform integrating an industrial area array camera, a bar light source, and a data processing terminal. The light source control module projects a light field onto the surface of the precast component at an angle of 35° to 45°. The camera is equipped with a photosensitive chip with a resolution of 2448×2048 pixels and a single pixel physical size of 3.45μm, coupled with a fixed-focus lens with a focal length of 25mm, ensuring that the imaging resolution for surface micro-defects meets industrial detection requirements. The experimental groups are set as follows: the unprocessed original image data of the precast component is used as the control group; images obtained using existing methods combining Gaussian smoothing and Laplacian edge detection are used as the comparison group; and images processed using the present invention's technical solution through fractional diffusion processing and structural tensor reconstruction are used as the present invention's sample group. For micro-crack defects, simulated feature conditions with widths of 0.05mm, 0.10mm, and 0.20mm are set to verify the feature retention capability at different defect scales.

[0034] The experimental process is as follows: The system reads the raw digital image data generated by the camera sensor and actively superimposes Gaussian white noise with a signal-to-noise ratio of 25dB during the signal injection stage to simulate high-frequency electronic interference in industrial environments. The sample group of this invention initiates a spatial adaptive fractional diffusion mechanism based on the Shannon information entropy of the sub-image blocks. Dynamically determine fractional order parameters Within the order range of 0.3 to 0.8, the system calculates the structural similarity index (SSIM) of images. Experiments have shown that when... When the value is 0.5, the image SSIM reaches a peak of 0.94, which is better than the 0.78 obtained by the comparison sample group, and when When the value exceeds this range, image edges become distorted, which confirms the effectiveness of 0.3 to 0.8 as the optimal working window.

[0035] Key experimental data are as follows: When processing micro-cracks with a width of 0.05 mm, the feature vector extracted by the present invention shows that the gradient magnitude of the edge direction is only 8% lower than that of the original noisy image, and the edge sharpness retention rate is higher than that of the comparison sample. The system splices the local binary mode feature components and the gray-level co-occurrence matrix feature components to generate a high-dimensional semantic feature vector containing 24 feature elements. By calculating the Mahalanobis projection distance between this vector and the center cluster of the defect-free standard features, the judgment results show that the average deviation of the projection distance of the defect sample in the experimental group from the center cluster is 18.5 times, while the deviation of the comparison sample under noise interference is only 3.2 times, resulting in an increased false negative rate. The present invention effectively removes random high-frequency substrate texture noise through the weak memory mathematical properties of fractional calculus operators and anisotropic diffusion mechanism, and stably controls the improvement of the signal-to-noise ratio of defect identification between 15 dB and 18 dB.

[0036] Example 4: In this embodiment, within the precast component surface defect identification pipeline, to address non-structural shadow interference caused by uneven lighting in the captured images, the system introduces an edge detection preprocessing mechanism. After the industrial camera acquires the image, the image processing module calculates the image's surface defects. direction and First-order gradient components in the direction and And use the formula to determine the gradient magnitude at the pixel. : ,in, This represents the first-order gradient value in the horizontal direction. The first-order gradient value in the vertical direction. This represents the gradient magnitude.

[0037] The system obtains the gradient magnitude. Then, through adaptive threshold Perform image edge segmentation. The calculation formula is ,in, The average grayscale value of the pixels. The standard deviation of grayscale The adjustment factor is set to 1.5. When the grayscale value of an image pixel is lower than... When this occurs, the system marks it as a suspected defect area, and then calculates the roundness factor of the suspected defect area. ,in, The area of ​​the candidate region. To ensure that the absolute value with pixel-level dimensions converges stably within the range of 0.2 to 0.4 defined by fixed boundaries after being substituted into the formula for the perimeter of the candidate region, the image processing module uses the total number of pixels of the current sub-image block as a factor of the absolute area of ​​the input before executing the formula calculation. With absolute perimeter The algorithm performs dimensionless pre-normalization alignment; specifically, it adjusts the input pixel-level area. Divide by the square of the total number of pixels in the sub-image patch to get the pixel-level perimeter. Dividing by the total pixel span of the sub-image patch eliminates the dimensional surge effect caused by changes in the absolute physical size of the surface defect target, transforming the terms involved in the product operation into dimensionless fractional scalars reflecting relative rates of change. During the final combined calculation, the processing terminal adaptively compresses the product terms using a built-in dynamic gain factor, resulting in a more accurate roundness factor in the final output. It can converge precisely within a specific range of 0.2 to 0.4, and is used to stably characterize the flattened geometric topology of unstructured shadow interference.

[0038] When roundness factor When the ratio of the major axis to the minor axis is greater than 3 within the range of 0.2 to 0.4, the system classifies the area as non-defective shadow interference. For the area identified as interference, the processing module extracts the median gray value of the neighboring pixels and replaces the gray value inside the shadow area with this median value to achieve smoothing of the unstructured shadow. The image matrix after filling is input into the feature extraction module. The system statistically analyzes the skewness and kurtosis of the pixel values ​​in the reconstructed image matrix and maps and compares the obtained feature values ​​with the preset defect criteria. Finally, under the condition of fluctuating ambient light, the accuracy of microcrack feature detection is maintained above 98.5%. This mechanism ensures the stability of pipeline visual inspection by decoupling the unstructured light and shadow fluctuations from the geometric constraints of the structural cracks at the low-level features.

[0039] Example 5: In the deployment phase of the precast component surface defect identification system in this embodiment, to eliminate the influence of different lighting environments and differences in imaging device sensors on the defect judgment threshold, the system executes a sensor response normalization procedure based on an offline calibration benchmark. The system acquires a static image of a standard reference block under a constant optical environment, using the pixel grayscale average of the reference image... This serves as the zero-point reference for system operation, and is based on the pixel grayscale variance of the image. As a statistical benchmark for environmental random noise power.

[0040] During assembly line production, the system performs pixel grayscale histogram equalization on real-time images to obtain the average grayscale value of the current frame. With gray variance Based on the above benchmark parameters, the system calculates the gain adjustment factor. The grayscale value of each pixel in the image matrix After calibration and transformation This enables grayscale alignment of image data under different lighting conditions across operating conditions, when the gain adjustment factor... When the deviation from 1.0 exceeds the preset limit of 0.2, the system triggers the sensor anti-interference self-test program, compares the local contrast index of the real-time image with the corresponding value of the reference image, and removes misjudged data caused by light source failure. In the data preprocessing stage, the terminal processor performs de-identification processing, automatically removing data blocks containing location metadata, timestamps and operator identity information, and retaining only the pure grayscale pixel matrix that represents the surface texture of the component, ensuring that the system's judgment process is based only on geometric edge feature parameters, and ensuring that the production data processing environment meets privacy protection standards.

[0041] Example 6: Before being put into operation on the inspection production line, the surface defect identification system for prefabricated components in this embodiment performs an offline calibration process based on the material texture characteristics of the prefabricated components to achieve dynamic adaptive adjustment of the inspection benchmark. The calibration procedure uses calibration blocks with standard linear grooves of preset widths of 0.05mm, 0.15mm, and 0.30mm as physical references. Under constant industrial environmental conditions with temperature and humidity controlled at 20℃ to 30℃ and 40% to 70%, respectively, the benchmark image is acquired through the camera component, and the grayscale average of the image is calculated. Defined as a zero-point reference, the system measures the geometric width of a 0.15mm standard linear groove within the image pixel space and uses a formula to determine the physical scale coefficient corresponding to a unit pixel. : ,in, This is the physical scale factor. The actual physical width of the standard linear groove. This represents the pixel width occupied by the groove in the image matrix.

[0042] During production line operation, the system monitors the average grayscale value of the acquired images in real time. And calculate the offset of the current operating condition. When the offset When the grayscale level exceeds the preset threshold of 15, the system triggers linear compensation logic to correct the edge detection threshold using a formula. : ,in, This is the current corrected edge detection threshold. The original adaptive threshold is determined based on the preceding processing logic. The grayscale compensation factor, with a value of 0.8, maps the global grayscale offset to the edge segmentation criterion, ensuring the consistency of edge extraction logic under different lighting fluctuation conditions. Specifically, the current edge detection threshold is obtained after dynamic correction using the formula. This will be immediately fed back and directly replace the original adaptive threshold used in Example 4 to delineate suspected defect areas of light and shadow fluctuations. During actual pipeline operation, when a sudden change in ambient lighting causes the global grayscale mean of the current frame image to deviate from the zero-point reference, the system automatically performs algebraic superposition calculations using the formula and outputs the real-time threshold. This new consistent hard-discrimination boundary is transmitted to the front-end edge segmentation module; it is only when the grayscale value of the image pixels acquired in real time on the pipeline is lower than this dynamically updated threshold. Only when the processing terminal marks it as a suspected defect area and activates the subsequent roundness factor verification process will it ensure that the underlying edge coarse segmentation scale of the spatial domain denoising enhancement module has a completely unified physical and digital reference benchmark under global illumination fluctuation conditions. When the processing terminal performs data identification and judgment, it automatically removes image metadata information and performs defect comparison only based on pure geometric edge feature vectors to ensure that no non-technical personal identity data is collected during the business processing process, thus ensuring the compliance of system operation.

Claims

1. A method for detecting surface defects in prefabricated components based on machine vision, characterized in that, Includes the following steps: Step S101: Obtain two-dimensional image data of the surface of the precast concrete component on the quality inspection line; Step S102: Input the two-dimensional image data into the spatial domain denoising and enhancement module, calculate the fractional derivative terms of each pixel using the fractional diffusion operator, and separate the background high-frequency texture components and edge transition components using the structure tensor decomposition matrix. Input the edge transition components into the cross-scale cascaded residual module for multi-scale convolution and reconstruction, and output the reconstructed image data matrix. Step S103: Calculate the local binary pattern histogram component value and the gray-level co-occurrence matrix joint probability component value of the recombined image data matrix. Then, perform multi-dimensional vector horizontal concatenation and splicing on the local binary pattern histogram component value and the gray-level co-occurrence matrix joint probability component value to generate a high-dimensional semantic feature vector containing 24 feature elements. Step S104: Input the high-dimensional semantic feature vector into the Mahalanobis distance classifier, calculate the Mahalanobis projection distance between the high-dimensional semantic feature vector and the known defect-free standard feature center cluster, compare the Mahalanobis projection distance with the projection distance boundary magnitude of the fixed classification hyperplane, and output the surface defect marking result of the precast concrete component based on the comparison result.

2. The method for detecting surface defects of prefabricated components based on machine vision according to claim 1, characterized in that, Step S102 includes the following sub-steps: Step S1021, dividing the two-dimensional image data into multiple non-overlapping local pixel matrix blocks; Step S1022, using a fractional-order diffusion operator to perform spatial domain fractional-order first-order convolution filtering on each local pixel matrix block to obtain the corresponding fractional-order diffusion matrix; Step S1023, using a structural tensor decomposition matrix to perform anisotropic tensor decomposition on each fractional-order diffusion matrix to separate and output the background high-frequency texture component and the edge transition component.

3. The method for detecting surface defects of prefabricated components based on machine vision according to claim 1, characterized in that, In the state of removing surface noise interference by using fractional diffusion operators and structural tensor decomposition matrices, step S102 involves multi-scale convolutional reconstruction of edge transition components through a cross-scale cascaded residual module, which includes: inputting the edge transition components into a multi-layer cascaded residual convolution path, extracting multi-scale dense edge distribution feature values ​​using two feature kernels of different sizes, and adding the multi-scale dense edge distribution feature values ​​to the edge transition components element by element to output the reconstructed image data matrix.

4. The method for detecting surface defects of prefabricated components based on machine vision according to claim 1, characterized in that, Step S103, calculating the local binary pattern histogram component values ​​of the reconstructed image data matrix, includes: taking each pixel in the reconstructed image data matrix as the center pixel, comparing the gray values ​​of the eight neighboring pixels in the neighborhood of the center pixel with the gray value of the center pixel; when the gray value of the neighboring pixel is greater than or equal to the gray value of the center pixel, setting the position code value of the neighboring pixel to the number 1; when the gray value of the neighboring pixel is less than the gray value of the center pixel, setting the position code value of the neighboring pixel to the number 0; arranging and combining the obtained 8-bit binary number clockwise and converting it into a decimal value, which is used as the local binary pattern transform value of the center pixel; statistically analyzing the local binary pattern transform values ​​of all pixels in the reconstructed image data matrix to construct a local binary pattern histogram; and using the segmental statistical frequency of the local binary pattern histogram as the local binary pattern histogram component value.

5. The method for detecting surface defects of prefabricated components based on machine vision according to claim 1, characterized in that, Step S103, which calculates the joint probability component value of the gray-level co-occurrence matrix of the reconstructed image data matrix, includes: statistically analyzing the joint probability distribution values ​​of gray levels between pixel pairs that are spatially separated by 2 pixels and have a horizontal angle of 0° in the reconstructed image data matrix to construct a two-dimensional reference matrix; calculating the energy index value, entropy index value, and contrast index value based on the two-dimensional reference matrix; and concatenating the energy index value, entropy index value, and contrast index value into a multi-dimensional horizontal vector to generate the joint probability component value of the gray-level co-occurrence matrix.

6. The method for detecting surface defects of prefabricated components based on machine vision according to claim 1, characterized in that, The known defect-free standard feature center cluster is obtained as follows: acquire sample image data of known defect-free precast concrete components, input the sample image data of known defect-free precast concrete components into the denoising and enhancement module to output the sample reconstructed image data matrix, extract the corresponding sample local binary mode histogram component values ​​and sample gray-level co-occurrence matrix joint probability component values, splice them to generate multiple sets of sample high-dimensional semantic feature vectors, calculate the geometric mean center of multiple sets of sample high-dimensional semantic feature vectors in the multi-dimensional feature space, and use the geometric mean center as the center coordinate of the known defect-free standard feature center cluster.

7. The method for detecting surface defects of prefabricated components based on machine vision according to claim 1, characterized in that, In step S101, when acquiring two-dimensional image data of the surface of the precast concrete component on the quality inspection line, the two-dimensional image data is captured by a camera assembly and a lighting assembly installed at the inspection station. The axis of the strip light source of the lighting assembly is tilted at an angle of 35° to 45° with the surface of the precast concrete component to be tested, so that the reflected light is projected into the vertical optical axis lens of the camera assembly.

8. The method for detecting surface defects of prefabricated components based on machine vision according to claim 1, characterized in that, After step S104 outputs the surface defect marking results of the precast concrete component, a judgment feedback step is also included: when the surface defect marking results of the precast concrete component indicate the presence of a defect, an alarm data control command is generated and a pulse signal for switching the reversing valve is sent to the automated sorting cylinder at the back end of the inspection line to control the automated sorting cylinder to push the corresponding heterogeneous precast concrete component away from the transmission track.

9. The method for detecting surface defects of prefabricated components based on machine vision according to claim 1, characterized in that, In step S102, the fractional order of the fractional diffusion operator is controlled within the range of 0.3 to 0.

8. The fractional order decreases linearly and monotonically to the lower limit of 0.3 as the local pixel gray-level gradient value of the two-dimensional image data increases, and increases linearly and monotonically to the upper limit of 0.8 as the local pixel gray-level gradient value decreases, thereby dynamically adjusting the integral mask weight of the denoising filter.

Citation Information

Patent Citations

  • Image Denoising Method Based on Fractional Partial Differential Equations

    CN107085840B

  • Fabricated component surface defect multi-task detection method based on depth feature fusion

    CN121725289A

  • A prefabricated part surface defect lightweight detection method and system based on a structure guided network

    CN121746384B