Welding quality visual inspection method

通过计算灰度差异、梯度均匀性和光照扩散因子,结合权重系数,优化焊接图像的光照影响程度,解决了现有技术在特殊光照条件下效果不佳的问题,实现了更准确的焊接质量检测 .

CN119444664AActive Publication Date: 2025-02-14HUANGGANG NORMAL UNIV +1

Patent Information

Application Number
CN202411335249.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-02-14
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

The existing visual inspection methods for welding quality are poorly effective under special lighting conditions and require a large number of parameter adjustments to adapt to different welding scenarios.

Method used

By calculating the grayscale difference, gradient uniformity and light diffusion factor in the pixel domain block, combined with the weight coefficient, the degree of illumination influence of the welding image is optimized, and the gamma value is adjusted and an optimized welding grayscale image is generated.

Benefits of technology

It improves the accuracy of welding quality inspection, can more accurately adapt to different lighting conditions and welding scenarios, and reduces false inspection and missed inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444664A_ABST
    Figure CN119444664A_ABST
Patent Text Reader

Abstract

The invention discloses a welding quality visual detection method, and relates to the technical field of weld defect detection, and the method comprises the steps: obtaining a pixel neighborhood block corresponding to each pixel point in a to-be-detected welding gray image, and obtaining the illumination influence degree in each pixel neighborhood block according to the gray feature and gradient feature of each pixel point in each pixel neighborhood block; according to the position distribution characteristics between the edge end points of the adjacent edges in the welding gray level image to be detected, the same kind of edges are judged; obtaining a gamma value adjustment coefficient of a pixel point at the central position in each pixel neighborhood block by obtaining the confidence coefficient that each similar edge is the inner edge of the welding seam and the defect degree of each similar edge; the gamma value of each pixel point is adjusted, the gray level output value of each pixel point in each pixel neighborhood block is obtained, and an optimized welding gray level image is obtained; performing quality detection on the to-be-optimized welding grayscale image; the accuracy of welding quality detection can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of weld defect detection, and in particular to a welding quality visual detection method. Background Art

[0002] With the continuous advancement of industrial automation technology, more and more production lines are beginning to adopt automated welding equipment. The equipment needs to have efficient and accurate welding quality detection methods to ensure that the welding quality meets product standards and customer needs. In the automated welding process, the stability of welding quality directly affects the overall quality and production efficiency of the product. Therefore, it is necessary to develop a visual inspection method that can monitor and evaluate welding quality in real time. Machine vision technology is a technology that uses computers to simulate human visual functions to collect, process and analyze images. It captures images through high-resolution cameras or sensors and uses image processing algorithms to extract useful information. In the field of welding quality inspection, machine vision technology can capture subtle changes in the welding process, such as the shape, size, position of welds, and welding defects, providing data support for the evaluation of welding quality.

[0003] The existing invention patent CN117689662B provides a method and system for visual inspection of the welding quality of a heat exchanger tube head. The invention obtains the degree of illumination influence in each pixel neighborhood block according to the grayscale characteristics and gradient characteristics of each pixel point in each pixel neighborhood block; determines the same type of edges according to the position distribution characteristics between the edge endpoints of adjacent edges in the grayscale image of the weld to be tested; obtains the gamma value adjustment coefficient of the pixel point at the center position in each pixel neighborhood block by obtaining the confidence that each similar edge is an edge in the weld and the defect degree of each similar edge; then adjusts the gamma value of each pixel point to obtain the grayscale output value of each pixel point in each pixel neighborhood block, and obtains an optimized welding grayscale image; quality inspection of the heat exchanger tube head welding can improve the accuracy of welding quality inspection, but there are still the following problems: 1. The calculation of the degree of illumination influence is mainly based on grayscale value and gradient characteristics, and does not fully consider complex factors such as light source type and illumination direction, which may lead to poor results under certain special lighting conditions; 2. For different types of welds and welding conditions, the current method may require a lot of parameter adjustment and optimization to adapt to different application scenarios. Summary of the invention

[0004] The embodiments of the present application provide a method for visual inspection of welding quality, thereby solving the problem in the prior art that the calculation of the degree of illumination influence is mainly based on grayscale value and gradient characteristics, and does not fully consider complex factors such as light source type and illumination direction, which may lead to poor results under certain special lighting conditions, thereby improving the accuracy of welding quality inspection.

[0005] The present application provides a method for visually inspecting welding quality, comprising:

[0006] S1: Obtain a welding image of the object to be tested, and grayscale the image to obtain a grayscale image of the welding object to be tested;

[0007] The welding area of ​​the object to be tested is set to be a metal material with high reflectivity, and a point light source is set above the object to be tested, which is illuminated obliquely from the upper left corner of the object to be tested. A camera is used to collect the welding image of the object to be tested, and the collected welding image is gray-scaled to obtain a gray-scale image of the welding to be tested;

[0008] S2: Obtain the pixel neighborhood block corresponding to each pixel point in the grayscale image of the welding to be tested, and obtain the degree of illumination influence in each pixel neighborhood block according to the grayscale feature and gradient feature of each pixel point in each pixel neighborhood block;

[0009] Affected by the illumination, the illumination-affected area in the image has a diffusion characteristic, that is, the closer the pixel is to the center of the area, the smaller the pixel grayscale difference is, and the grayscale value of the area affected by the illumination is larger;

[0010] In one embodiment of the present invention, a method for obtaining the degree of illumination influence includes:

[0011] S101: Calculate the degree of change difference of the gray value in the pixel area block, recorded as gray difference, and the calculation formula is:

[0012]

[0013] Among them, G1 represents the grayscale difference, σ1 represents the standard deviation of the grayscale value in the pixel domain block, and G max Indicates the maximum grayscale value in the pixel area block, G min Indicates the minimum gray value within the pixel area block;

[0014] S102: Evaluate the uniformity of the gradient direction within the pixel neighborhood block, denoted as gradient uniformity, and the calculation formula is:

[0015]

[0016] Among them, G2 represents the gradient uniformity, σ2 represents the standard deviation of the gradient direction within the pixel domain block;

[0017] S103: The attenuation effect of light diffusion from the center to the surroundings is simulated by a Gaussian function, which is recorded as the light diffusion factor. The calculation formula is:

[0018]

[0019] Where G3 represents the light diffusion factor, d represents the distance from the center of the light source, and σ3 represents the standard deviation of the Gaussian function;

[0020] S104: By combining the grayscale difference, gradient uniformity and light diffusion factor and assigning different weight coefficients, the degree of light influence is obtained. The calculation formula is:

[0021] G = α × G1 + β × G2 × G3;

[0022] G represents the degree of illumination influence, α and β weight coefficients, G1 represents grayscale difference, G2 represents gradient uniformity, and G3 represents illumination diffusion factor;

[0023] It should be noted that the Sobel operator is used to calculate the image gradient direction, and the specific Sobel operator and standard deviation calculation method are calculation means well known to those skilled in the art;

[0024] S3: Obtain the edge endpoint of each edge in the grayscale image of the weld to be tested, and determine the same type of edges according to the position distribution characteristics between the edge endpoints of adjacent edges;

[0025] The center point of each similar edge is obtained, and the confidence that each similar edge is the inner edge of the weld is obtained according to the relative distance between each edge pixel point and the center point on each similar edge and the circular fitting degree of the corresponding similar edge;

[0026] According to the confidence of each edge of the same type and the local edge pixel density on the corresponding edge of the same type, the defect degree of each edge of the same type is obtained;

[0027] S4: obtaining a gamma value adjustment coefficient of a pixel point at a center position of each pixel neighborhood block according to the degree of illumination influence in each pixel neighborhood block and the degree of defect of the corresponding edge of the same type;

[0028] The preset gamma value of each pixel is adjusted according to the gamma value adjustment coefficient to obtain an optimized gamma value of each pixel in each pixel neighborhood block;

[0029] Obtaining a grayscale output value of each pixel point in each pixel neighborhood block according to the optimized gamma value of each pixel point in each pixel neighborhood block and the grayscale value of the corresponding pixel point, and obtaining an optimized welding grayscale image;

[0030] S5: Performing quality inspection on the grayscale image of the object to be tested according to the optimized welding grayscale image.

[0031] In some embodiments, a large number of welding images of the object to be tested under different lighting conditions are collected, feature extraction is performed on the images of the object to be tested, and a regression model is constructed so that the input image can automatically adjust the weight coefficient according to the actual lighting conditions, specifically including the following steps:

[0032] S201: collecting a large number of welding images of the object to be tested under different lighting conditions, annotating each image to obtain the welding image of the object to be tested including the lighting conditions and welding quality, and then performing grayscale and normalization processing to obtain a set of grayscale images of the welding object to be tested;

[0033] The collected welding images of the object to be tested contain images of various light intensities, directions and welding quality conditions, ensuring the richness of the data set;

[0034] S202: Counting the grayscale mean and variance of the images in the welding grayscale image set to be tested, and using the Sobel operator to extract the gradient features of the images in the welding grayscale image set to be tested;

[0035] S203: constructing a support vector regression model, taking the image features of the images in the welding grayscale image set to be tested extracted as model input, and outputting a predicted weight coefficient;

[0036] Preset the convergence conditions of the model and adjust the model parameters through cross-validation until the preset convergence conditions are reached;

[0037] The convergence condition of the preset model can be set as the model parameters have little change and are close to zero in multiple consecutive rounds;

[0038] S204: Obtaining image features of the welding image of the object to be tested by graying and extracting features of the newly acquired welding image of the object to be tested;

[0039] The image features of the welding image of the object to be tested are input into the trained support vector regression model to obtain the predicted weight coefficient;

[0040] The degree of illumination influence within each pixel neighborhood block is calculated by substituting the predicted weight coefficient into the calculation formula of the illumination influence degree.

[0041] In some embodiments, image information of the weld at different viewing angles is obtained by multi-angle shooting, and the weight coefficient in the illumination influence degree formula is dynamically adjusted by using an adaptive parameter adjustment mechanism to obtain an evaluation result of the weld quality, which specifically includes the following steps:

[0042] S301: During the acquisition process, the oblique, side, and top-view angles are added to perform grayscale and normalization processing on the acquired multi-angle welding images of the object to be tested, so as to obtain a multi-angle welding grayscale image set;

[0043] During the acquisition process, add oblique, side, and top-down angles to ensure that the acquired data set contains images of the weld at various viewing angles;

[0044] S302: Annotate the images taken from multiple angles, including the quality grade, specific location and direction of the weld, and existing defects;

[0045] S303: extracting the grayscale features and gradient features of each angle image in the multi-angle welding grayscale image set to be tested;

[0046] Gradient features are extracted using the Sobel operator;

[0047] The grayscale features and gradient features of images at different angles are integrated to obtain a comprehensive feature vector;

[0048] S304: inputting the multi-angle welding grayscale image set to be tested into the support vector regression model for model training, and dynamically adjusting the weight coefficient;

[0049] S305: performing grayscale processing and feature extraction on the newly acquired multi-angle welding grayscale image to be tested, thereby obtaining image comprehensive features of the multi-angle welding grayscale image to be tested;

[0050] The comprehensive image features of the multi-angle welding grayscale images to be tested are input into the trained support vector regression model to predict the weight coefficient of each angle image;

[0051] Substitute the predicted weight coefficient into the illumination influence formula to calculate the illumination influence within each pixel neighborhood block;

[0052] S306: Perform weld quality assessment based on the degree of illumination influence in the multi-angle weld grayscale image to be measured.

[0053] In some embodiments, the weld area is dynamically excited by vibration of a specific frequency, and the image changes of the weld during the dynamic vibration process are collected and analyzed, key dynamic features are extracted, and a comprehensive feature vector is constructed in combination with static image features for intelligent evaluation of weld quality, which specifically includes the following steps:

[0054] S401: Collecting a welding image of the object to be tested in a static state as reference data;

[0055] S402: using a vibration generator to simulate a production environment to add a fixed frequency vibration to the object to be tested, and collecting a dynamic welding image sequence of the object to be tested under the vibration condition;

[0056] Analyze dynamic image sequences and calculate vibration characteristics of the weld area, such as directional offset and position offset;

[0057] S403: extracting features of a dynamic welding image sequence of the object to be tested collected under vibration conditions through a dynamic feature extraction algorithm, specifically features of frequency, amplitude and directional offset, and combining the features of the static image to form a vibration comprehensive feature vector;

[0058] S404: inputting the vibration comprehensive feature vector into the support vector regression model for model training, and dynamically adjusting the weight coefficient;

[0059] S405: obtaining a vibration comprehensive feature vector by grayscale processing and feature extraction of a newly acquired dynamic welding image sequence of the object to be tested under vibration conditions;

[0060] The vibration comprehensive feature vector is input into the trained support vector regression model to predict the weight coefficient of each angle image;

[0061] Substitute the predicted weight coefficient into the lighting influence formula to calculate the lighting influence within each pixel neighborhood block.

[0062] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0063] By calculating the grayscale difference, the areas with large changes in pixel grayscale values ​​due to illumination are identified, which helps to distinguish the illumination-affected areas from the normal welding areas. The evaluation of gradient uniformity takes into account the continuity of edge information in the image, which helps to distinguish the pseudo-edges caused by illumination from the real welding edges. The illumination diffusion factor simulates the attenuation effect of illumination through a Gaussian function, which makes the calculation of the illumination influence more consistent with actual physical phenomena and improves the accuracy of the calculation.

[0064] When calculating the degree of illumination influence, the weight coefficient is introduced, which can flexibly adjust the contribution of different features in the final evaluation according to actual conditions, which helps to adapt to the needs of different lighting conditions and welding scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 The figure is a schematic flow chart of a welding quality visual inspection method according to the present invention. DETAILED DESCRIPTION

[0066] To facilitate the understanding of the present invention, the present application will be described more comprehensively below with reference to the relevant drawings; the drawings show preferred embodiments of the present invention, but the present invention can be implemented in many different forms and is not limited to the embodiments described herein; on the contrary, the purpose of providing these embodiments is to enable a more thorough and comprehensive understanding of the disclosed content of the present invention.

[0067] It should be noted that the terms “vertical”, “horizontal”, “up”, “down”, “left”, “right” and similar expressions used in this document are only for illustrative purposes and do not represent the only implementation method.

[0068] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by technicians in the technical field to which the present invention belongs; the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the term "and / or" used herein includes any and all combinations of one or more related listed items.

[0069] Embodiment 1: Figure 1 As shown, the present application provides a welding quality visual inspection method, comprising:

[0070] S1: Obtain a welding image of the object to be tested, and grayscale the image to obtain a grayscale image of the welding object to be tested;

[0071] The welding area of ​​the object to be tested is set to be a metal material with high reflectivity, and a point light source is set above the object to be tested, which is illuminated obliquely from the upper left corner of the object to be tested. A camera is used to collect the welding image of the object to be tested, and the collected welding image is gray-scaled to obtain a gray-scale image of the welding to be tested;

[0072] S2: Obtain the pixel neighborhood block corresponding to each pixel point in the grayscale image of the welding to be tested, and obtain the degree of illumination influence in each pixel neighborhood block according to the grayscale feature and gradient feature of each pixel point in each pixel neighborhood block;

[0073] Affected by the illumination, the illumination-affected area in the image has a diffusion characteristic, that is, the closer the pixel is to the center of the area, the smaller the pixel grayscale difference is, and the grayscale value of the area affected by the illumination is larger;

[0074] In one embodiment of the present invention, a method for obtaining the degree of illumination influence includes:

[0075] S101: Calculate the degree of change difference of the gray value in the pixel area block, recorded as gray difference, and the calculation formula is:

[0076]

[0077] Among them, G1 represents the grayscale difference, σ1 represents the standard deviation of the grayscale value in the pixel domain block, and G max Indicates the maximum grayscale value in the pixel area block, G min Indicates the minimum gray value within the pixel area block;

[0078] S102: Evaluate the uniformity of the gradient direction within the pixel neighborhood block, denoted as gradient uniformity, and the calculation formula is:

[0079]

[0080] Among them, G2 represents the gradient uniformity, σ2 represents the standard deviation of the gradient direction within the pixel domain block;

[0081] S103: The attenuation effect of light diffusion from the center to the surroundings is simulated by a Gaussian function, which is recorded as the light diffusion factor. The calculation formula is:

[0082]

[0083] Where G3 represents the light diffusion factor, d represents the distance from the center of the light source, and σ3 represents the standard deviation of the Gaussian function;

[0084] S104: By combining the grayscale difference, gradient uniformity and light diffusion factor and assigning different weight coefficients, the degree of light influence is obtained. The calculation formula is:

[0085] G = α × G1 + β × G2 × G3;

[0086] G represents the degree of illumination influence, α and β weight coefficients, G1 represents grayscale difference, G2 represents gradient uniformity, and G3 represents illumination diffusion factor;

[0087] It should be noted that the Sobel operator is used to calculate the image gradient direction, and the specific Sobel operator and standard deviation calculation method are calculation means well known to those skilled in the art;

[0088] S3: Obtain the edge endpoint of each edge in the grayscale image of the weld to be tested, and determine the same type of edges according to the position distribution characteristics between the edge endpoints of adjacent edges;

[0089] The center point of each similar edge is obtained, and the confidence that each similar edge is the inner edge of the weld is obtained according to the relative distance between each edge pixel point and the center point on each similar edge and the circular fitting degree of the corresponding similar edge;

[0090] According to the confidence of each edge of the same type and the local edge pixel density on the corresponding edge of the same type, the defect degree of each edge of the same type is obtained;

[0091] S4: obtaining a gamma value adjustment coefficient of a pixel point at a center position of each pixel neighborhood block according to the degree of illumination influence in each pixel neighborhood block and the degree of defect of the corresponding edge of the same type;

[0092] The preset gamma value of each pixel is adjusted according to the gamma value adjustment coefficient to obtain an optimized gamma value of each pixel in each pixel neighborhood block;

[0093] Obtaining a grayscale output value of each pixel point in each pixel neighborhood block according to the optimized gamma value of each pixel point in each pixel neighborhood block and the grayscale value of the corresponding pixel point, and obtaining an optimized welding grayscale image;

[0094] S5: Performing quality inspection on the grayscale image of the object to be tested according to the optimized welding grayscale image;

[0095] In one embodiment of the present invention, quality inspection of heat exchanger tube head welding is performed based on optimized welding grayscale images, including:

[0096] The optimized welding grayscale image is segmented by threshold to obtain the weld area. The parameters of each weld area are analyzed and compared with the parameters in the standard welding grayscale image to obtain the deviation between the parameters of the object to be tested and the standard parameters. The deviation threshold is preset. When the deviation between the parameters of the object to be tested and the standard parameters exceeds the deviation threshold, it is displayed that the welding quality of the object to be tested is unqualified.

[0097] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0098] By calculating the grayscale difference, the areas with large changes in pixel grayscale values ​​due to illumination are identified, which helps to distinguish the illumination-affected areas from the normal welding areas. The evaluation of gradient uniformity takes into account the continuity of edge information in the image, which helps to distinguish the pseudo-edges caused by illumination from the real welding edges. The illumination diffusion factor simulates the attenuation effect of illumination through a Gaussian function, which makes the calculation of the illumination influence more consistent with actual physical phenomena and improves the accuracy of the calculation.

[0099] When calculating the degree of illumination influence, the weight coefficient is introduced, which can flexibly adjust the contribution of different features in the final evaluation according to actual conditions, which helps to adapt to the needs of different lighting conditions and welding scenes.

[0100] Embodiment 2: In embodiment 1, fixed-angle lighting has limitations. Therefore, by introducing an adaptive parameter adjustment mechanism and dynamically adjusting the weight coefficient in the lighting influence formula, the lighting influence of the image under different lighting conditions can be calculated, thereby further improving the accuracy of weld quality detection.

[0101] Therefore, the embodiments of the present application are optimized based on the above embodiments.

[0102] In some embodiments, a large number of welding images of the object to be tested under different lighting conditions are collected, feature extraction is performed on the images of the object to be tested, and a regression model is constructed so that the input image can automatically adjust the weight coefficient according to the actual lighting conditions, specifically including the following steps:

[0103] S201: collecting a large number of welding images of the object to be tested under different lighting conditions, annotating each image to obtain the welding image of the object to be tested including the lighting conditions and welding quality, and then performing grayscale and normalization processing to obtain a set of grayscale images of the welding object to be tested;

[0104] The collected welding images of the object to be tested contain images of various light intensities, directions and welding quality conditions, ensuring the richness of the data set;

[0105] S202: Counting the grayscale mean and variance of the images in the welding grayscale image set to be tested, and using the Sobel operator to extract the gradient features of the images in the welding grayscale image set to be tested;

[0106] S203: constructing a support vector regression model, taking the image features of the images in the welding grayscale image set to be tested extracted as model input, and outputting a predicted weight coefficient;

[0107] Preset the convergence conditions of the model and adjust the model parameters through cross-validation until the preset convergence conditions are reached;

[0108] The convergence condition of the preset model can be set as the model parameters have little change and are close to zero in multiple consecutive rounds;

[0109] S204: Obtaining image features of the welding image of the object to be tested by graying and extracting features of the newly acquired welding image of the object to be tested;

[0110] The image features of the welding image of the object to be tested are input into the trained support vector regression model to obtain the predicted weight coefficient;

[0111] The degree of illumination influence within each pixel neighborhood block is calculated by substituting the predicted weight coefficient into the calculation formula of the illumination influence degree.

[0112] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0113] By introducing an adaptive parameter adjustment mechanism, the weight coefficient in the illumination influence formula can be dynamically adjusted according to the image features under different illumination conditions. The adaptive adjustment can more accurately reflect the influence of actual illumination on weld images, thereby improving the accuracy and reliability of weld quality detection. Since the system can automatically adjust parameters according to illumination conditions, it can adapt to a variety of different illumination environments, including strong light, weak light, and illumination from different directions, making the system more stable and reliable in actual applications and reducing false detections and missed detections caused by illumination changes.

[0114] Traditional weld quality inspection requires manual adjustment of inspection parameters according to lighting conditions, which is not only time-consuming and labor-intensive, but also prone to errors. By introducing an adaptive parameter adjustment mechanism, the system can automatically complete this process, thereby simplifying the operating process and improving work efficiency.

[0115] Embodiment 3: In Embodiment 1 and Embodiment 2, fixed-angle shooting has limitations. By combining multi-angle shooting technology and adaptive parameter adjustment mechanism, the accuracy and robustness of weld quality detection can be further improved.

[0116] Therefore, the embodiments of the present application are optimized based on the above embodiments.

[0117] In some embodiments, image information of the weld at different viewing angles is obtained by multi-angle shooting, and the weight coefficient in the illumination influence degree formula is dynamically adjusted by using an adaptive parameter adjustment mechanism to obtain an evaluation result of the weld quality, which specifically includes the following steps:

[0118] S301: During the acquisition process, the oblique, side, and top-view angles are added to perform grayscale and normalization processing on the acquired multi-angle welding images of the object to be tested, so as to obtain a multi-angle welding grayscale image set;

[0119] During the acquisition process, add oblique, side, and top-down angles to ensure that the acquired data set contains images of the weld at various viewing angles;

[0120] S302: Annotate the images taken from multiple angles, including the quality grade, specific location and direction of the weld, and existing defects;

[0121] S303: extracting the grayscale features and gradient features of each angle image in the multi-angle welding grayscale image set to be tested;

[0122] Gradient features are extracted using the Sobel operator;

[0123] The grayscale features and gradient features of images at different angles are integrated to obtain a comprehensive feature vector;

[0124] S304: inputting the multi-angle welding grayscale image set to be tested into the support vector regression model for model training, and dynamically adjusting the weight coefficient;

[0125] S305: performing grayscale processing and feature extraction on the newly acquired multi-angle welding grayscale image to be tested, thereby obtaining image comprehensive features of the multi-angle welding grayscale image to be tested;

[0126] The comprehensive image features of the multi-angle welding grayscale images to be tested are input into the trained support vector regression model to predict the weight coefficient of each angle image;

[0127] Substitute the predicted weight coefficient into the illumination influence formula to calculate the illumination influence within each pixel neighborhood block;

[0128] S306: Perform weld quality assessment based on the degree of illumination influence in the multi-angle weld grayscale image to be measured.

[0129] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0130] Through multi-angle shooting, detailed information of the weld at different perspectives can be captured, including oblique, side and top views. This information cannot be fully displayed at a single angle. The fusion and analysis of multi-angle images makes the assessment of weld quality more comprehensive and accurate, thereby improving the accuracy of detection.

[0131] By annotating and extracting features from multi-angle images, the system can more accurately identify defects in welds, such as cracks, slag inclusions, and lack of fusion, thereby ensuring welding quality.

[0132] This solution implements a weld quality inspection method that can combine multi-angle shooting and adaptive parameter adjustment mechanism. More comprehensive weld information is obtained through multi-angle images, and the calculation accuracy of the degree of illumination influence is improved by dynamically adjusting the weight coefficient, thereby improving the accuracy and robustness of weld quality inspection.

[0133] Embodiment 4: In the above embodiments, in an actual production environment, the environment in which the object to be tested is located may vibrate to a certain extent. This embodiment introduces dynamic vibration characteristics for analysis and combines image recognition to achieve accurate detection of weld quality.

[0134] Therefore, the embodiments of the present application are optimized based on the above embodiments.

[0135] In some embodiments, the weld area is dynamically excited by vibration of a specific frequency, and the image changes of the weld during the dynamic vibration process are collected and analyzed, key dynamic features are extracted, and a comprehensive feature vector is constructed in combination with static image features for intelligent evaluation of weld quality, which specifically includes the following steps:

[0136] S401: Collecting a welding image of the object to be tested in a static state as reference data;

[0137] S402: using a vibration generator to simulate a production environment to add a fixed frequency vibration to the object to be tested, and collecting a dynamic welding image sequence of the object to be tested under the vibration condition;

[0138] Analyze dynamic image sequences and calculate vibration characteristics of the weld area, such as directional offset and position offset;

[0139] S403: extracting features of a dynamic welding image sequence of the object to be tested collected under vibration conditions through a dynamic feature extraction algorithm, specifically features of frequency, amplitude and directional offset, and combining the features of the static image to form a vibration comprehensive feature vector;

[0140] S404: inputting the vibration comprehensive feature vector into the support vector regression model for model training, and dynamically adjusting the weight coefficient;

[0141] S405: obtaining a vibration comprehensive feature vector by grayscale processing and feature extraction of a newly acquired dynamic welding image sequence of the object to be tested under vibration conditions;

[0142] The vibration comprehensive feature vector is input into the trained support vector regression model to predict the weight coefficient of each angle image;

[0143] Substitute the predicted weight coefficient into the lighting influence formula to calculate the lighting influence within each pixel neighborhood block.

[0144] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:

[0145] By introducing dynamic vibration characteristic analysis and combining it with image recognition technology, the actual performance of the weld in a dynamic environment can be more comprehensively captured. This solution takes into account the features in the static image and adds the changing features during the dynamic vibration process, thereby improving the accuracy and reliability of weld quality detection.

[0146] By combining dynamic vibration excitation and image recognition technology, efficient and accurate detection of weld quality is achieved, significantly improving the automation level of the welding production line and product quality.

[0147] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for visual inspection of welding quality, characterized in that: include: S1: Obtain a welding image of the object to be tested, and grayscale the image to obtain a grayscale image of the welding object to be tested; S2: Obtain the pixel neighborhood block corresponding to each pixel point in the grayscale image of the welding to be tested, and obtain the degree of illumination influence in each pixel neighborhood block according to the grayscale feature and gradient feature of each pixel point in each pixel neighborhood block; S3: Obtain the edge endpoint of each edge in the grayscale image of the weld to be tested, and determine the same type of edges according to the position distribution characteristics between the edge endpoints of adjacent edges; The center point of each similar edge is obtained, and the confidence that each similar edge is the inner edge of the weld is obtained according to the relative distance between each edge pixel point and the center point on each similar edge and the circular fitting degree of the corresponding similar edge; According to the confidence of each edge of the same type and the local edge pixel density on the corresponding edge of the same type, the defect degree of each edge of the same type is obtained; S4: obtaining a gamma value adjustment coefficient of a pixel point at a center position of each pixel neighborhood block according to the degree of illumination influence in each pixel neighborhood block and the degree of defect of the corresponding edge of the same type; The preset gamma value of each pixel is adjusted according to the gamma value adjustment coefficient to obtain an optimized gamma value of each pixel in each pixel neighborhood block; Obtaining a grayscale output value of each pixel point in each pixel neighborhood block according to the optimized gamma value of each pixel point in each pixel neighborhood block and the grayscale value of the corresponding pixel point, and obtaining an optimized welding grayscale image; S5: Performing quality inspection on the grayscale image of the object to be tested according to the optimized welding grayscale image; Methods for obtaining the degree of light impact include: S101: Calculate the degree of change difference of the gray value in the pixel area block, recorded as gray difference, and the calculation formula is: Among them, G1 represents the grayscale difference, σ1 represents the standard deviation of the grayscale value in the pixel domain block, and G max Indicates the maximum grayscale value in the pixel area block, G min Indicates the minimum gray value within the pixel area block; S102: Evaluate the uniformity of the gradient direction within the pixel neighborhood block, denoted as gradient uniformity, and the calculation formula is: Among them, G2 represents the gradient uniformity, σ2 represents the standard deviation of the gradient direction within the pixel domain block; S103: The attenuation effect of light diffusion from the center to the surroundings is simulated by a Gaussian function, which is recorded as the light diffusion factor. The calculation formula is: Where G3 represents the light diffusion factor, d represents the distance from the center of the light source, and σ3 represents the standard deviation of the Gaussian function; S104: By combining the grayscale difference, gradient uniformity and light diffusion factor and assigning different weight coefficients, the degree of light influence is obtained. The calculation formula is: G = α × G1 + β × G2 × G3; G represents the degree of illumination influence, α and β are weight coefficients, G1 represents the grayscale difference, G2 represents the gradient uniformity, and G3 represents the illumination diffusion factor.

2. A welding quality visual inspection method as claimed in claim 1, characterized in that: The welding area of ​​the object to be tested is set to be made of metal material, and a point light source is set above the object to be tested, which is illuminated obliquely from the upper left corner of the object to be tested. A camera is used to capture the welding image of the object to be tested, and the captured welding image is grayscaled to obtain a grayscale image of the welding to be tested.

3. A welding quality visual inspection method as claimed in claim 2, characterized in that: A large number of welding images of the object to be tested under different lighting conditions are collected, and features are extracted from the images of the object to be tested and a regression model is constructed, so that the weight coefficient of the input image can be automatically adjusted according to the actual lighting conditions.

4. A welding quality visual inspection method as claimed in claim 3, characterized in that: As described above, a large number of welding images of the object to be tested under different lighting conditions are collected, specifically: S201: collecting a large number of welding images of the object to be tested under different lighting conditions, annotating each image to obtain the welding image of the object to be tested including the lighting conditions and welding quality, performing grayscale conversion and normalization processing to obtain a set of grayscale images of the welding object to be tested; The collected welding images of the object to be tested contain images of various light intensities, directions and welding quality conditions.

5. A welding quality visual inspection method as claimed in claim 4, characterized in that: The feature extraction of the image of the object to be measured and the construction of a regression model so that the input image can automatically adjust the weight coefficient according to the actual lighting conditions specifically include the following steps: S202: Counting the grayscale mean and variance of the images in the welding grayscale image set to be tested, and using the Sobel operator to extract the gradient features of the images in the welding grayscale image set to be tested; S203: constructing a support vector regression model, taking the image features of the images in the welding grayscale image set to be tested extracted as model input, and outputting a predicted weight coefficient; Preset the convergence conditions of the model and adjust the model parameters through cross-validation until the preset convergence conditions are reached; S204: Obtaining image features of the welding image of the object to be tested by graying and extracting features of the newly acquired welding image of the object to be tested; The image features of the welding image of the object to be tested are input into the trained support vector regression model to obtain the predicted weight coefficient; The degree of illumination influence within each pixel neighborhood block is calculated by substituting the predicted weight coefficient into the calculation formula of the illumination influence degree.

6. A welding quality visual inspection method as claimed in claim 5, characterized in that: Image information of the weld at different viewing angles is obtained through multi-angle shooting, and the weight coefficient in the illumination influence formula is dynamically adjusted using an adaptive parameter adjustment mechanism to obtain the weld quality evaluation result.

7. A welding quality visual inspection method as claimed in claim 6, characterized in that: The method of acquiring image information of the weld at different viewing angles by shooting at multiple angles and dynamically adjusting the weight coefficient in the illumination influence degree formula by using an adaptive parameter adjustment mechanism specifically includes the following steps: S301: During the acquisition process, the oblique, side, and top-view angles are added to perform grayscale and normalization processing on the acquired multi-angle welding images of the object to be tested, so as to obtain a multi-angle welding grayscale image set; S302: Annotate the images taken from multiple angles, including the quality grade, specific location and direction of the weld, and existing defects; S303: extracting the grayscale features and gradient features of each angle image in the multi-angle welding grayscale image set to be tested; Gradient features are extracted using the Sobel operator; The grayscale features and gradient features of images at different angles are integrated to obtain a comprehensive feature vector; S304: inputting the multi-angle welding grayscale image set to be tested into the support vector regression model for model training, and dynamically adjusting the weight coefficient; S305: performing grayscale processing and feature extraction on the newly acquired multi-angle welding grayscale image to be tested, thereby obtaining image comprehensive features of the multi-angle welding grayscale image to be tested; The comprehensive image features of the multi-angle welding grayscale images to be tested are input into the trained support vector regression model to predict the weight coefficient of each angle image; Substitute the predicted weight coefficient into the lighting influence formula to calculate the lighting influence within each pixel neighborhood block.

8. A welding quality visual inspection method as claimed in claim 7, characterized in that: The weld area is dynamically excited by vibration of a specific frequency. The image changes of the weld during dynamic vibration are collected and analyzed, the key dynamic features are extracted and combined with the static image features to construct a comprehensive feature vector. The comprehensive feature vector is input into the support vector regression model to obtain the prediction weight coefficient.

9. A welding quality visual inspection method as claimed in claim 8, characterized in that: The method of dynamically exciting the weld area by using vibration of a specific frequency, collecting and analyzing the image changes of the weld during the dynamic vibration process, extracting key dynamic features and constructing a comprehensive feature vector in combination with static image features, specifically includes the following steps: S401: Collecting a welding image of the object to be tested in a static state as reference data; S402: using a vibration generator to simulate a production environment to add a fixed frequency vibration to the object to be tested, and collecting a dynamic welding image sequence of the object to be tested under the vibration condition; Analyze dynamic image sequences and calculate vibration characteristics of the weld area, such as directional offset and position offset; S403: extracting the features of the dynamic welding image sequence of the object to be tested under vibration conditions through a dynamic feature extraction algorithm, specifically the features of frequency, amplitude and directional offset, and combining the features of the static image to form a vibration comprehensive feature vector.

10. A welding quality visual inspection method as claimed in claim 9, characterized in that: The method of obtaining a prediction weight coefficient by inputting the comprehensive feature vector into a support vector regression model specifically includes the following steps: S404: inputting the vibration comprehensive feature vector into the support vector regression model for model training, and dynamically adjusting the weight coefficient; S405: obtaining a vibration comprehensive feature vector by grayscale processing and feature extraction of a newly acquired dynamic welding image sequence of the object to be tested under vibration conditions; The vibration comprehensive feature vector is input into the trained support vector regression model to predict the weight coefficient of each angle image; Substitute the predicted weight coefficient into the lighting influence formula to calculate the lighting influence within each pixel neighborhood block.

Citation Information

Patent Citations

  • A method and system for visual inspection of heat exchanger tube head welding quality

    CN117689662B

  • Hardware part production quality detection method and system based on artificial intelligence

    CN116205919A

  • Printed circuit board quality intelligent detection method based on vision assistance

    CN117115153A

  • Automobile part surface defect detection method

    CN117197141A

  • Watch shell quality detection method based on image data

    CN117218122A

Cited By

  • AOI optical detection method and system based on deep learning

    CN119887747A

  • An AOI optical detection method and system based on deep learning

    CN119887747B

  • Weld defect detection system and method based on infrared thermal imaging and deep learning

    CN120388016A

  • Automobile part welding quality evaluation method and system, storage medium and computer

    CN120411096A

  • Electric power construction project construction quality monitoring method based on computer assistance

    CN120525877A