A laser welding quality detection method and device based on machine vision

By using image processing and feature analysis of the laser welding process and weight adjustment combined with welding time information, the problem of inaccurate evaluation of welding quality in the prior art is solved, and a more accurate welding quality evaluation is achieved.

CN119772445BActive Publication Date: 2025-06-06SHENZHEN XUWEIXING PRECISION EQUIP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510283365.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-11
Publication Date
2025-06-06
Estimated Expiration
2045-03-11

AI Technical Summary

Technical Problem

The dynamic nature of the laser welding process and the change characteristics of the welding quality are ignored in the prior art, and the welding quality cannot be accurately evaluated through the entire welding process.

Method used

By obtaining welding surface images and welding process information, greyscale processing and texture sub-block division, analyzing texture characteristics and light intensity distribution characteristics, constructing weight adjustment functions based on welding time information, and correcting and computing the quality evaluation parameters, and finally determining whether the welding quality is qualified or unqualified.

Benefits of technology

It improves the accuracy of welding quality evaluation, can comprehensively evaluate welding quality based on the entire welding process, and provides more reliable quality judgment results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119772445B_ABST
    Figure CN119772445B_ABST
Patent Text Reader

Abstract

The present invention discloses a laser welding quality detection method based on machine vision, the method comprising acquiring a welding surface image and welding process information; graying the welding surface image to obtain a welding area grayscale map; dividing the welding area grayscale map to obtain texture sub-blocks; analyzing the texture sub-blocks to obtain texture features; converting the welding surface image to obtain a spectrum map; analyzing the spectrum map to obtain light intensity distribution features; evaluating according to texture features and light intensity distribution features to obtain a first quality assessment parameter; constructing according to welding process information to obtain a weight adjustment function; correcting according to the first quality assessment parameter and the weight adjustment function to obtain a second quality assessment parameter; judging according to the second quality assessment parameter to obtain a welding quality qualified judgment result. The method can realize weighted processing in combination with welding stages at different times, thereby improving the accuracy of welding quality assessment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a laser welding quality detection method and device based on machine vision. Background Art

[0002] As an advanced welding technology, laser welding has been widely used in many fields such as automobile, aviation, aerospace, shipbuilding and heavy industry due to its significant advantages such as high energy density, high energy conversion rate, high precision, small welding area, small post-weld deformation and heat-affected zone. In the field of automobile manufacturing, laser welding is used in key parts such as body frame and component connection. It can not only improve the strength and stability of the body structure, but also achieve beautiful and seamless welding effects, and improve the overall performance and appearance quality of the car. In the field of aerospace, laser welding technology is essential for manufacturing aircraft engines, wings, cabins and other components. Its high precision and reliability ensure the safety and performance of aerospace equipment and meet the strict requirements for lightweight and high-strength structures. With the in-depth application of laser welding technology in various industries, the requirements for welding quality and welding accuracy are also constantly improving. Traditional welding quality detection methods are difficult to meet the needs of modern industrial production. For example, manual detection is inefficient, subjective, and difficult to ensure the accuracy and consistency of detection.

[0003] Therefore, the laser welding quality detection method based on machine vision came into being. Machine vision technology can obtain various information in the welding process in real time and accurately, such as the shape, position, size and welding defects of the weld. By analyzing and processing this information, a comprehensive evaluation of the welding quality can be achieved.

[0004] In one existing technology, the main implementation process includes: first, using the image acquisition system to obtain the welding speed information of the welding surface, combining the welding speed information, weld information and machine information corresponding to the image acquisition time point; extracting the welding speed characteristic index, weld characteristic index and machine evaluation index, and then obtaining the weld quality evaluation coefficient according to the welding speed characteristic index, weld characteristic index and machine evaluation index corresponding to the image acquisition time point, and executing the corresponding early warning prompt operation according to whether the weld quality evaluation coefficient is greater than the preset coefficient threshold.

[0005] However, although the prior art provides early warning based on the image features of welding results collected at different time points, it ignores the dynamics of the welding process and the characteristics of welding quality changes, does not perform weighted processing based on the welding stages at different times, and cannot accurately evaluate the welding quality based on the entire welding process. Summary of the invention

[0006] The present invention provides a laser welding quality detection method and device based on machine vision to solve the problems in the prior art of ignoring the dynamics of the welding process and the characteristics of welding quality changes, not performing weighted processing in combination with welding stages at different times, and being unable to accurately evaluate the welding quality based on the entire welding process.

[0007] In the first aspect, in order to solve the above technical problems, the present invention provides a laser welding quality detection method based on machine vision, comprising:

[0008] Acquire a welding surface image and welding process information; wherein the welding process information includes a first-stage welding time, a second-stage welding time, and a third-stage welding time;

[0009] Performing grayscale processing on the welding surface image to obtain a grayscale image of the welding area;

[0010] Dividing the welding area according to the grayscale image to obtain texture sub-blocks;

[0011] Performing feature analysis according to the texture sub-block to obtain texture features;

[0012] Perform frequency domain conversion according to the welding surface image to obtain a spectrum diagram;

[0013] Performing regional brightness analysis according to the spectrum diagram to obtain light intensity distribution characteristics;

[0014] Perform parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter;

[0015] A function is constructed according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function;

[0016] Performing a correction calculation according to the first quality assessment parameter and the weight adjustment function to obtain a second quality assessment parameter;

[0017] A judgment is made based on the second quality assessment parameter to obtain a welding quality acceptance judgment result.

[0018] In an implementation manner of the first aspect, performing feature analysis according to the texture sub-block to obtain the texture feature includes:

[0019] Extract pixels according to the texture sub-block to obtain pixel values ​​and the number of pixels in the region;

[0020] Calculate the grayscale gradient value of the pixel point according to the pixel value to obtain the grayscale gradient value of the pixel point;

[0021] Performing mean calculation based on the grayscale gradient values ​​of the pixels in the texture sub-block area to obtain a mean grayscale gradient value;

[0022] Perform variance calculation based on the grayscale gradient value of the pixel point and the mean of the grayscale gradient value to obtain the variance of the grayscale gradient value sequence;

[0023] Counting the pixel points whose grayscale gradient values ​​are the same as the preset grayscale gradient value to obtain the number of pixel points with a preset grayscale value threshold;

[0024] A relative probability is obtained by performing a proportional calculation based on the number of pixels in the area and the number of pixels at the preset gray value threshold;

[0025] Perform entropy analysis according to the relative probability to obtain the entropy value of the gray gradient value sequence;

[0026] A set construction is performed according to the variance of the grayscale gradient value sequence and the entropy value of the grayscale gradient value sequence to obtain a texture feature.

[0027] In an implementable manner of the first aspect, performing entropy analysis according to the relative probability to obtain an entropy value of a grayscale gradient value sequence includes:

[0028] The grayscale gradient value sequence entropy value is calculated by the following formula:

[0029]

[0030] in, Indicates i The entropy value of the gray gradient value sequence in the texture sub-block, Indicates the preset gray value threshold, Indicates i The gray gradient value of the texture sub-block is The relative probability of the pixel point i Indicates the number of pre-stored texture sub-blocks.

[0031] In an implementable manner of the first aspect, performing regional brightness analysis according to the spectrum diagram to obtain light intensity distribution characteristics includes:

[0032] Extract data according to the spectrum graph to obtain spectrum image data; wherein the spectrum image data includes the total area of ​​the low-frequency region in the spectrum graph, pixel coordinates, pixel grayscale values, and the number of pixels in the high-frequency region in the spectrum graph;

[0033] Calculate the brightness and energy according to the spectrum image data to obtain the average brightness of the low-frequency region, the average energy of the low-frequency region, the average brightness of the high-frequency region, and the average energy of the high-frequency region;

[0034] The light intensity distribution characteristics are obtained by performing a collective construction based on the average brightness of the low-frequency area, the average energy of the low-frequency area, the average brightness of the high-frequency area and the average energy of the high-frequency area.

[0035] In an implementable manner of the first aspect, the brightness and energy calculation is performed according to the spectrum image data to obtain the average brightness of the low-frequency region, the average energy of the low-frequency region, the average brightness of the high-frequency region, and the average energy of the high-frequency region, including:

[0036] The average brightness of the low-frequency area, the average energy of the low-frequency area, the average brightness of the high-frequency area, and the average energy of the high-frequency area are calculated by the following formula:

[0037]

[0038]

[0039]

[0040]

[0041] in, Indicates i The average brightness of the low-frequency area in the texture sub-block, Indicates i The total area of ​​the low-frequency region in the spectrum graph of the texture sub-block, Indicates i The low-frequency region of the texture sub-block Pixel gray value, Indicates i The pixel number of the low-frequency area in the texture sub-block, Indicates i The average energy of the low-frequency region in the texture sub-block, ( ) No. i The texture sub-block represents the low-frequency area Pixel coordinates, Indicates i The average brightness of the high-frequency area in the texture sub-block, Indicates i The number of pixels in the high-frequency region of the spectrum graph in the texture sub-block, Indicates i The high-frequency area of ​​the texture sub-block Pixel gray value, Indicates the pixel number in the high-frequency area, Indicates i The average energy of high-frequency regions in the texture sub-blocks, Indicates i The high-frequency area of ​​the texture sub-block Pixel coordinates, i Indicates the number of pre-stored texture sub-blocks.

[0042] In an implementable manner of the first aspect, performing parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter includes:

[0043] The first quality assessment parameter is calculated by the following formula:

[0044]

[0045] in, represents the first quality assessment parameter, Indicates the number of pre-stored texture sub-blocks, Indicates Texture features of texture sub-blocks, Indicates The light intensity distribution characteristics of each texture sub-block.

[0046] In an implementable manner of the first aspect, constructing a function according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function includes:

[0047] The weight adjustment function is calculated by the following formula:

[0048]

[0049] in, represents the weight adjustment function, represents a pre-stored normalization function, Indicates the duration of the first stage welding. Indicates the duration of the second stage welding. Indicates the duration of the third stage welding. Indicates the pre-stored first stage adjustment coefficient, Indicates the pre-stored second stage adjustment coefficient, Indicates the pre-stored third stage adjustment coefficient, Indicates the welding stage number, Indicates Stage welding time, No. Phase adjustment coefficient.

[0050] In an implementable manner of the first aspect, performing correction calculation according to the first quality assessment parameter and the weight adjustment function to obtain the second quality assessment parameter includes:

[0051] The second quality assessment parameter is calculated by the following formula:

[0052]

[0053] in, represents the second quality assessment parameter, Indicates the welding stage number, represents the first quality assessment parameter, Indicates Stage weight adjustment function.

[0054] In a second aspect, the present invention provides a laser welding quality detection device based on machine vision, comprising:

[0055] A data acquisition module, used to acquire a welding surface image and welding process information; wherein the welding process information includes a first-stage welding time, a second-stage welding time, and a third-stage welding time;

[0056] An image processing module, used for performing grayscale processing on the welding surface image to obtain a grayscale image of the welding area;

[0057] An image division module, used for dividing the welding area according to the grayscale image to obtain texture sub-blocks;

[0058] A feature analysis module, used for performing feature analysis according to the texture sub-block to obtain texture features;

[0059] An image conversion module, used for performing frequency domain conversion according to the welding surface image to obtain a spectrum diagram;

[0060] A brightness analysis module, used to perform regional brightness analysis based on the spectrum diagram to obtain light intensity distribution characteristics;

[0061] A parameter evaluation module, used to perform parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter;

[0062] A function construction module, used for constructing a function according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function;

[0063] A parameter correction module, used to perform correction calculation according to the first quality assessment parameter and the weight adjustment function to obtain a second quality assessment parameter;

[0064] The result judgment module is used to make a judgment based on the second quality evaluation parameter to obtain a welding quality qualification judgment result.

[0065] In an implementation manner of the second aspect, performing feature analysis according to the texture sub-block to obtain texture features includes:

[0066] Extract pixels according to the texture sub-block to obtain pixel values ​​and the number of pixels in the region;

[0067] Calculate the grayscale gradient value of the pixel point according to the pixel value to obtain the grayscale gradient value of the pixel point;

[0068] Performing mean calculation based on the grayscale gradient values ​​of the pixels in the texture sub-block area to obtain a mean grayscale gradient value;

[0069] Perform variance calculation based on the grayscale gradient value of the pixel point and the mean of the grayscale gradient value to obtain the variance of the grayscale gradient value sequence;

[0070] Counting the pixel points whose grayscale gradient values ​​are the same as the preset grayscale gradient value to obtain the number of pixel points with a preset grayscale value threshold;

[0071] A relative probability is obtained by performing a proportional calculation based on the number of pixels in the area and the number of pixels at the preset gray value threshold;

[0072] Perform entropy analysis according to the relative probability to obtain the entropy value of the gray gradient value sequence;

[0073] A set construction is performed according to the variance of the grayscale gradient value sequence and the entropy value of the grayscale gradient value sequence to obtain a texture feature.

[0074] In an implementable manner of the second aspect, performing entropy analysis according to the relative probability to obtain an entropy value of a grayscale gradient value sequence includes:

[0075] The grayscale gradient value sequence entropy value is calculated by the following formula:

[0076]

[0077] in, Indicates i The entropy value of the gray gradient value sequence in the texture sub-block, Indicates the preset gray value threshold, Indicates i The gray gradient value of the texture sub-block is The relative probability of the pixel point i Indicates the number of pre-stored texture sub-blocks.

[0078] In an implementable manner of the second aspect, performing regional brightness analysis according to the spectrum diagram to obtain light intensity distribution characteristics includes:

[0079] Extract data according to the spectrum graph to obtain spectrum image data; wherein the spectrum image data includes the total area of ​​the low-frequency region in the spectrum graph, pixel coordinates, pixel grayscale values, and the number of pixels in the high-frequency region in the spectrum graph;

[0080] Calculate the brightness and energy according to the spectrum image data to obtain the average brightness of the low-frequency region, the average energy of the low-frequency region, the average brightness of the high-frequency region, and the average energy of the high-frequency region;

[0081] The light intensity distribution characteristics are obtained by performing a collective construction based on the average brightness of the low-frequency area, the average energy of the low-frequency area, the average brightness of the high-frequency area and the average energy of the high-frequency area.

[0082] In an implementable manner of the second aspect, the brightness and energy calculation is performed according to the spectrum image data to obtain the average brightness of the low-frequency region, the average energy of the low-frequency region, the average brightness of the high-frequency region, and the average energy of the high-frequency region, including:

[0083] The average brightness of the low-frequency area, the average energy of the low-frequency area, the average brightness of the high-frequency area, and the average energy of the high-frequency area are calculated by the following formula:

[0084]

[0085]

[0086]

[0087]

[0088] in, Indicates i The average brightness of the low-frequency area in the texture sub-block, Indicates i The total area of ​​the low-frequency region in the spectrum graph of the texture sub-block, Indicates i The low-frequency region of the texture sub-block Pixel gray value, Indicates i The pixel number of the low-frequency area in the texture sub-block, Indicates i The average energy of the low-frequency region in the texture sub-block, ( ) No. i The texture sub-block represents the low-frequency area Pixel coordinates, Indicates i The average brightness of the high-frequency area in the texture sub-block, Indicates iThe number of pixels in the high-frequency region of the spectrum graph in the texture sub-block, Indicates i The high-frequency area of ​​the texture sub-block Pixel gray value, Indicates the pixel number in the high-frequency area, Indicates i The average energy of high-frequency regions in the texture sub-blocks, Indicates i The high-frequency area of ​​the texture sub-block Pixel coordinates, i Indicates the number of pre-stored texture sub-blocks.

[0089] In an implementable manner of the second aspect, performing parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter includes:

[0090] The first quality assessment parameter is calculated by the following formula:

[0091]

[0092] in, represents the first quality assessment parameter, Indicates the number of pre-stored texture sub-blocks, Indicates Texture features of texture sub-blocks, Indicates The light intensity distribution characteristics of each texture sub-block.

[0093] In an implementable manner of the second aspect, constructing a function according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function includes:

[0094] The weight adjustment function is calculated by the following formula:

[0095]

[0096] in, represents the weight adjustment function, represents a pre-stored normalization function, Indicates the duration of the first stage welding. Indicates the duration of the second stage welding. Indicates the duration of the third stage welding. Indicates the pre-stored first stage adjustment coefficient, Indicates the pre-stored second stage adjustment coefficient, Indicates the pre-stored third stage adjustment coefficient, Indicates the welding stage number, Indicates Stage welding time, No. Phase adjustment coefficient.

[0097] In an implementation manner of the second aspect, performing correction calculation according to the first quality evaluation parameter and the weight adjustment function to obtain the second quality evaluation parameter includes:

[0098] The second quality assessment parameter is calculated by the following formula:

[0099]

[0100] in, represents the second quality assessment parameter, Indicates the welding stage number, represents the first quality assessment parameter, Indicates Stage weight adjustment function.

[0101] In a third aspect, the present invention also provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements any one of the above-mentioned machine vision-based laser welding quality detection methods.

[0102] In a fourth aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned machine vision-based laser welding quality detection methods.

[0103] Compared with the prior art, the present invention has the following beneficial effects:

[0104] The invention discloses a laser welding quality detection method based on machine vision, comprising acquiring a welding surface image and welding process information; wherein the welding process information comprises a first-stage welding time, a second-stage welding time and a third-stage welding time; performing grayscale processing according to the welding surface image to obtain a welding area grayscale map; performing division according to the welding area grayscale map to obtain texture sub-blocks; performing feature analysis according to the texture sub-blocks to obtain texture features; performing frequency domain conversion according to the welding surface image to obtain a spectrum map; performing regional brightness analysis according to the spectrum map to obtain light intensity distribution features; performing parameter evaluation according to the texture features and the light intensity distribution features to obtain a first quality evaluation parameter; performing function construction according to the first-stage welding time, the second-stage welding time and the third-stage welding time to obtain a weight adjustment function; performing correction calculation according to the first quality evaluation parameter and the weight adjustment function to obtain a second quality evaluation parameter; performing judgment according to the second quality evaluation parameter to obtain a welding quality qualified judgment result. The present invention analyzes the texture features and light intensity distribution features of texture sub-blocks, and then calculates preliminary quality assessment parameters. A weight adjustment function constructed according to the preliminary quality assessment parameters combined with welding process information is used to perform weighted processing on welding stages at different times, thereby improving the accuracy of welding quality assessment. BRIEF DESCRIPTION OF THE DRAWINGS

[0105] Figure 1 It is a flow chart of a laser welding quality detection method based on machine vision provided by the first embodiment of the present invention;

[0106] Figure 2 It is a schematic diagram of the structure of a laser welding quality detection method device based on machine vision provided in the second embodiment of the present invention. DETAILED DESCRIPTION

[0107] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0108] Reference Figure 1 The first embodiment of the present invention provides a laser welding quality detection method based on machine vision, comprising the following steps:

[0109] S1, obtaining a welding surface image and welding process information; wherein the welding process information includes a first stage welding time, a second stage welding time and a third stage welding time;

[0110] S2, performing grayscale processing on the welding surface image to obtain a grayscale image of the welding area;

[0111] S3, dividing the welding area according to the grayscale image to obtain texture sub-blocks;

[0112] S4, performing feature analysis according to the texture sub-block to obtain texture features;

[0113] S5, performing frequency domain conversion according to the welding surface image to obtain a spectrum diagram;

[0114] S6, performing regional brightness analysis according to the spectrum diagram to obtain light intensity distribution characteristics;

[0115] S7, performing parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter;

[0116] S8, constructing a function according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function;

[0117] S9, performing correction calculation according to the first quality evaluation parameter and the weight adjustment function to obtain a second quality evaluation parameter;

[0118] S10, making a judgment based on the second quality evaluation parameter to obtain a welding quality qualification judgment result.

[0119] In step S1, a welding surface image and welding process information are obtained; wherein the welding process information includes a first-stage welding time, a second-stage welding time, and a third-stage welding time.

[0120] In a specific embodiment, the welding surface image is acquired by an image acquisition device. For example, a high-speed camera or an industrial camera has the characteristics of high frame rate and high resolution, and can quickly capture subtle changes in the surface during the welding process. For example, in the laser welding inspection of automobile body parts in automobile manufacturing, a high-speed camera can clearly record the moment of metal melting and solidification during the welding process, providing accurate image data for subsequent analysis. The welding process information is measured by the sensor according to the set time and acquired according to the timing of each stage of welding.

[0121] In step S2, grayscale processing is performed on the welding surface image to obtain a grayscale image of the welding area.

[0122] It should be noted that the welding surface image is obtained by using an image acquisition device (such as a high-speed camera or an industrial camera) to obtain a real-time image of the welding surface, and these images are all in color image format. In the laser welding process in the automotive, aviation and other industries, the camera captures the image of the welding area at a set frame rate and resolution. Then, the color image needs to be converted into a grayscale image. In actual operation, this conversion can be achieved using image processing software or related function libraries in programming languages. For example, in Python, the cv2.cvtColor() function of the OpenCV library can be used to convert a color image into a grayscale image. Its basic syntax is gray_image=cv2.cvtColor(color_image,cv2.COLOR_BGR2GRAY, where color_image is the input color image and gray_image is the output grayscale image.

[0123] In step S3, the welding area is divided according to the grayscale image to obtain texture sub-blocks.

[0124] It should be noted that the division according to the grayscale image of the welding area to obtain texture sub-blocks refers to dividing the grayscale image of the welding area according to a set size to obtain texture sub-blocks. In a specific embodiment, the relevant features of texture sub-blocks of different sizes are further calculated based on the change in the grayscale value difference of the welding area and the grayscale value change threshold corresponding to the welding area. Exemplarily, the regional segmentation technology in the image processing algorithm can be used to divide the image into multiple non-overlapping texture sub-blocks according to the continuity and difference of the grayscale value, so that the pixels in each sub-block have a certain correlation and consistency, thereby better reflecting the local texture features.

[0125] In step S4, feature analysis is performed according to the texture sub-block to obtain texture features, which specifically includes the following steps:

[0126] S41, extracting pixels according to the texture sub-block to obtain pixel values ​​and the number of pixels in the region.

[0127] For example, taking the OpenCV library in Python as an example, first read the grayscale image of the welding surface through the cv2.imread() function and store it as a multidimensional array. For the divided texture sub-blocks, the pixel value of each pixel can be obtained by indexing the array. image is the read grayscale image, texture_block is a texture sub-block (which can be obtained through image segmentation operation), then you can use a statement like pixel_value = texture_block[i][j] to get the pixel value of the pixel with coordinates (i, j) in the texture sub-block, where i and j are the row and column indexes of the pixel in the texture sub-block, respectively. By traversing the rows and columns of the entire texture sub-block, the pixel values ​​of all pixels can be obtained. At the same time, by calculating the number of rows and columns of the texture sub-block, the number of pixels in the area can be obtained.

[0128] S42, calculating the grayscale gradient value according to the pixel value of the pixel point to obtain the grayscale gradient value of the pixel point.

[0129] In one feasible manner, a grayscale gradient value is calculated based on the pixel value to obtain the pixel grayscale gradient value, specifically including: performing Python algorithm analysis based on the pixel value to obtain the pixel grayscale value, summing and averaging the pixel grayscale values ​​in the texture sub-block area to obtain the mean pixel grayscale value; subtracting all the pixel grayscale values ​​from the pixel grayscale value mean one by one to obtain the pixel grayscale deviation value; and performing square root calculation based on the pixel grayscale deviation value to obtain the pixel grayscale gradient value.

[0130] S43, performing mean calculation according to the grayscale gradient values ​​of the pixels in the texture sub-block area to obtain a grayscale gradient value mean.

[0131] In a specific embodiment, the grayscale gradient values ​​of the pixels in the texture sub-block area are summed and then divided by the number of pixels in the area to obtain the average grayscale gradient value.

[0132] S44, performing variance calculation based on the grayscale gradient value of the pixel point and the grayscale gradient value mean to obtain the variance of the grayscale gradient value sequence.

[0133] It should be noted that the gray gradient value sequence variance is calculated by the following formula:

[0134]

[0135] in, represents the variance of the gray gradient value sequence, Indicates the number of pixels in the area, Indicates The grayscale gradient value of the pixel point, Represents the mean grayscale gradient value.

[0136] S45, counting the pixel points whose grayscale gradient values ​​are the same as the preset grayscale gradient values ​​to obtain the number of pixel points with a preset grayscale value threshold.

[0137] It should be noted that the preset grayscale gradient value is set according to demand, and the user can determine it according to the preset value range, the characteristics of the welding process and previous experience data. In the welding inspection of aircraft engine blades, due to its extremely high requirements for welding quality, a value range suitable for the welding scenario will be determined based on a large number of experiments and data analysis, and then a suitable value will be selected within this range for subsequent entropy calculation to accurately evaluate the welding quality.

[0138] S46, performing a ratio calculation based on the number of pixels in the area and the number of pixels at the preset gray value threshold to obtain a relative probability.

[0139] It is worth noting that by calculating the relative probability between the grayscale gradient value of the pixel point in the texture sub-block and the preset grayscale gradient value threshold, the distribution of the grayscale value in the texture sub-block can be reflected, and the relative probability can be further used for entropy analysis.

[0140] S48, performing entropy analysis according to the relative probability to obtain an entropy value of the grayscale gradient value sequence.

[0141] It should be noted that the grayscale gradient value sequence entropy value is calculated by the following formula:

[0142]

[0143] in, Indicates i The entropy value of the gray gradient value sequence in the texture sub-block, Indicates the preset gray value threshold, Indicates i The gray gradient value of the texture sub-block is The relative probability of the pixel point i Indicates the number of pre-stored texture sub-blocks.

[0144] The formula used in this embodiment is to statistically analyze the grayscale gradient values ​​of all pixels in the texture sub-block, classify the pixels with the same or similar grayscale gradient values ​​into one category, and calculate the proportion of each category of pixels in the entire texture sub-block. The entropy value is obtained by multiplying the corresponding logarithm and summing it to get the negative value. In the laser welding quality inspection based on machine vision, the entropy value can reflect the uniformity of the grayscale value in the texture sub-block of the corresponding size, thus providing an important basis for evaluating the welding quality.

[0145] S49, performing set construction according to the grayscale gradient value sequence variance and the grayscale gradient value sequence entropy value to obtain texture features.

[0146] It should be noted that the variance of the grayscale gradient value sequence can reflect the amplitude of the grayscale value change in the entire texture sub-block; the entropy value of the grayscale gradient value sequence mainly reflects the uniformity or degree of chaos of the grayscale value in the texture sub-block of the corresponding size. In this embodiment, the variance and entropy value of the grayscale gradient value sequence are important indicators that reflect the texture characteristics of the welding surface from different angles. The two complement each other and together constitute the texture characteristics. Exemplarily, different weights can be assigned to the variance and entropy values ​​according to the characteristics and experience of the welding process, and then the weighted sum is calculated as the value of the texture feature.

[0147] In step S5, frequency domain conversion is performed according to the welding surface image to obtain a spectrum diagram.

[0148] In a specific embodiment, the frequency domain conversion is performed according to the welding surface image to obtain a spectrum diagram, and Fourier transform is specifically used to realize the conversion from the spatial domain to the frequency domain. Exemplarily, a related function library in an image processing software or programming language can be used. Taking Python as an example, using numpy and cv2 libraries, the welding surface image is first read, and the image is stored as image. The image is discretely Fourier transformed by the cv2.dft() function to obtain frequency domain data. Then, the amplitude information of the spectrum diagram is calculated using the cv2.magnitude() function to obtain the spectrum diagram.

[0149] In step S6, regional brightness analysis is performed based on the spectrum diagram to obtain light intensity distribution characteristics.

[0150] In the above step S6, the regional brightness analysis is performed according to the spectrum diagram to obtain the light intensity distribution characteristics, which specifically includes the following steps:

[0151] S61, extracting data according to the spectrum graph to obtain spectrum image data; wherein the spectrum image data includes the total area of ​​the low-frequency region in the spectrum graph, pixel coordinates, pixel grayscale values ​​and the number of pixels in the high-frequency region in the spectrum graph.

[0152] It should be noted that the process of obtaining the total area of ​​the low-frequency region in the spectrum diagram includes: determining the coordinates of the upper left corner and the lower right corner of the low-frequency region; according to the coordinates of the upper left corner and the lower right corner, using the formula The total area of ​​the low-frequency region in the spectrum graph is calculated. The pixel coordinates, the pixel grayscale values ​​and the number of pixels in the high-frequency region of the spectrum graph can be directly obtained by direct indexing using a Python algorithm.

[0153] S62, performing brightness and energy calculation according to the spectrum image data to obtain average brightness in the low-frequency region, average energy in the low-frequency region, average brightness in the high-frequency region, and average energy in the high-frequency region.

[0154] It should be noted that the average brightness of the low-frequency area, the average energy of the low-frequency area, the average brightness of the high-frequency area, and the average energy of the high-frequency area are calculated by the following formula:

[0155]

[0156]

[0157]

[0158]

[0159] in, Indicates i The average brightness of the low-frequency area in the texture sub-block, Indicates i The total area of ​​the low-frequency region in the spectrum graph of the texture sub-block, Indicates i The low-frequency region of the texture sub-block Pixel gray value, Indicates i The pixel number of the low-frequency area in the texture sub-block, Indicates i The average energy of the low-frequency region in the texture sub-block, ( ) No. i The texture sub-block represents the low-frequency area Pixel coordinates, Indicates i The average brightness of the high-frequency area in the texture sub-block, Indicates i The number of pixels in the high-frequency region of the spectrum graph in the texture sub-block, Indicates i The high-frequency area of ​​the texture sub-block Pixel gray value, Indicates the pixel number in the high-frequency area, Indicates i The average energy of high-frequency regions in the texture sub-blocks, Indicates i The high-frequency area of ​​the texture sub-block Pixel coordinates, i Indicates the number of pre-stored texture sub-blocks.

[0160] It is worth noting that the average brightness of the low-frequency area refers to the average value of the grayscale values ​​of all pixels in the low-frequency area of ​​the spectrum diagram. During the welding process, the larger the area affected by the welding heat on the welding surface, the more uniform the energy distribution in the area is, which is reflected in the spectrum diagram. There are more spectrum points in the corresponding low-frequency area. At this time, the average brightness value of the low-frequency area obtained is relatively large, which reflects the overall brightness level of the welding area and the uniformity of energy distribution.

[0161] In this embodiment, the calculation of the average energy in the low-frequency region is based on the coordinates and grayscale values ​​of the pixels in the low-frequency region. It comprehensively considers the position and grayscale intensity information of the pixels in the image, and its value reflects the concentration and distribution of energy in the low-frequency region.

[0162] In this embodiment, the high-frequency region average brightness is the average value of the grayscale values ​​of the pixels in the high-frequency region of the spectrum diagram. The high-frequency region contains the details and texture information of the welding surface, and its average brightness reflects the brightness characteristics of these details.

[0163] In this embodiment, the high-frequency region average energy is calculated based on the coordinates and grayscale values ​​of the pixels in the high-frequency region, which reflects the energy distribution in the high-frequency region. Combined with the high-frequency region average brightness, the energy and brightness characteristics of the detailed parts of the welding surface can be more comprehensively described.

[0164] S63, performing collective construction according to the average brightness of the low-frequency region, the average energy of the low-frequency region, the average brightness of the high-frequency region and the average energy of the high-frequency region to obtain light intensity distribution characteristics.

[0165] It should be noted that the light intensity distribution feature is a set of numbers constructed by the set of average brightness in the low-frequency region, average energy in the low-frequency region, average brightness in the high-frequency region, and average energy in the high-frequency region, and is an important indicator reflecting the energy and brightness distribution of the welding surface. Exemplarily, the light intensity distribution feature can be determined by linear combination and weighted summation of average brightness in the low-frequency region, average energy in the low-frequency region, average brightness in the high-frequency region, and average energy in the high-frequency region based on a large amount of experimental experience and data analysis. The purpose is to comprehensively reflect the light intensity distribution of the welding surface through these parameters, and then use them for welding quality assessment.

[0166] In step S7, parameter evaluation is performed according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter.

[0167] It should be noted that the first quality assessment parameter is calculated by the following formula:

[0168]

[0169] in, represents the first quality assessment parameter, Indicates the number of pre-stored texture sub-blocks, Indicates Texture features of texture sub-blocks, Indicates The light intensity distribution characteristics of each texture sub-block.

[0170] In this embodiment, the first quality assessment parameter refers to a preliminary quality assessment parameter obtained by performing feature analysis on texture features and light intensity distribution features of texture sub-blocks obtained by dividing the collected welding surface image.

[0171] In step S8, a function is constructed according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function.

[0172] It should be noted that the weight adjustment function is calculated by the following formula:

[0173]

[0174] in, represents the weight adjustment function, represents a pre-stored normalization function, Indicates the duration of the first stage welding. Indicates the duration of the second stage welding. Indicates the duration of the third stage welding. Indicates the pre-stored first stage adjustment coefficient, Indicates the pre-stored second stage adjustment coefficient, Indicates the pre-stored third stage adjustment coefficient, Indicates the welding stage number, Indicates Stage welding time, No. Phase adjustment coefficient.

[0175] It is worth noting that the weight adjustment function dynamically adjusts the weights of the quality assessment parameters according to the time progress of the welding process and the characteristics of different welding stages, so as to more accurately reflect the actual situation of the welding quality.

[0176] In this embodiment, the normalization function refers to the adjustment of the results of the weight adjustment function by performing complex operations on the numerator and denominator to meet the requirement that the sum of the weights is 1. For example, there is a set of data , normalization function It can be converted to , so that .

[0177] In this embodiment, the adjustment coefficient is determined by monitoring the welding process and dividing the welding process into stages, and then the adjustment coefficient is calculated according to the time parameters of the stage. As welding progresses , the time ratio relative to the initial welding period can be calculated as part of the adjustment coefficient. When approaching , indicating that it is in the initial stage of welding. At this time, the weight adjustment coefficient is relatively large. Because the welding quality of the welding surface is not greatly affected by the welding heat in the initial stage of welding, a higher weight should be given.

[0178] In step S9, a correction calculation is performed according to the first quality evaluation parameter and the weight adjustment function to obtain a second quality evaluation parameter.

[0179] It should be noted that the second quality assessment parameter is calculated by the following formula:

[0180]

[0181] in, represents the second quality assessment parameter, Indicates the welding stage number, represents the first quality assessment parameter, Indicates Stage weight adjustment function.

[0182] It is worth noting that the second quality assessment parameter refers to a more accurate quality assessment parameter obtained by weighting the first quality assessment parameter calculated initially at each stage through a weight adjustment function.

[0183] S10, making a judgment based on the second quality evaluation parameter to obtain a welding quality qualification judgment result.

[0184] In an achievable manner, the determination according to the second quality assessment parameter to obtain a qualified welding quality determination result includes: comparing and determining the second quality assessment parameter with a preset quality assessment parameter threshold range; when the second quality assessment parameter is within the preset quality assessment parameter threshold, determining that the welding quality is qualified; otherwise, determining that the welding quality is unqualified. The preset quality assessment parameter threshold range is analyzed through a large amount of experimental data and stored in a data storage module.

[0185] In summary, the present invention discloses a laser welding quality detection method based on machine vision, including obtaining a welding surface image and welding process information; wherein the welding process information includes the first stage welding time, the second stage welding time and the third stage welding time; graying the welding surface image to obtain a welding area grayscale map; dividing the welding area grayscale map to obtain texture sub-blocks; performing feature analysis on the texture sub-blocks to obtain texture features; performing frequency domain conversion on the welding surface image to obtain a spectrum map; performing regional brightness analysis on the spectrum map to obtain light intensity distribution features; performing parameter evaluation on the texture features and the light intensity distribution features to obtain a first quality evaluation parameter; constructing a function on the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function; performing correction calculation on the first quality evaluation parameter and the weight adjustment function to obtain a second quality evaluation parameter; judging on the second quality evaluation parameter to obtain a welding quality qualified judgment result. The present invention analyzes the texture features and light intensity distribution features of texture sub-blocks, and then calculates preliminary quality assessment parameters. A weight adjustment function constructed according to the preliminary quality assessment parameters combined with welding process information is used to perform weighted processing on welding stages at different times, thereby improving the accuracy of welding quality assessment.

[0186] Reference Figure 2 The second embodiment of the present invention provides a laser welding quality detection device based on machine vision, comprising:

[0187] The data acquisition module 101 is used to acquire the welding surface image and welding process information; wherein the welding process information includes the first stage welding time, the second stage welding time and the third stage welding time;

[0188] An image processing module 102 is used to perform grayscale processing on the welding surface image to obtain a grayscale image of the welding area;

[0189] An image division module 103 is used to divide the welding area according to the grayscale image to obtain texture sub-blocks;

[0190] A feature analysis module 104, configured to perform feature analysis based on the texture sub-block to obtain texture features;

[0191] An image conversion module 105 is used to perform frequency domain conversion according to the welding surface image to obtain a spectrum diagram;

[0192] A brightness analysis module 106, configured to perform regional brightness analysis according to the spectrum diagram to obtain light intensity distribution characteristics;

[0193] A parameter evaluation module 107, configured to perform parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter;

[0194] A function construction module 108, configured to construct a function according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function;

[0195] A parameter correction module 109, configured to perform correction calculation according to the first quality assessment parameter and the weight adjustment function to obtain a second quality assessment parameter;

[0196] The result judgment module 110 is used to make a judgment based on the second quality evaluation parameter to obtain a welding quality qualification judgment result.

[0197] It should be noted that a laser welding quality inspection device based on machine vision provided in an embodiment of the present invention is used to execute all the process steps of a laser welding quality inspection method based on machine vision in the above-mentioned embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be elaborated on.

[0198] An embodiment of the present invention further provides an electronic device. The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a laser welding quality detection program based on machine vision. When the processor executes the computer program, the steps in the above-mentioned laser welding quality detection method embodiments based on machine vision are implemented, such as Figure 1 Alternatively, when the processor executes the computer program, the functions of the modules / units in the above-mentioned device embodiments are realized, such as the data acquisition module.

[0199] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the electronic device.

[0200] The electronic device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than the above components, or may combine certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0201] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device.

[0202] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the electronic device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0203] Wherein, if the module / unit integrated in the electronic device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0204] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0205] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A laser welding quality detection method based on machine vision, characterized in that: Executed by a computer, including: Acquire a welding surface image and welding process information; wherein the welding process information includes a first-stage welding time, a second-stage welding time, and a third-stage welding time; Performing grayscale processing on the welding surface image to obtain a grayscale image of the welding area; Dividing the welding area according to the grayscale image to obtain texture sub-blocks; Performing feature analysis according to the texture sub-block to obtain texture features; Perform frequency domain conversion according to the welding surface image to obtain a spectrum diagram; Performing regional brightness analysis according to the spectrum diagram to obtain light intensity distribution characteristics; Perform parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter; A function is constructed according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function; Performing a correction calculation according to the first quality assessment parameter and the weight adjustment function to obtain a second quality assessment parameter; Making a judgment based on the second quality assessment parameter to obtain a welding quality qualification judgment result; The performing of regional brightness analysis according to the spectrum diagram to obtain light intensity distribution characteristics includes: Extract data according to the spectrum graph to obtain spectrum image data; wherein the spectrum image data includes the total area of ​​the low-frequency region in the spectrum graph, pixel coordinates, pixel grayscale values, and the number of pixels in the high-frequency region in the spectrum graph; Calculate the brightness and energy according to the spectrum image data to obtain the average brightness of the low-frequency region, the average energy of the low-frequency region, the average brightness of the high-frequency region, and the average energy of the high-frequency region; The light intensity distribution characteristics are obtained by performing a collective construction based on the average brightness of the low-frequency area, the average energy of the low-frequency area, the average brightness of the high-frequency area and the average energy of the high-frequency area.

2. The laser welding quality detection method based on machine vision according to claim 1 is characterized in that: The performing feature analysis according to the texture sub-block to obtain texture features includes: Extract pixels according to the texture sub-block to obtain pixel values ​​and the number of pixels in the region; Calculate the grayscale gradient value of the pixel point according to the pixel value to obtain the grayscale gradient value of the pixel point; Performing mean calculation based on the grayscale gradient values ​​of the pixels in the texture sub-block area to obtain a mean grayscale gradient value; Perform variance calculation based on the grayscale gradient value of the pixel point and the mean of the grayscale gradient value to obtain the variance of the grayscale gradient value sequence; Counting the pixel points whose grayscale gradient values ​​are the same as the preset grayscale gradient value to obtain the number of pixel points with a preset grayscale value threshold; A relative probability is obtained by performing a proportional calculation based on the number of pixels in the area and the number of pixels at the preset gray value threshold; Perform entropy analysis according to the relative probability to obtain the entropy value of the gray gradient value sequence; A set construction is performed according to the variance of the grayscale gradient value sequence and the entropy value of the grayscale gradient value sequence to obtain a texture feature.

3. The laser welding quality detection method based on machine vision according to claim 2 is characterized in that: The entropy analysis is performed according to the relative probability to obtain the entropy value of the gray gradient value sequence, including: The grayscale gradient value sequence entropy value is calculated by the following formula: in, Indicates i The entropy value of the gray gradient value sequence in the texture sub-block, Indicates the preset gray value threshold, Indicates i The grayscale gradient value of the texture sub-block is The relative probability of the pixel point i Indicates the number of pre-stored texture sub-blocks.

4. The laser welding quality detection method based on machine vision according to claim 1 is characterized in that: The brightness and energy calculation is performed according to the spectrum image data to obtain the average brightness of the low-frequency area, the average energy of the low-frequency area, the average brightness of the high-frequency area and the average energy of the high-frequency area, including: The average brightness of the low-frequency area, the average energy of the low-frequency area, the average brightness of the high-frequency area, and the average energy of the high-frequency area are calculated by the following formula: in, Indicates i The average brightness of the low-frequency area in the texture sub-block, Indicates i The total area of ​​the low-frequency region in the spectrum graph of the texture sub-block, Indicates i The low-frequency region of the texture sub-block Pixel gray value, Indicates i The pixel number of the low-frequency area in the texture sub-block, Indicates i The average energy of the low-frequency region in the texture sub-block, ( ) No. i The texture sub-block represents the low-frequency area Pixel coordinates, Indicates i The average brightness of the high-frequency area in the texture sub-block, Indicates i The number of pixels in the high-frequency region of the spectrum graph in the texture sub-block, Indicates i The high-frequency area of ​​the texture sub-block Pixel gray value, Indicates the pixel number in the high-frequency area, Indicates i The average energy of high-frequency regions in the texture sub-blocks, Indicates i The high-frequency area of ​​the texture sub-block Pixel coordinates, i Indicates the number of pre-stored texture sub-blocks.

5. The laser welding quality detection method based on machine vision according to claim 2 is characterized in that: The performing parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter includes: The first quality assessment parameter is calculated by the following formula: in, represents the first quality assessment parameter, Indicates the number of pre-stored texture sub-blocks, Indicates Texture features of texture sub-blocks, Indicates The light intensity distribution characteristics of each texture sub-block.

6. The laser welding quality detection method based on machine vision according to claim 5 is characterized in that: The function is constructed according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function, including: The weight adjustment function is calculated by the following formula: in, represents the weight adjustment function, represents a pre-stored normalization function, Indicates the duration of the first stage welding. Indicates the duration of the second stage welding. Indicates the duration of the third stage welding. Indicates the pre-stored first stage adjustment coefficient, Indicates the pre-stored second stage adjustment coefficient, Indicates the third stage adjustment coefficient stored in advance, Indicates the welding stage number, Indicates Stage welding time, No. Phase adjustment coefficient.

7. The laser welding quality detection method based on machine vision according to claim 6 is characterized in that: The performing correction calculation according to the first quality evaluation parameter and the weight adjustment function to obtain the second quality evaluation parameter includes: The second quality assessment parameter is calculated by the following formula: in, represents the second quality assessment parameter, Indicates the welding stage number, represents the first quality assessment parameter, Indicates Stage weight adjustment function.

8. A laser welding quality detection method and device based on machine vision, characterized in that: A method for detecting laser welding quality based on machine vision according to any one of claims 1 to 7, comprising: A data acquisition module, used to acquire a welding surface image and welding process information; wherein the welding process information includes a first-stage welding time, a second-stage welding time, and a third-stage welding time; An image processing module, used for performing grayscale processing on the welding surface image to obtain a grayscale image of the welding area; An image division module, used for dividing the welding area according to the grayscale image to obtain texture sub-blocks; A feature analysis module, used for performing feature analysis according to the texture sub-block to obtain texture features; An image conversion module, used for performing frequency domain conversion according to the welding surface image to obtain a spectrum diagram; A brightness analysis module, used to perform regional brightness analysis based on the spectrum diagram to obtain light intensity distribution characteristics; A parameter evaluation module, used to perform parameter evaluation according to the texture feature and the light intensity distribution feature to obtain a first quality evaluation parameter; A function construction module, used for constructing a function according to the first stage welding time, the second stage welding time and the third stage welding time to obtain a weight adjustment function; A parameter correction module, used to perform correction calculation according to the first quality assessment parameter and the weight adjustment function to obtain a second quality assessment parameter; The result judgment module is used to make a judgment based on the second quality evaluation parameter to obtain a welding quality qualification judgment result.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the machine vision-based laser welding quality detection method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and apparatus for monitoring weld quality

    CN102596476A

  • Detection method, system and equipment for intelligent welding of pipe pile splicing and medium

    CN119559382A