Flexible connection lamination side edge welding seam quality detection method based on image processing
By calculating the structural tensor feature vector and rotational linear structural element of the soft-connected stacked image, the problem of detecting weld defects under complex geometry and lighting conditions was solved, and high-precision weld quality assessment was achieved.
Patent Information
- Application Number
- CN202610062702.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-19
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2046-01-19
AI Technical Summary
Existing technologies face the challenge of accurately detecting subtle defects in complex geometries and under varying lighting conditions when inspecting side welds of flexible connector laminations. In particular, the reliability of detection is low in bending areas, with high false alarm and false negative rates.
The local extension direction is obtained by calculating the structural tensor feature vector of each pixel in the image. Morphological operations are performed by rotating the linear structuring element. The contrast residual value and lateral suppression weight are calculated to generate the trajectory accumulation path. The final defect response value is combined with binarization to determine the weld quality.
It improves adaptive detection in curved areas, reduces uneven lighting and noise interference, improves the extraction accuracy of weak defects, reduces false alarm rate and false negative rate, and provides a reliable basis for quality judgment.
Smart Images

Figure CN121544608A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology. More specifically, this invention relates to a method for inspecting the quality of side welds on flexible connector laminates based on image processing. Background Technology
[0002] Flexible connectors are typically composed of dozens of layers of metal foil stacked together, with their sides fused together using polymer diffusion welding or ultrasonic welding. During production, improper control of welding parameters can lead to interlayer incomplete fusion defects. These defects increase contact resistance, causing overheating and even burnout of the equipment. Therefore, quality inspection of the weld density on the sides of the flexible connector is necessary after industrial production.
[0003] Because flexible laminates possess both highly reflective metallic surfaces and complex curved geometries, general image processing techniques face significant challenges in detecting such defects. Firstly, reliable detection of interlayer incomplete fusion defects is affected by the bending deformation of the laminates. In the curved or tilted regions of flexible laminates, the local lamination extension direction changes continuously with position, and detection algorithms with fixed orientations cannot adapt to this dynamically changing geometric orientation. This geometric mismatch leads to a mismatch between the detection benchmark and the actual defect morphology, reducing detection reliability.
[0004] Furthermore, the unevenness of illumination conditions further exacerbates the detection difficulty. In dark areas, the grayscale difference between the background and the defect is small, and real interlayer unfused defects are easily submerged by the background. In bright areas, strong structural noise may mask weak defect signals. At the same time, surface scratches and real defects often exhibit similar edge features in images, making it difficult for traditional edge detection algorithms to effectively distinguish them, thus increasing the false alarm rate and the false negative rate. Summary of the Invention
[0005] To address the technical problem of accurately detecting subtle defects in flexible connector laminations under complex geometric shapes and varying lighting conditions, this invention provides an image processing-based method for inspecting the quality of side weld seams in flexible connector laminations. The method includes: acquiring an image of the side of the flexible connector lamination; taking any pixel in the image as the target pixel; decomposing the structure tensor matrix of the target pixel; obtaining the extension direction based on the eigenvector corresponding to the smallest eigenvalue obtained from the decomposition; pre-setting a linear structuring element; performing morphological operations on the linear structuring element after rotating the target pixel according to the extension direction to obtain the fitted background value at the target pixel; calculating the contrast residual value of the target pixel based on the grayscale value of the target pixel and the fitted background value; and determining the quality of the weld seam on the side of the flexible connector lamination based on the extension direction. The lateral suppression weight of the target pixel is calculated by searching the background reference point of the target pixel in the vertical direction. The background reference point is the pixel with the largest gray value in the clockwise and counterclockwise vertical directions within the preset maximum search radius. The length of the trajectory accumulation path is determined based on the contrast residual value of the target pixel. The trajectory accumulation path is generated along the extension direction with the target pixel as the center and the length of the accumulation path. The final defect response value of the target pixel is obtained according to the contrast residual value and lateral suppression weight of the pixels on the trajectory accumulation path. The final defect response values of all pixels are combined into a final defect response map and binarized. The quality of the side weld of the soft connection lamination is determined according to the area of the connected region after binarization.
[0006] This invention obtains the local extension direction of pixels by calculating the feature vector of the structure tensor, making the feature extraction process conform to the actual texture direction and improving the orientation mismatch phenomenon. By rotating the linear structuring element based on the extension direction to obtain the fitted background and calculating the contrast residual value including the normalization factor, the interference of uneven lighting and metal reflection on grayscale features is reduced, and the detection benchmark of bright and dark areas is unified. By analyzing the grayscale distribution characteristics in the vertical direction of the extension direction, the lateral suppression weight is calculated using the background benchmark point, which distinguishes defects with peak-shaped features from processing scratches with step-shaped features and suppresses false alarms caused by false edges. On this basis, by generating a trajectory accumulation path along the extension direction and dynamically adjusting the path length and calculating the final defect response value according to the contrast residual, the connectivity of weak discontinuous signals is enhanced, and small gaps interfered with by noise can be identified. This invention can perform adaptive detection of defects in curved areas, improving the extraction effect of weak signals under complex structures and variable lighting.
[0007] Preferably, the step of decomposing the structural tensor matrix of the target pixel and obtaining the extension direction based on the eigenvector corresponding to the smallest eigenvalue obtained by decomposition includes: decomposing the structural tensor matrix of the target pixel using a second-order matrix eigenvalue decomposition method to obtain eigenvalues and their corresponding eigenvectors, and obtaining the extension direction of the target pixel based on the eigenvector corresponding to the smallest eigenvalue of the target pixel.
[0008] Preferably, the contrast residual value satisfies the expression: In the formula, The contrast residual value of the target pixel. The original image grayscale value of the target pixel. The fitted background value for the target pixel. To prevent constants with a denominator of zero.
[0009] This invention normalizes the difference between the grayscale value of the original image and the fitted background value. In areas where the fitted background value is small, it enhances the response of the contrast residual value to weak grayscale differences and improves the false alarm phenomenon. In areas where the fitted background value is large, it suppresses the numerical fluctuation caused by the high grayscale background and reduces the risk of false alarms.
[0010] Preferably, the lateral suppression weights satisfy the expression: In the formula, The lateral suppression weights for the target pixel. The contrast residual value of the target pixel. This represents the contrast residual value of the background reference point in the clockwise vertical direction along the extension direction of the target pixel. This represents the contrast residual value of the background reference point in the counterclockwise vertical direction along the extension direction of the target pixel. is the standard deviation of the Gaussian function.
[0011] This invention utilizes the characteristic that interlayer non-fusion defects exhibit high contrast residual values in the middle pixels and low contrast residual values on both sides in their lateral distribution, which differs from the characteristic that non-defect edges exhibit high contrast residual values on one side and low contrast residual values on the other side, to construct a lateral suppression weight. In the subsequent defect enhancement stage, this lateral suppression weight can effectively suppress false defect signals caused by normal edges of the copper foil, thereby improving the purity of the detection.
[0012] Preferably, the length of the trajectory accumulation path satisfies the expression: In the formula, The path length is accumulated by adding the path length to the trajectory of the target pixel. Based on the fundamental length constant, This is the gain length factor. The contrast residual value of the target pixel. The Sigmoid function maps the input to the interval between 0 and 1. This is a rounding function.
[0013] Preferably, the preset linear structural element, which performs morphological operations on the linear structural element after rotating the target pixel along the extension direction to obtain the fitted background value at the target pixel, includes: defining a rectangular linear structural element with an aspect ratio of 2:1 centered on the target pixel, defining the long side of the linear structural element as the major axis, rotating its major axis to be perpendicular to the extension direction, and using the rotated linear structural element to perform morphological closing operations on the original image to obtain the fitted background value at the target pixel.
[0014] This invention dynamically adjusts the orientation of linear structural elements based on the local stacking extension direction of each pixel. This method ensures that morphological operations are always performed perpendicular to interlayer unfusion defects, effectively extracting defect features while suppressing surface scratch interference regardless of how the stack is bent or deformed.
[0015] Preferably, the final defect response value satisfies the expression: In the formula, This represents the final defect response value of the target pixel. Here, k represents the contrast residual value of the target pixel, and k is the index of the trajectory accumulation path length. Add the path length to the trajectory of the target pixel. This is the contrast residual value at the k-th pixel along the trajectory accumulation path. The lateral suppression weight at the k-th pixel on the path is accumulated for the trajectory.
[0016] Preferably, the method for obtaining the background reference point includes: starting from the target pixel, traversing pixel by pixel in both the clockwise vertical direction and the counterclockwise vertical direction of the extension direction, and within the maximum search radius, selecting the pixel with the largest gray value in the clockwise vertical direction of the extension direction as the background reference point in the clockwise vertical direction of the extension direction, and selecting the pixel with the largest gray value in the counterclockwise vertical direction of the extension direction as the background reference point in the counterclockwise vertical direction of the extension direction.
[0017] Preferably, the step of combining the final defect response values of all pixels into a final defect response map and performing binarization processing includes: traversing the final defect response values of all pixels to obtain a final defect response map, and performing binarization processing on the final defect response map using the Otsu algorithm to obtain a binary image.
[0018] Preferably, generating a trajectory accumulation path along the extension direction with the length of the accumulation path includes: performing bidirectional iterative extension along the extension direction of the target pixel and the opposite direction of the extension direction with a unit pixel step; during the extension process, for each extension step, the next extension position is calculated along the extension direction of the currently reached pixel position, and the non-integer coordinates of the position are rounded and adjusted to the nearest integer coordinates until the trajectory accumulation path length is reached, thereby generating a trajectory accumulation path.
[0019] This invention solves the problem of missed detection and broken detection in curved areas by constructing a trajectory accumulation path and locking the trajectory accumulation path on the curved trajectory of the stacked structure features. It ensures that even weak defect signals can be completely collected in the curved or tilted areas of soft connection stacks.
[0020] The beneficial effects of this invention are as follows: This invention obtains the local extension direction of pixels by calculating the structural tensor feature values and feature vectors of pixels in a soft-connected stacked image, overcoming the defect signal weakening in curved areas due to orientation mismatch in traditional image processing; it obtains a fitted background value by rotating the linear structuring element according to the extension direction and calculates the contrast residual value considering local background brightness, thus suppressing uneven illumination and background noise and providing a data foundation for defect feature evaluation; by analyzing the gray-level change characteristics of pixels in the vertical direction of the extension direction, it constructs a lateral suppression weight based on the difference of background reference points, which can… The method identifies interlayer non-fusion defects with a distribution characteristic of high center and low sides, thereby suppressing pseudo-edge interference such as machining scratches while preserving the real defect signal. Furthermore, by constructing a trajectory accumulation path along the extension direction, the path length is dynamically adjusted using the Sigmoid function and contrast residual value, and the final defect response value is calculated by combining lateral suppression weights. This allows discontinuous weak defect signals to be connected and enhanced along the actual texture direction, avoiding missed detection. By performing connected region area statistics on the final defect response map, a criterion for judging the quality of soft-connected stacks is provided, improving the detection accuracy of soft-connected stacks. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating an image processing-based method for inspecting the quality of side welds in a flexible connector laminate according to the present invention. Figure 2 This is a schematic diagram illustrating the rotational state of a linear structural element; Figure 3 This is a grayscale image schematically illustrating the soft connection stack; Figure 4 This is a schematic diagram showing the binary image of the defect area of the soft connection lamination. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0024] This invention discloses a method for inspecting the quality of side welds on flexible connector laminates based on image processing, referring to... Figure 1 This includes steps S1 to S5: S1. Acquire images of the soft connection stack and calculate the extension direction of each pixel in the image.
[0025] It should be noted that the surface layer structure features in curved or inclined regions of soft-connected stacks change continuously with spatial position. Fixed-direction operators cannot adapt to this continuously changing structural orientation, leading to a geometric mismatch between the operator direction and the actual texture direction. This geometric mismatch further weakens weak defect signals in curved regions and between layers where fusion is lacking, causing defects to often be segmented into discontinuous fragments and unable to be fully identified, thus increasing the false negative rate. To enable subsequent processing to proceed along the actual texture direction of the stack, this invention calculates the local extension direction of each pixel in the image, providing a precise directional reference for subsequent feature extraction.
[0026] Specifically, images of the soft-connection stack side are acquired using an industrial camera and then converted to grayscale to obtain the original image. Taking any pixel in the original image as the target pixel, the Sobel operator is used to calculate the gradient components of the target pixel in the horizontal and vertical directions. The structure tensor matrix of the target pixel is constructed using these gradient components. The structure tensor matrix of the target pixel is then decomposed using a second-order matrix eigenvalue decomposition method to obtain eigenvalues and their corresponding eigenvectors. The extension direction of the target pixel is obtained based on the eigenvector corresponding to the smallest eigenvalue of the target pixel.
[0027] It should be added that the minimum eigenvalue of the structure tensor corresponds to the direction in which the grayscale change is the most gradual. In soft-connected stacks, the extension direction of the stacked structure is precisely the direction in which the grayscale change is the most gradual. Therefore, the direction corresponding to the minimum eigenvalue of the structure tensor is the extension direction of the stacked structure.
[0028] S2. Construct adaptively rotating linear structural elements based on the extension direction and calculate the contrast residual value of the pixel.
[0029] It should be noted that the metallic reflection from the sides of the flexible connector stack will produce uneven illumination distribution during imaging. This uneven illumination makes the grayscale features of defects no longer globally comparable. Specifically, in dark areas, real interlayer unfused defects are submerged by the background due to their small grayscale difference, leading to missed detection; while in bright areas, normal stacked structure features, due to strong reflection, have grayscale fluctuations that even exceed those of defects in dark areas, making them easily misjudged as defects. To construct a seamless background benchmark that can offset illumination changes and eliminate scratch interference, this invention performs morphological processing on the image by rotating its linear structural element according to the local extension direction of each pixel, and measures defect features by relative grayscale difference.
[0030] Specifically, a linear structuring element (LSI) is defined centered on the target pixel. The width of the LSI is set to W pixels, and its length is twice the width in pixels. The longer side of the LSI is defined as the major axis. Initially, the LSI of the target pixel is a rectangle with its major axis horizontal. The LSI of the target pixel is rotated along its major axis so that the major axis is perpendicular to the extension direction of the target pixel. Morphological closing operations are performed on the target pixel position in the original image using the rotated LSI to obtain the fitted background value. The fitted background values of all pixels in the original image are iterated through to obtain the fitted background image. The contrast residual value of the target pixel is calculated based on its grayscale value and the fitted background value. In this embodiment, The width of a linear structuring element is used to define its width, and is usually an odd number to ensure symmetry. An empirical range of values is... Pixels. In this embodiment, the parameter Set to 5. In other embodiments, the implementer can adjust the preset value according to the actual resolution. For example, when the resolution of the imaging system is high, causing the pixel width of the target texture in the image to increase, this parameter should be increased accordingly to ensure that the scale of the structuring element matches the actual physical texture.
[0031] Specifically, the contrast residual values satisfy the following relationship: ; In the formula, The contrast residual value of the target pixel. The original image grayscale value of the target pixel. The fitted background value for the target pixel. To prevent constants with a denominator of zero, in this embodiment, for The implementers can adjust the resolution according to the actual resolution. value.
[0032] in, This represents the absolute grayscale difference between the target pixel and the surrounding background. The larger the value, the more significant the difference between the target pixel and its surrounding background; This represents the brightness level of the local background and is used to normalize grayscale differences.
[0033] The larger the value, the greater the difference between the grayscale of the target pixel and the background, considering the local background brightness. This indicates that the consistency between the target pixel and the surrounding background is lower, and the target pixel is more likely to be an interlayer unfused defect area. The smaller the value, the smaller the difference between the grayscale of the target pixel and the background, indicating that the target pixel is more consistent with the surrounding background and is more likely to be located in a flat background area.
[0034] For example, Figure 2 This diagram illustrates the rotation state of a linear structuring element. The curved curve represents the local extension direction of the soft-connector stack in the curved region. The solid dots on the curve represent target pixels, and the rectangle centered on the target pixel represents the linear structuring element. During processing, the linear structuring element adjusts its angle according to the extension direction at the target pixel, rotating its major axis to be perpendicular to that extension direction. This allows the morphological closing operation to act along the cross-sectional direction of the stacked structure, suppressing bending deformation interference while improving the reliability of extracting the fitted background value at the target pixel and mitigating detection bias that may be caused by geometric mismatch in fixed-direction operators.
[0035] S3. Calculate the lateral suppression weight based on the lateral distribution characteristics of pixels in the vertical direction of the extension direction.
[0036] It should be noted that the surface of soft-connected laminates often contains processing scratches and interlayer fusion defects. In the original image, both appear as edge features with grayscale variations. Conventional edge detection algorithms struggle to distinguish between bright scratches and dark defects, leading to a high false alarm rate. Interlayer fusion defects exhibit a peak-like distribution in the lateral direction, with high contrast residual values in the middle pixels and low contrast residual values on the sides, while non-defect edges typically show a step-like change only on one side. This invention utilizes this difference in distribution characteristics to distinguish between true defects and false edges through lateral suppression.
[0037] Specifically, the maximum search radius is set to K. Starting from the target pixel, the algorithm traverses pixel by pixel in both the clockwise and counterclockwise vertical directions of the extension direction. Within the maximum search radius, the pixel with the largest grayscale value in the clockwise vertical direction of the extension direction is selected as the background reference point in that direction, and the pixel with the largest grayscale value in the counterclockwise vertical direction of the extension direction is selected as the background reference point in the counterclockwise vertical direction. The contrast residual values of the two background reference points are obtained. Lateral suppression weights are calculated based on the difference between the contrast residual values of the target pixel and these two background reference points.
[0038] In this embodiment, the preset parameters Used to define the spatial range for finding background reference points during lateral suppression; the empirical range is: Pixels. In this embodiment, the parameter Set to 5 pixels. In other embodiments, the implementer can adjust the preset value according to the expected physical width of the actual defect to be detected. For example, when it is necessary to detect interlayer non-fusion defects with a large width, this parameter should be increased accordingly to ensure that the true background reference point can be found across the defect area, and to avoid detection failure due to insufficient search distance.
[0039] It should be noted that the surface of the flexible connector stack is a high-gloss metal, while the defects are dark-colored gaps. Therefore, the maximum grayscale value on the search path corresponds to the actual metal background. Selecting this maximum value as the background reference point allows us to cross the dark defect area and lock onto the normal metal surface for comparison.
[0040] Specifically, the lateral inhibition weights satisfy the following relationship: ; In the formula, The lateral suppression weights for the target pixel. The contrast residual value of the target pixel. The contrast residual value of the background reference point in the clockwise vertical direction of the target pixel's extension direction. The contrast residual value of the background reference point in the counterclockwise vertical direction of the target pixel's extension direction. This represents the standard deviation of the Gaussian function. In this embodiment, the preset parameters... The sensitivity of the lateral suppression weight to the difference in contrast residuals is adjusted, and the empirical range is as follows: In this embodiment, the parameters Set to 0.5. In other embodiments, the implementer can adjust the preset value according to the signal-to-noise ratio level of the imaging environment. For example, when there are many false alarms caused by metallic reflections in the acquired image, this parameter should be increased accordingly to raise the suppression threshold for non-defect signals, thereby improving the purity of the detection results.
[0041] in, This represents the degree of difference in residual intensity between the target pixel and the background reference points on both sides. The larger the value, the more significant the intensity difference between the current target pixel and the background reference points on both sides, and the more likely it is to exhibit a distribution characteristic of high values in the middle and low values on both sides. The closer the value is to 1, the more the target pixel has the peak characteristics of interlayer unfusion defects, and the target pixel signal should be preserved. The smaller the value, the closer the current target pixel is to the background reference point on one or both sides, and the more likely it is to exhibit a step edge or flat feature. The closer the value is to 0, the more likely the target pixel is to belong to a normal interlayer edge or a flat background area, without defective features, and the target pixel signal should be suppressed.
[0042] S4. Generate a trajectory accumulation path based on the extension direction and calculate the final defect response value.
[0043] It should be noted that interlayer non-fusion defects are gaps sandwiched between the layers of the laminate, and their orientation changes with the bending shape of the flexible connector laminate. A fixed-direction detection window cannot adapt to the changing orientation of the laminate, resulting in poor defect detection in the bending area. Furthermore, weak defect signals are often interrupted, making it difficult to form a complete and continuous identification result. To accurately detect defects in the bending area, this invention requires the detection direction to follow the actual orientation of the laminate in real time, connecting discontinuous weak defect signals into a complete line, and filtering out interference from non-defect structures during signal collection.
[0044] Specifically, the trajectory accumulation path length is determined based on the contrast residual value of the target pixel; taking the target pixel as the center, it is extended bidirectionally in steps of one pixel along its extension direction and the opposite direction; during the extension process, at each extension step, the next extension position is calculated along the extension direction of the currently reached pixel position, and the non-integer coordinates of that position are rounded and adjusted to the nearest integer coordinates, until the trajectory accumulation path length is reached, thus generating a trajectory accumulation path.
[0045] Specifically, the cumulative path length of the trajectory satisfies the following relationship: ; In the formula, The path length is accumulated by adding the path length to the trajectory of the target pixel. Based on the fundamental length constant, This is the gain length factor. The contrast residual value of the target pixel. The Sigmoid function maps the input to the interval between 0 and 1. This is a rounding function.
[0046] In this embodiment, the preset parameters Set to 3. In other embodiments, the implementer can adjust the preset value according to the actual length distribution characteristics of the defect to be detected. For example, when the physical size of the defects to be captured is generally long, this parameter should be increased accordingly to match the scale characteristics of the defects, thereby ensuring effective coverage or extraction of long defect targets.
[0047] In this embodiment, the preset parameters The value is set to 6. In other embodiments, the implementer may adjust the preset value according to the aspect ratio or morphological extension characteristics of the actual defect. For example, when screening for defects with significant elongated features, this parameter should be increased accordingly to improve the ability to suppress short noise or non-striped interference, thereby enhancing the targeting of the detection.
[0048] in, The larger the value, the higher the probability that there is a real interlayer fusion defect at that pixel, and the higher the signal confidence. The larger the value, the longer the trajectory accumulation path is used to capture and connect potential breakpoints distributed along the defect direction, ensuring that weak but continuous defect signals can be completely extracted. The smaller the value, the higher the probability that the target pixel is background noise or a non-defect feature. The smaller the value, the shorter the trajectory accumulation path is, thus avoiding the inclusion of irrelevant background information in the calculation and preventing noise accumulation and false detections.
[0049] Furthermore, the final defect response value satisfies the expression: ; In the formula, This represents the final defect response value of the target pixel. Here, k represents the contrast residual value of the target pixel, and k is the index of the trajectory accumulation path length. Add the path length to the trajectory of the target pixel. This is the contrast residual value at the k-th pixel along the trajectory accumulation path. The lateral suppression weight at the k-th pixel on the path is accumulated for the trajectory.
[0050] in, It represents the cumulative intensity of the effective defect signal along the path of extension. The larger the value, the more likely the target pixel still has a continuous and significantly different signal after being filtered by lateral suppression weights along the trajectory accumulation path. In other words, the higher the probability that the target pixel belongs to an interlayer non-fusion defect, the higher the final defect response value. The larger the value, the more effective the cascading enhancement of weak discontinuous defects; The smaller the value, the weaker the defect signal at the target pixel along the trajectory accumulation path, and the greater the probability that the target pixel is isolated noise or a non-defect edge. The final defect response value... The smaller the value, the better it suppresses background noise and interference from non-defect edges.
[0051] S5. Based on the final defect response map, calculate the area of the defect region to determine the quality of the soft connection stack.
[0052] It should be noted that flexible connector stacks often have bent or tilted areas, and direct dimensional measurements are easily affected by shape variations. To obtain a reliable basis for judging the quality of flexible connector stacks, this invention assesses the severity of defects by statistically analyzing the overall area of the defective region. This indicator can more accurately reflect the scale of defects on the flexible connector stack and provide a robust quality judgment standard.
[0053] Specifically, the final defect response value of all pixels is traversed to obtain the final defect response map. The final defect response map is then binarized using the Otsu algorithm to obtain a binary image. Connectivity analysis is performed on the binary image, and the total number of pixels within all connected components is counted to obtain the total area A. If the total area A is greater than a preset area threshold A1, the soft connection stack is deemed unqualified; otherwise, the soft connection stack is deemed qualified. In this embodiment, A1 is set to 100. In other embodiments, implementers can adjust the preset A1 according to industry standards. For example, when industry standards change the accuracy or range requirements of relevant technical indicators, this value should be adjusted accordingly to ensure consistency with the standard specifications.
[0054] For example, Figure 3 This is a grayscale image of a soft-connected stack. Figure 4 A binary image of defects in soft-connected laminates, from Figure 4 As can be seen, the bright connected regions represent the interlayer lack of fusion defects in the weld seam on the side of the flexible connector, and their pixel coordinates have a spatial mapping relationship with the physical defect location in the original image. The dark regions represent the background of the normal stacked structure and non-defect interference features that were effectively suppressed after thresholding. Binarization segmentation achieves the separation of the defect target from the background interference, transforming the weak and blurry gray-level differences in the original image into definite geometric regions, thus providing data support for subsequent quality judgment based on connected region area statistics.
Claims
1. An image processing-based soft connection lamination side seam weld quality detection method, characterized by, The method comprises the following steps: Collecting a soft connection lamination side edge image, taking any pixel point in the image as a target pixel point, decomposing the structure tensor matrix of the target pixel point, and obtaining the extension direction according to the eigenvector corresponding to the minimum eigenvalue obtained by decomposition; A preset linear structure element is used to perform morphological operation on the linear structure element rotated in the extension direction of the target pixel point to obtain a fitting background value at the target pixel point, and the contrast residual value of the target pixel point is calculated according to the gray value and the fitting background value of the target pixel point; A background reference point of the target pixel point is searched in the vertical direction of the extension direction to calculate the lateral inhibition weight of the target pixel point; The background reference point is the pixel point with the maximum gray value in the clockwise and counterclockwise vertical directions of the extension direction within a preset maximum search radius; the length of the trajectory accumulation path is determined based on the contrast residual value of the target pixel point; the trajectory accumulation path is generated along the extension direction with the length of the accumulation path and taking the target pixel point as the center; and the final defect response value of the target pixel point is obtained according to the contrast residual value and the lateral inhibition weight of the pixel points on the trajectory accumulation path. The final defect response values of all pixel points are combined into a final defect response map and subjected to binarization processing, and the quality of the soft connection lamination side edge weld is determined according to the area of the connected domain after binarization.
2. The method for detecting the quality of the soft connection lamination side weld according to claim 1, characterized in that, The method for decomposing the structure tensor matrix of the target pixel point and obtaining the extension direction according to the eigenvector corresponding to the minimum eigenvalue obtained by decomposition comprises the following steps: the structure tensor matrix of the target pixel point is decomposed by using a second-order matrix eigenvalue decomposition method to obtain eigenvalues and eigenvectors corresponding to the eigenvalues, and the extension direction of the target pixel point is obtained according to the eigenvector corresponding to the minimum eigenvalue of the target pixel point.
3. The method for detecting the quality of the side weld of the soft connection sheet metal based on image processing according to claim 1, characterized in that, The contrast residual value satisfies the expression: ; In the formula, is the contrast residual value of the target pixel point, is the original image gray value of the target pixel point, is the fitting background value of the target pixel point, is a constant to prevent the denominator from being zero.
4. The method for detecting the quality of the side seam weld of the soft connection lamination based on image processing according to claim 1, characterized in that, The lateral inhibition weight satisfies the expression: ; In the formula, is a lateral inhibition weight of the target pixel point, is a contrast residual value of the target pixel point, is a contrast residual value of a background reference point in a clockwise vertical direction of the target pixel point along the extension direction, is a contrast residual value of a background reference point in an anticlockwise vertical direction of the target pixel point along the extension direction, is a standard deviation of a Gaussian function.
5. The method for detecting the quality of the side seam weld of the soft connection lamination based on image processing according to claim 1, characterized in that, The length of the trajectory accumulation path satisfies the expression: ; wherein, is a length of a path of a trajectory of a target pixel point, is a base length constant, is a gain length coefficient, is a contrast residual value of a target pixel point, is a Sigmoid function that maps an input to the interval 0 to 1, is a rounding function.
6. The method for detecting the quality of the side seam weld of the soft connection lamination based on image processing according to claim 1, characterized in that, The method for performing morphological operation on the linear structure element rotated in the extension direction of the target pixel point to obtain the fitting background value at the target pixel point comprises the following steps: a rectangular linear structure element with an aspect ratio of 2:1 is defined with the target pixel point as the center, the long side of the linear structure element is defined as the major axis, the major axis is rotated to be perpendicular to the extension direction, and morphological closing operation is performed on the original image by using the rotated linear structure element to obtain the fitting background value at the target pixel point.
7. The method for detecting the quality of the side seam weld of the soft connection lamination based on image processing according to claim 1, characterized in that, The final defect response value satisfies the expression: ; In the formula, is the final defect response value of the target pixel point, is the contrast residual value of the target pixel point, and k is an index of the track accumulation path length, is the track accumulation path length of the target pixel point, is the contrast residual value at the kth pixel point on the track accumulation path, is the lateral inhibition weight at the kth pixel point on the track accumulation path.
8. The method for detecting the quality of the side seam weld of the soft connection lamination based on image processing according to claim 1, characterized in that, The method for obtaining the background reference point comprises the following steps: starting from the target pixel point, the clockwise vertical direction of the extension direction and the counterclockwise vertical direction of the extension direction are traversed pixel by pixel, and within the maximum search radius, the pixel point with the maximum gray value in the clockwise vertical direction of the extension direction is selected as the background reference point in the clockwise vertical direction of the extension direction, and the pixel point with the maximum gray value in the counterclockwise vertical direction of the extension direction is selected as the background reference point in the counterclockwise vertical direction of the extension direction.
9. The method for detecting the quality of the side seam weld of the soft connection lamination based on image processing according to claim 1, characterized in that, The method for combining the final defect response values of all pixel points into a final defect response map and performing binarization processing comprises the following steps: the final defect response values of all pixel points are traversed to obtain a final defect response map, and the final defect response map is subjected to binarization processing by using the Otsu algorithm to obtain a binary image.
10. The method for detecting the quality of the side seam weld of the soft connection lamination based on image processing according to claim 1, characterized in that, The method for generating a trajectory accumulation path along an extension direction with an accumulation path length comprises: iteratively extending in a unit pixel step along the extension direction and the opposite direction of the extension direction of a target pixel point; during the extending, each time the extending is performed by one step, the extending position of the next step is calculated along the extension direction of the current reached pixel position, and the non-integer coordinates of the position are rounded to the nearest integer coordinates until the trajectory accumulation path length is reached, thereby generating a trajectory accumulation path.
Citation Information
Patent Citations
Power transformer silicon steel sheet quality detection method and system based on image processing
CN114937035A
Oil and gas engineering supporting facility intelligent detection method based on machine vision
CN120833329A
Automatic welding defect detection method for automobile parts
CN121147201A
Titanium frame container welding seam quality detection method and system
CN121353279A
Reconstructing document from series of document images
US20190065880A1