A method for online detection of welding quality based on laser welding machine
By using the online detection method of laser welding machine in welding quality detection, weld features are extracted using image processing and morphological technology, the problems of noise interference and incomplete feature extraction in the prior art are solved, and efficient and accurate weld quality evaluation is achieved.
Patent Information
- Application Number
- CN202510098283.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2045-01-22
AI Technical Summary
The existing weld quality detection methods have problems such as noise interference, incomplete feature extraction, and insufficient accuracy and reliability of evaluation results.
The welding quality online detection method based on laser welding machine is adopted. By collecting weld images and performing grayscale conversion and binarization, combining morphological processing and Hough transformation algorithm, the edge profile characteristics of the weld are extracted, and geometric parameters are calculated. Finally, the quality scoring model is used to generate the weld quality scoring value.
It improves the accuracy and real-time performance of weld quality inspection, reduces noise interference, ensures the accuracy of feature extraction, and generates a comprehensive and fine weld quality evaluation system.
Smart Images

Figure CN119540238B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of welding process quality detection, in particular to an online welding quality detection method based on a laser welding machine. Background Art
[0002] With the continuous improvement of the level of industrial automation, laser welding technology, as an efficient and precise welding method, has been widely used in automobile manufacturing, aerospace, electronic products and other fields. The quality of welds in the laser welding process has a vital impact on the performance and reliability of the product. Therefore, how to effectively monitor and evaluate the quality of welds in the laser welding process has become a hot issue in the current research of welding technology. Traditional weld quality detection methods mostly rely on manual inspection or later destructive testing, which is not only labor-intensive, but also has high error rates and efficiency problems. In recent years, non-contact detection methods based on image processing technology have gradually become mainstream. These methods evaluate the quality of welds by collecting weld images during laser welding and analyzing the images in real time. Existing image processing methods usually use edge detection, feature extraction and classification algorithms to analyze weld images and generate quality assessments based on the geometric features of the welds. However, traditional image processing methods are often subject to greater noise interference when processing complex images, resulting in inaccurate results and lack of sufficient real-time and high-precision quality scoring models.
[0003] There are many problems in the current weld quality assessment technology, mainly including the interference of noise in the image processing process, the incompleteness of feature extraction, and the accuracy and reliability of the assessment results. First, due to environmental factors in the welding process, such as smoke, dust, and light changes, the image often contains a lot of noise, which will seriously affect the extraction and quality assessment of weld features. Although the existing noise suppression methods can improve the image quality to a certain extent, they still cannot completely eliminate the impact of noise on subsequent processing. Secondly, traditional feature extraction methods mostly rely on simple edge detection or template matching algorithms, which easily ignore the subtle differences in the weld image, resulting in an incomplete and inaccurate assessment of the weld quality. Finally, the accuracy of the quality scoring model is also one of the bottlenecks restricting technological progress. Some existing scoring models are usually based on simple geometric parameters, such as weld width or shape, but these parameters cannot fully reflect the comprehensive performance of welding quality, making it difficult to achieve accurate quality assessment. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention proposes an online detection method for welding quality based on a laser welding machine.
[0005] Therefore, the present invention provides an online detection method for welding quality based on a laser welding machine, which can solve the problems mentioned in the background technology.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides a method for online detection of welding quality based on a laser welding machine, which comprises:
[0008] Collecting a weld image during the welding process of a laser welding machine and converting the weld image into a grayscale image, and performing binarization processing on the grayscale image;
[0009] Performing morphological processing on the binarized image, eliminating noise points in the image through opening and closing operations, and extracting edge contour features of the weld;
[0010] Detecting straight line segments in the weld edge contour features and calculating geometric parameters of the straight line segments;
[0011] The geometric parameters are analyzed using a quality scoring model to generate a weld quality scoring value.
[0012] As a preferred solution of the online detection method of welding quality based on a laser welding machine of the present invention, the binarization processing includes:
[0013] Converting the collected weld image into a grayscale image;
[0014] Based on the dynamic change characteristics of light intensity during welding, the grayscale image is binarized using a threshold value;
[0015] The judgment basis of the binarization process is:
[0016] When the pixel Gray value at Greater than the corresponding threshold When , the grayscale value of the pixel is set to 255, otherwise it is set to 0, so as to obtain a binary image that highlights the weld features.
[0017] As a preferred solution of the online detection method of welding quality based on a laser welding machine of the present invention, the calculation of the threshold value is shown in the following formula:
[0018]
[0019] in, The center point of the window The threshold value at is the local window size, is the gray value of the pixel in the window, is the adjustment coefficient, is the standard deviation of the grayscale value in the window, and the calculation formula is:
[0020]
[0021] in, is the mean gray value in the window, Pixel Euclidean distance to the center of the window.
[0022] As a preferred solution of the online detection method of welding quality based on a laser welding machine of the present invention, extracting the edge contour features of the weld includes:
[0023] Perform adaptive opening operation on the binary image;
[0024] After the opening operation is completed, an adaptive closing operation is performed;
[0025] After completing the morphological processing, the edge saliency measure is calculated, and the edge contour points are extracted according to the saliency measure;
[0026] The adaptive opening operation comprehensively determines the optimal first structure element size by calculating the pixel distribution characteristics and light intensity change characteristics within the set first analysis window;
[0027] The adaptive closing operation process adopts a weighted calculation method based on local grayscale information, and dynamically determines the optimal second structure element size according to the original grayscale value distribution in the window and the binary feature distribution after the opening operation through the set second analysis window.
[0028] As a preferred solution of the online detection method of welding quality based on a laser welding machine of the present invention, the calculation of the edge significance metric is shown in the following formula:
[0029]
[0030] in, is the edge saliency value at the pixel point (x, y), is the gradient feature weight coefficient, is the direction consistency weight coefficient, is the adaptive threshold, is the morphological gradient value, and the calculation formula is:
[0031]
[0032] in, , is the gradient value in the x direction and the y direction, is the light intensity attenuation coefficient, Pixel The light intensity value at ;
[0033] Directional consistency measure Calculation formula:
[0034]
[0035] in, is the number of reference points, is the gradient direction angle of the current pixel, is the gradient direction angle of the rth reference point, is the standard deviation adjustment coefficient, is the standard deviation of the local area.
[0036] As a preferred solution of the online detection method of welding quality based on a laser welding machine of the present invention, wherein: the geometric parameters of the straight line segment include width, depth and continuity index;
[0037] The width is calculated using an adaptive integration method as shown below:
[0038]
[0039] in, is the characteristic intensity function:
[0040]
[0041] in, For straight line segment The weld width at is the starting position of one side edge of the weld, is the end position of the other side edge of the weld, is the local slope of the weld edge, is the characteristic intensity function value, is the local adaptive threshold, is the maximum significance value, is the light intensity response coefficient;
[0042] The depth estimation adopts an improved model based on light intensity distribution, as shown in the following formula:
[0043]
[0044] in, is the estimated weld depth at the straight line segment l, is the calibration depth value, is the detection width, is the reference grayscale distribution, is the light intensity compensation coefficient, Pixel The light intensity value at .
[0045] As a preferred solution of the online detection method of welding quality based on a laser welding machine of the present invention, the continuity index is calculated by a multi-parameter comprehensive evaluation model, as shown in the following formula:
[0046]
[0047] Directional continuity measure Calculated as:
[0048]
[0049] Width continuity measure Calculated as:
[0050]
[0051] Light intensity continuity measurement Calculated as:
[0052]
[0053] in, is the comprehensive continuity score of the straight line segment l, with a value range of [0,1], , , are weight coefficients, taking values of 0.4, 0.3, and 0.3 respectively. is the directional continuity component, is the width continuity component, is the light intensity continuity component, is the length of the straight line segment in pixels, is the second-order derivative of the direction angle, indicating the rate of change of direction, is the distance parameter along the straight line segment, is the variance of weld width, is the mean square of the weld width, It is the second-order derivative of light intensity, indicating the rate of change of light intensity.
[0054] As a preferred solution of the online welding quality detection method based on the laser welding machine of the present invention, wherein: the quality scoring model analyzes the geometric parameters to generate scoring values of various aspects, and the scoring values include width quality score, depth quality score and continuity quality score;
[0055] The width quality score, depth quality score and continuity quality score are weightedly calculated to obtain the weld quality score value.
[0056] In a second aspect, an embodiment of the present invention provides an online welding quality detection system based on a laser welding machine, which includes:
[0057] An acquisition module is used to acquire a weld image during the welding process of the laser welding machine and convert the weld image into a grayscale image, and perform binarization processing on the grayscale image;
[0058] A feature extraction module is used to perform morphological processing on the binarized image, eliminate noise points in the image through opening and closing operations, and extract edge contour features of the weld;
[0059] A geometric parameter calculation module, used for detecting straight line segments in the weld edge contour features and calculating geometric parameters of the straight line segments;
[0060] The scoring generation module is used to analyze the geometric parameters using a quality scoring model to generate a weld quality scoring value.
[0061] The beneficial effect of the present invention is that the scheme of the present invention provides an efficient and accurate solution for weld quality assessment in the laser welding process through improved image processing. First, the color image is converted into a grayscale image by an improved weighted average method, and the image is binarized in combination with an adaptive threshold segmentation algorithm, which effectively reduces the image noise interference caused by illumination changes and improves the image quality and processing accuracy. Secondly, through morphological processing, including adaptive opening and closing operations, the noise points are further eliminated, and the edge contour of the weld is accurately extracted, ensuring the accuracy of subsequent feature extraction. The improved Hough transform algorithm is further used to detect the straight line segment of the weld edge, and the geometric parameters of the weld, including width, depth and continuity, are accurately calculated by an adaptive integral method and a light intensity distribution model, ensuring the high accuracy and robustness of the straight line segment detection. Finally, these geometric parameters are analyzed based on a deep learning model, and combined with a multi-dimensional quality assessment model, a comprehensive and detailed weld quality scoring system is generated, making the weld quality assessment more scientific and operational. The present invention not only improves the accuracy of weld quality detection, but also optimizes the real-time and intelligent level of the assessment process, and has a wide range of application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0063] Figure 1 It is a flow chart of the online detection method of welding quality based on the laser welding machine in the present invention. DETAILED DESCRIPTION
[0064] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0065] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0066] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0067] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.
[0068] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.
[0069] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0070] Example 1
[0071] Reference Figure 1, which is the first embodiment of the present invention, and provides an online detection method for welding quality based on a laser welding machine, comprising:
[0072] S1: collecting weld images during the welding process of the laser welding machine and converting the weld images into grayscale images, and binarizing the grayscale images using an adaptive threshold segmentation algorithm;
[0073] During the welding operation of the laser welding machine, the original image of the weld is collected by an industrial camera fixed above the welding head of the laser welding machine. The image acquisition frequency of the industrial camera is 30 frames per second, the field of view angle of the industrial camera is set perpendicular to the direction of the weld, and the distance between the industrial camera and the weld surface is set to 200 mm; the original image of the weld obtained is an RGB color image. For the convenience of subsequent processing, the improved weighted average method is used to convert the RGB color image into an 8-bit grayscale image. The specific conversion formula is:
[0074]
[0075] in, is the gray value after conversion, , , are the red, green, and blue channel values of the original image, respectively. Pixel The light intensity value at , , are the basic weight coefficients, with values of 0.299, 0.587 and 0.114 respectively. , , are light intensity compensation coefficients, and their values are 0.001, 0.002, and 0.003 respectively.
[0076] Considering the dynamic change characteristics of light intensity during welding, an improved adaptive threshold segmentation algorithm is used to binarize the grayscale image. The threshold calculation formula is:
[0077]
[0078] in, The center point of the window The threshold value at The local window size is 15. is the gray value of the pixel in the window, The adjustment coefficient is 0.2. is the standard deviation of the grayscale value in the window, and the calculation formula is:
[0079]
[0080] in, is the mean gray value in the window, Pixel Euclidean distance to the center of the window.
[0081] The final binary processing is judged as follows: when the pixel Gray value at Greater than the corresponding threshold When , the grayscale value of the pixel is set to 255, otherwise it is set to 0, so as to obtain a binary image that highlights the weld features.
[0082] S2: performing morphological processing on the binarized image, eliminating noise points in the image through opening and closing operations, and extracting edge contour features of the weld;
[0083] First, an adaptive opening operation is performed on the binary image to remove scattered noise and small-area pseudo features in the image. The selection of the opening operation structure element adopts an adaptive mechanism, and its size is dynamically adjusted according to the local image features. Specifically, in each processing area of the image, a 25×25 pixel analysis window is set, and the optimal structure element size is comprehensively determined by calculating the pixel distribution characteristics and light intensity change characteristics within the window. The calculation of this size needs to consider the following factors: the binary pixel distribution density of the local area, the degree of light intensity change in the area, the standard deviation of the local grayscale value, and the feature continuity of adjacent areas. The specific calculation is expressed by the following formula:
[0084]
[0085] in, is the size of the structure element of the opening operation, in pixels, with a value range of [3,11]. is the pixel value of the binary image in the local area, which takes the value of 0 or 1. is the size of the local analysis window, set to 25 pixels, is the basic adjustment coefficient of the opening operation, with a value of 1.5, which is used to control the basic size of the structural element. is the light intensity compensation coefficient, with a value of 0.001. is the light intensity value at the pixel point (x, y), with a value range of [0, 255], is the grayscale standard deviation of the local area, reflecting the complexity of the local texture.
[0086] After the opening operation is completed, in order to fill the small fractures and voids in the weld area, adaptive closing operation is required. The structural element selection of the closing operation adopts a weighted calculation method based on local grayscale information. By setting a 35×35 pixel analysis window, the original grayscale value distribution in the window and the binary feature distribution after the opening operation are comprehensively considered to dynamically determine the optimal structural element size. The specific calculation is expressed by the following formula:
[0087]
[0088] in, is the size of the closed structure element, in pixels, with a value range of [5,15]. is the closing operation scale coefficient, with a value of 2.0, which is used to adjust the filling strength. The window size for the closed operation analysis is set to 35 pixels. is the pixel value of the binary image after the opening operation, is the original grayscale image pixel value, ranging from [0,255], It is the offset coordinate relative to the center point in the window.
[0089] By introducing the original gray value As a weighting factor, it ensures that the closing operation maintains the integrity of the weld without overfilling and distorting the weld features.
[0090] After completing the morphological processing, it is necessary to extract the edge contour features of the weld. This process uses an improved edge saliency measurement method that comprehensively considers morphological gradients, directional consistency, and original image features. The saliency measurement is calculated using the following formula:
[0091]
[0092] in, is the edge saliency value at the pixel point (x, y), ranging from [0, 1], is the gradient feature weight coefficient, with a value of 0.6. is the direction consistency weight coefficient, with a value of 0.4. is the adaptive threshold, is the morphological gradient value, and the calculation formula is:
[0093]
[0094] in, , is the gradient value in the x direction and the y direction, is the light intensity attenuation coefficient, and its value is 0.1.
[0095] Directional consistency measure Calculation formula:
[0096]
[0097] in, is the number of reference points, and the value is 8, which means 8 neighborhood points. is the gradient direction angle of the current pixel, with a value range of [0,2π], is the gradient direction angle of the rth reference point, is the standard deviation adjustment coefficient, with a value of 0.2. is the standard deviation of the local area, and edge contour points are extracted based on the saliency measure.
[0098] S3: Detecting the straight line segments in the weld edge contour features based on the Hough transform algorithm, and calculating the geometric parameters of the straight line segments including width, depth and continuity index;
[0099] Firstly, the improved multi-scale Hough transform algorithm is used to detect straight line segments of weld edge contour features. The algorithm improves the accuracy of straight line detection in complex welding environments by introducing edge saliency weights and light intensity compensation mechanisms.
[0100] The detected straight line segments are described parametrically, and the weld width is calculated using an adaptive integration method:
[0101]
[0102] in, is the characteristic intensity function:
[0103]
[0104] in, is the weld width at the straight line segment l, is the starting position of one side edge of the weld, is the end position of the other side edge of the weld, is the local slope of the weld edge, is the characteristic intensity function value, is the local adaptive threshold, is the maximum significance value, is the light intensity response coefficient, and its value is 0.005.
[0105] Weld depth estimation uses an improved model based on light intensity distribution:
[0106]
[0107] in, is the estimated weld depth at the straight line segment l, is the calibration depth value, is the detection width, is the reference grayscale distribution.
[0108] The weld continuity index is calculated using a multi-parameter comprehensive evaluation model:
[0109]
[0110] Directional continuity measure Calculated as:
[0111]
[0112] Width continuity measure Calculated as:
[0113]
[0114] in, and are the variance and mean of the width respectively.
[0115] Light intensity continuity measurement Calculated as:
[0116]
[0117] in, is the comprehensive continuity score of the straight line segment l, with a value range of [0,1], , , are weight coefficients, taking values of 0.4, 0.3, and 0.3 respectively. is the directional continuity component, is the width continuity component, is the light intensity continuity component, is the length of the straight line segment in pixels, is the second-order derivative of the direction angle, indicating the rate of change of direction, is the distance parameter along the straight line segment, is the variance of weld width, is the mean square of the weld width, It is the second-order derivative of light intensity, indicating the rate of change of light intensity.
[0118] S4: Use a deep learning model to analyze the geometric parameters and generate a weld quality score value.
[0119] Firstly, the acquired geometric parameters are standardized, a unified scoring benchmark is established, and a multi-dimensional quality assessment model is established, including width quality score, depth quality score and continuity quality score.
[0120] The width quality score :
[0121]
[0122] Among them, the variability index Calculated as:
[0123]
[0124] in, is the width variability penalty coefficient (value range is 0.1-0.5, is the standard deviation of the width, is the average width, is the local width value, is the feature intensity function.
[0125] Depth Quality Rating :
[0126]
[0127] Among them, the depth uniformity index for:
[0128]
[0129] in, is the depth variability penalty coefficient (value range is 0.1-0.5), is the standard deviation of depth, is the average value of the depth, is the depth uniformity index, is the local depth value, is the light intensity attenuation coefficient.
[0130] Continuity Quality Rating :
[0131]
[0132] Among them, the calculation of comprehensive continuity index adopts weighted fusion:
[0133]
[0134] in, is the directional continuity weight (value 0.3-0.4), is the width continuity weight (value 0.3-0.4), is the light intensity continuity weight (value range is 0.2-0.3), is the directional continuity indicator, is the width continuity indicator, is the light intensity continuity indicator, is the number of features evaluated for continuity, is the weight coefficient of each feature, For various continuity indicators.
[0135] The above indicators are weighted to obtain the final quality score. The overall quality score is 0-100 points. The quality grades are: Grade A: above 90 points; Grade B: 80-90 points; Grade C: 70-80 points; Grade D: below 70 points.
[0136] Furthermore, this embodiment also provides an online welding quality detection system based on a laser welding machine, comprising:
[0137] An acquisition module is used to acquire a weld image during the welding process of the laser welding machine and convert the weld image into a grayscale image, and perform binarization processing on the grayscale image;
[0138] A feature extraction module is used to perform morphological processing on the binarized image, eliminate noise points in the image through opening and closing operations, and extract edge contour features of the weld;
[0139] A geometric parameter calculation module, used for detecting straight line segments in the weld edge contour features and calculating geometric parameters of the straight line segments;
[0140] The scoring generation module is used to analyze the geometric parameters using a quality scoring model to generate a weld quality scoring value.
[0141] This embodiment also provides a computer device, which is suitable for the case of an online welding quality detection method based on a laser welding machine, and includes a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the online welding quality detection method based on a laser welding machine as proposed in the above embodiment.
[0142] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0143] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for online detection of welding quality based on a laser welding machine as proposed in the above embodiment is implemented.
[0144] The storage medium proposed in this embodiment and the data storage method proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be found in the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0145] Example 2
[0146] This is the second embodiment of the present invention. This embodiment provides an online detection method for welding quality based on a laser welding machine. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0147] In this experiment, Q345B high-strength steel plate was selected as the welding workpiece, with workpiece specifications of 200mm×100mm×8mm and butt weld length of 180mm. IPG YLS-6000 fiber laser was used for welding, with a maximum output power of 6000W, and welding process parameters were set as follows: laser power 4200W, welding speed 25mm / s, welding shielding gas was argon (purity 99.99%), and gas flow rate 15L / min.
[0148] The image acquisition device uses a Basler acA2440-75um industrial camera with a resolution of 2448×2048 pixels, a frame rate of 75fps, and a Cognex 25mm industrial lens. The camera is installed 200mm above the laser welding head, and the field of view angle is 90° perpendicular to the direction of the weld. In order to reduce the interference of the welding arc on the imaging, a bandpass filter (central wavelength 808nm, bandwidth ±10nm) is installed at the front end of the camera. The image acquisition frequency is set to 30fps to ensure the continuity and integrity of the weld image. The test experiment was carried out according to the steps of Example 1, and the following data was obtained:
[0149]
[0150] Through statistical analysis of the test data, it was found that:
[0151] This method achieved a high accuracy of more than 90% in the measurement of weld width uniformity and depth uniformity (Test-A1 and Test-A2 groups), which is significantly better than the 80-85% accuracy level of the traditional method. In particular, in the Test-A1 group, the width uniformity reached 92.5% and the depth uniformity reached 91.8%. This high accuracy is due to the synergy of the improved adaptive threshold algorithm and multi-scale morphological processing.
[0152] From the data fluctuation range, at the same welding speed (such as Test-A1 and Test-A2), the variation range of key indicators is controlled within 1.5%, indicating that this method has excellent repeatability and stability. This stability is mainly due to the introduction of light intensity compensation mechanism and adaptive parameter adjustment algorithm.
[0153] The defect detection rate of this method is generally higher than 95% (Test-A and Test-B groups), especially under the optimal process parameters (Test-A1), reaching a high detection rate of 98.2%. This is significantly better than the 85-90% detection level of traditional methods, an increase of 10-15 percentage points. The high detection rate is attributed to the improved edge detection algorithm and the multi-parameter fusion scoring mechanism.
[0154] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for online detection of welding quality based on a laser welding machine, characterized in that: include: Collecting a weld image during the welding process of a laser welding machine and converting the weld image into a grayscale image, and performing binarization processing on the grayscale image; Performing morphological processing on the binarized image, eliminating noise points in the image through opening and closing operations, and extracting edge contour features of the weld; Detecting straight line segments in the edge contour features of the weld, and calculating geometric parameters of the straight line segments; The geometric parameters are analyzed using a quality scoring model to generate a weld quality scoring value; The binarization process comprises: Converting the collected weld image into a grayscale image; Based on the dynamic change characteristics of light intensity during the welding process, the grayscale image is binarized using a threshold value; The judgment basis of the binarization process is: When the pixel Gray value at Greater than the corresponding threshold When , the gray value of the pixel is set to 255, otherwise it is set to 0, so as to obtain a binary image that highlights the weld features; The calculation of the threshold is shown in the following formula: in, The center point of the window The threshold value at is the local window size, is the gray value of the pixel in the window, is the standard deviation adjustment coefficient, is the standard deviation of the grayscale value in the window, and the calculation formula is: in, is the mean gray value in the window, Pixel Euclidean distance to the center of the window.
2. The method for online detection of welding quality based on a laser welding machine as claimed in claim 1, characterized in that: Extracting the edge contour features of the weld includes: Perform adaptive opening operation on the binary image; After the opening operation is completed, an adaptive closing operation is performed; After completing the morphological processing, the edge saliency measure is calculated, and the edge contour points are extracted according to the saliency measure; The adaptive opening operation comprehensively determines the optimal first structure element size by calculating the pixel distribution characteristics and light intensity change characteristics within the set first analysis window; The adaptive closing operation process adopts a weighted calculation method based on local grayscale information, and dynamically determines the optimal second structure element size according to the original grayscale value distribution in the window and the binary feature distribution after the opening operation through the set second analysis window.
3. The method for online detection of welding quality based on a laser welding machine as claimed in claim 2, characterized in that: The edge saliency measure is calculated as follows: in, is the edge saliency value at the pixel point (x, y), is the gradient feature weight coefficient, is the direction consistency weight coefficient, The center point of the window The threshold value at in, is the morphological gradient value, and the calculation formula is: in, , is the gradient value in the x direction and the y direction, is the light intensity attenuation coefficient, Pixel The light intensity value at ; in, It is a measure of direction consistency and is calculated as follows: in, is the number of reference points, is the gradient direction angle of the current pixel, is the gradient direction angle of the rth reference point, is the standard deviation adjustment coefficient, is the standard deviation of the grayscale value in the window.
4. The method for online detection of welding quality based on a laser welding machine as claimed in claim 3, characterized in that: The geometric parameters of the straight line segment include width, depth and continuity index; The width is calculated using an adaptive integration method as shown below: in, is the characteristic intensity function: in, For straight line segment The weld width at is the starting position of one side edge of the weld, is the end position of the other side edge of the weld, is the local slope of the weld edge, is the characteristic intensity function value, The center point of the window The threshold value at is the maximum significance value, is the light intensity response coefficient; The depth estimation adopts an improved model based on light intensity distribution, as shown in the following formula: in, is the estimated weld depth at the straight line segment l, is the calibration depth value, is the detection width, is the reference grayscale distribution, is the light intensity compensation coefficient, Pixel The light intensity value at .
5. The method for online detection of welding quality based on a laser welding machine as claimed in claim 4, characterized in that: The continuity index is calculated by a multi-parameter comprehensive evaluation model, as shown in the following formula: Directional continuity measure Calculated as: Width continuity measure Calculated as: Light intensity continuity measurement Calculated as: in, is the comprehensive continuity score of the straight line segment l, with a value range of [0,1], , , are weight coefficients, taking values of 0.4, 0.3, and 0.3 respectively. is the directional continuity component, is the width continuity component, is the light intensity continuity component, is the length of the straight line segment in pixels, is the second-order derivative of the direction angle, indicating the rate of change of direction, is the distance parameter along the straight line segment, is the variance of weld width, is the mean square of the weld width, It is the second-order derivative of light intensity, indicating the rate of change of light intensity.
6. The method for online detection of welding quality based on a laser welding machine as claimed in claim 5, characterized in that: The quality scoring model analyzes the geometric parameters to generate scoring values in various aspects, wherein the scoring values include a width quality score, a depth quality score, and a continuity quality score; The width quality score, depth quality score and continuity quality score are weightedly calculated to obtain the weld quality score value.
7. A laser welding machine-based welding quality online detection system, based on the laser welding machine-based welding quality online detection method according to any one of claims 1 to 6, characterized in that: include: An acquisition module is used to acquire a weld image during the welding process of the laser welding machine and convert the weld image into a grayscale image, and perform binarization processing on the grayscale image; A feature extraction module is used to perform morphological processing on the binarized image, eliminate noise points in the image through opening and closing operations, and extract edge contour features of the weld; A geometric parameter calculation module, used for detecting straight line segments in the edge contour features of the weld and calculating geometric parameters of the straight line segments; The scoring generation module is used to analyze the geometric parameters using a quality scoring model to generate a weld quality scoring value.
Citation Information
Patent Citations
Soil crack feature information extraction method
CN110264459A
Production quality detection method for full-automatic connection of MiniLED sheets
CN114723758A