Laser Welding Defect Recognition Method for Injection Molding Pipe Fittings Based on Image Processing

Through the image processing method, the degree of deviation between the main texture direction and the welding direction in the laser welding image of injection molded pipe fittings and the degree of coincidence of the grayscale value distribution curve is analyzed, and the degree of abnormality is calculated in combination with the mutual information entropy, which solves the problem of low accuracy in local areas of traditional detection methods, and realizes the automation and accurate identification of welding defects.

CN119963558BActive Publication Date: 2025-06-13JIANGYIN PIVOT AUTOMOTIVE PROD CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The traditional laser welding quality detection method for injection molded pipe fittings has a problem of low reliability in local areas, which makes it difficult to effectively identify welding defects.

Method used

Using an image processing method, by collecting multiple historical images and current images, dividing them into multiple target images, the degree of deviation between the main direction of the texture and the welding direction is obtained, and the degree of abnormality of the target image is calculated based on the coincidence degree of the gray value distribution curve and mutual information entropy. If the degree of abnormality is lower than the set threshold, it is determined that there is a welding defect.

Benefits of technology

It realizes automated and accurate identification of welding defects during laser welding of injection molded pipe fittings, improves detection efficiency and accuracy, and avoids the complexity of manual intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119963558B_ABST
    Figure CN119963558B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of image data processing, and specifically relates to a method for identifying laser welding defects of injection-molded pipe fittings based on image processing, including: collecting multiple historical images and current images of laser welding of injection-molded pipe fittings, dividing the images into multiple target images, and labeling the target images in the historical images; calculating the deviation degree of the texture main direction of each target image from the welding direction, and comparing the similarity of the deviation degrees; calculating the coincidence degree of the target images in the current image with the gray histogram curve of the historical images, and combining it with the mutual information entropy of the labels to evaluate the image similarity and coincidence degree; calculating the abnormality degree of each target image in the current image, and in response to the target image with the abnormality degree less than the set threshold being a welding defect. The present invention solves the problem that the reliability of the traditional detection method in the local area is still not high in terms of accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image data processing. More specifically, the present invention relates to a method for identifying laser welding defects of injection-molded pipe fittings based on image processing. Background Art

[0002] In the manufacturing process of injection-molded pipe fittings, laser welding, as an efficient, precise, and highly automated connection process, is widely used in the assembly and sealing of plastic pipe fittings. However, the quality of welding directly affects the mechanical properties, sealing performance, and long-term use reliability of the product. If there are problems with the welding quality, such as defects like lack of fusion, burn-through, porosity, cracks, etc., it may cause leakage, fracture, or a decrease in mechanical strength of the pipe fittings during pressure bearing or long-term use, thus affecting the safety and service life of the product. Therefore, effectively detecting the laser welding quality of injection-molded pipe fittings, timely discovering welding defects, and taking corresponding quality control measures are of great significance for improving product quality, reducing production losses, and ensuring product safety.

[0003] Traditional welding quality detection methods mainly rely on manual visual inspection or non-destructive testing means such as ultrasonic testing, X-ray testing, and thermal imaging testing. Although manual inspection is intuitive, it is easily affected by factors such as the experience of inspectors and visual fatigue, resulting in subjective misjudgment, low detection efficiency, and difficulty in achieving batch automation detection. While non-destructive testing technologies can provide relatively high detection accuracy, their equipment costs are high, the detection processes are complex, and some methods (such as X-ray testing) may involve radiation safety issues and are not suitable for real-time detection on the production line. In addition, due to the certain curved surface characteristics of injection-molded pipe fittings themselves, problems such as reflective interference, uneven weld seams, and complex heat-affected zones may be introduced during the laser welding process, making the detection accuracy of traditional non-destructive testing methods still insufficient in local areas.

[0004] The existing welding quality detection methods mainly rely on manual visual inspection or non-destructive testing technologies. However, manual inspection is easily affected by the experience of inspectors and visual fatigue, resulting in misjudgment and difficulty in achieving batch automation; although non-destructive testing technologies provide relatively high accuracy, their equipment costs are high, the processes are complex, and they are not suitable for real-time application on the production line, resulting in the problem that the reliability of the accuracy of traditional detection methods in local areas is still not high. Summary of the Invention

[0005] To solve the problem that the accuracy of traditional detection methods in local areas still has low reliability as mentioned in the above background art, the present invention provides the following solutions.

[0006] The present invention provides an injection molded pipe laser welding defect recognition method based on image processing, comprising: collecting multiple historical images and a current image of injection molded pipe laser welding, dividing any one of the multiple historical images and the current image into multiple target images, and obtaining a label of each target image; obtaining a texture main direction and a welding direction of each target image; taking the average of the absolute values ​​of the difference between the texture main direction and the welding direction of each target image in all historical images as a first deviation degree, taking the absolute value of the difference between the texture main direction and the welding direction of each target image in the current image as a second deviation degree; obtaining the similarity between the first deviation degree and the second deviation degree; calculating the difference between the texture main direction and the welding direction of each target image in the current image; obtaining the similarity between the first deviation degree and the second deviation degree; calculating the difference between the texture main direction and the welding direction of each target image in the current image; obtaining the similarity between the first deviation degree and the second deviation degree; obtaining the difference between the texture main direction and the welding direction of each target image in the historical images; obtaining the similarity between the texture main direction and the welding direction of each target image in the current image ... The target image and all the history images The overlap of the gray value distribution curves of the target images :

[0007] ;

[0008] The current image The target image and The historical image The gray value distribution curve of the target image Divergence, is the total number of historical images, The natural constant An exponential function with base ; obtaining the mutual information entropy of similarity, overlap and label respectively; calculating the abnormality degree of each target image in the current image, wherein the abnormality degree is inversely correlated with the mutual information entropy of similarity and label, and the mutual information entropy of overlap and label; responding to a target image whose abnormality degree is less than a set threshold value as having a welding defect.

[0009] The technical solution of the present invention can effectively identify and judge the welding defects that may exist in the laser welding process of injection molded pipes by comprehensively analyzing the deviation between the main direction of the target image texture and the welding direction in the historical image and the current image, as well as the overlap of the grayscale histogram curve of the target image, and combining the similarity and overlap with the mutual information entropy calculation of the label. By calculating the abnormality degree of the target image and accurately identifying defects in response to the abnormality degree being lower than the set threshold, the complexity of manual intervention is avoided, the automatic detection and early warning of welding defects are realized, and the detection efficiency and accuracy are improved.

[0010] Further, calculate the first The abnormality of the target image :

[0011] ;

[0012] In the formula, is the similarity between the second deviation degree of the th target image in the current image and the first deviation degree, is the coincidence degree of the gray value distribution curves of the th target image in the current image and the th target image among all historical images, is the label of the th target image in the current image, is the normalization function, is the mutual information entropy function.

[0013] The technical solution of the present invention effectively integrates the similarity and coincidence degree information by introducing the combined calculation of mutual information entropy and normalization function, so as to more accurately quantify the abnormality degree of each target image in the current image. Through the comprehensive analysis of the first deviation degree, the second deviation degree and the gray histogram coincidence degree, the subtle changes in the image can be efficiently identified, so as to accurately judge the existence of welding defects. By using the function of the normalization function, the extreme value problem in the calculation process is avoided, making the anomaly detection more stable and reliable. In addition, through the application of mutual information entropy, the correlation between the target image and the label can be better captured, thereby improving the accuracy and sensitivity of defect detection, realizing the automatic and accurate identification of welding defects, and greatly improving the detection efficiency and quality control level.

[0014] Further, the main texture direction is specifically: performing a two-dimensional Fourier transform on the target image and obtaining a spectrogram; in the spectrogram, converting the high-frequency region to the polar coordinate system, statistically analyzing the energy distribution in different angular directions, and selecting the direction with the maximum energy as the main texture direction of the target image.

[0015] Further, the welding direction is specifically: performing edge detection on the target image, extracting the weld contour, and performing line fitting based on the Hough transform, and taking the direction of the fitted line as the welding direction.

[0016] Further, the label is divided into 0 or 1, where 0 represents a defect and 1 represents no defect.

[0017] The technical solution of the present invention provides a simple and clear classification standard by clearly dividing tags into 0 and 1, representing defects and non-defects respectively. The use of such binary classification tags simplifies the anomaly detection and defect recognition processes, facilitating quick and efficient judgment in data processing and analysis. By combining with the analysis of the anomaly degree and similarity of images, the target images can be accurately classified as defective or non-defective, further enhancing the automation level and reliability of the detection system. Such tag setting not only enhances the discrimination ability of the system but also helps to achieve precise quality control and fault warning in practical applications, thus effectively improving production efficiency and product quality.

[0018] Further, the similarity is obtained as follows:

[0019] ;

[0020] In the formula, is the similarity between the first deviation degree and the second deviation degree, is the first deviation degree, is the second deviation degree, is the exponential function with the natural constant as the base.

[0021] The technical solution of the present invention can achieve a smooth transition in which the similarity gradually decreases as the deviation degree increases by using an exponential function to calculate the similarity between the first deviation degree and the second deviation degree. The form of exponential decay ensures that when the deviation is large, the similarity decreases rapidly, while when the deviation is small, the similarity remains high, avoiding the neglect of subtle differences. Through this similarity calculation, the detailed differences between the target image and the historical image can be effectively captured, further enhancing the accuracy and robustness of defect detection, thus providing strong support for automated quality control.

[0022] Further, any image is divided into multiple target images, including evenly dividing the any image to obtain multiple target images of the same size.

[0023] The technical solution of the present invention effectively refines the analysis scope of the image by evenly dividing any image into multiple target images of the same size, enabling each target image to focus on presenting local features. This segmentation method improves the recognition ability of subtle defects in the image and avoids information loss or interference that may be caused by global analysis. Through this localized processing method, the anomalies in each part of the image can be captured more precisely, optimizing the accuracy and reliability of defect detection. In addition, the even division processing also improves the calculation efficiency, further supporting the real-time and high-efficiency performance of automated detection in practical applications while maintaining high-quality detection.

[0024] Further, it is beneficial to use a CCD camera or a CMOS camera to collect multiple historical images and current images of the laser welding of injection-molded pipe fittings.

[0025] Further, it also includes performing grayscale conversion and median filtering on the multiple historical images and current images of the laser welding of the injection-molded pipe fittings.

[0026] Further, the set threshold is 0.5.

[0027] The beneficial effects of the present invention are as follows:

[0028] By precisely analyzing and processing the laser welding images of injection-molded pipe fittings, and combining the deviation degree between the main texture direction and the welding direction, the coincidence degree of the image grayscale histogram, and the mutual information entropy, the present invention can effectively identify possible defects during the welding process. By dividing the image into multiple target images, calculating the abnormality degree of each target image respectively, and judging the defects in combination with the set threshold, the accuracy and reliability of defect detection are greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flowchart schematically showing a method for identifying defects in laser welding of injection-molded pipe fittings based on image processing according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0030] An embodiment of a method for identifying defects in laser welding of injection-molded pipe fittings based on image processing.

[0031] As Figure 1 shown, the flowchart of the method for identifying defects in laser welding of injection-molded pipe fittings based on image processing according to an embodiment of the present invention includes the following steps:

[0032] S1: Collect historical images and current images of the laser welding of injection-molded pipe fittings, divide any one of them into multiple target images, and obtain their labels.

[0033] In one embodiment, in order to improve the accuracy and stability of the quality inspection of the laser welding of injection-molded pipe fittings, a high-precision CCD camera or CMOS camera is used to collect images during the welding process, and multiple historical images and current images are obtained. These images not only cover the visual information under different welding conditions, but also provide rich data support for subsequent defect detection and quality evaluation. For the collected images, any one of them is selected for equal division processing, and it is divided into multiple target images of the same size. In this way, the local features of the weld area can be refined, the recognition ability of micro-defects can be improved, and the defect detection model can be prevented from misjudging due to the overly complex information of the entire image. At the same time, the size of the evenly divided target images is small, reducing the computational complexity, making the subsequent processing process more efficient, and improving the accuracy of defect classification;

[0034] During the annotation process of the target images, each target image is assigned a label, and the label category is 0 or 1, where 0 indicates that the target image has welding defects and 1 indicates that the target image has no defects. This annotation method is not only intuitive and easy to understand, but also can effectively train the intelligent detection system to accurately distinguish the abnormal areas and normal areas in the weld seam, improving the automation level of defect recognition. Especially during the welding process, defects may manifest as problems such as pores, cracks, or insufficient penetration. Precise label division can better learn these defect characteristics and improve the reliability of subsequent quality inspection. In addition, the accumulation of label data can also be used to construct a larger-scale welding defect database, providing data support for further optimizing the welding process;

[0035] To reduce the influence of environmental light changes, equipment noise, and other interference factors on the detection accuracy, the collected historical images and current images are preprocessed, mainly including grayscale processing and median filtering. The core technical effect of grayscale processing is to remove the interference of color information, reduce the dimension of image data, thereby improving the calculation efficiency, while enhancing the contrast of the weld seam area, making the defects more obvious and facilitating the feature extraction of subsequent detection algorithms. Median filtering is mainly used to remove random noise caused by equipment jitter, laser reflection, or sensor noise during the welding process. Compared with linear filtering methods such as mean filtering, median filtering can better maintain the clarity of the weld seam edge, prevent the defect information from being smoothed, and thus ensure the accuracy and robustness of defect detection.

[0036] S2: Obtain the similarity between the current image and the historical image, and calculate the coincidence degree between the current image and the historical image.

[0037] In one embodiment, obtaining the similarity of the first deviation degree and the second deviation degree is specifically as follows:

[0038] By obtaining the texture main direction and welding direction of each target image; taking the mean value of the absolute values of the differences between the texture main direction and the welding direction of each target image in all historical images as the first deviation degree, and taking the absolute value of the difference between the texture main direction and the welding direction of each target image in the current image as the second deviation degree;

[0039] The texture main direction is specifically:

[0040] Perform a two-dimensional Fourier transform on the target image and obtain the frequency spectrum diagram; in the frequency spectrum diagram, convert the high-frequency region to the polar coordinate system, statistically analyze the energy distribution in different angular directions, and select the direction with the maximum energy as the texture main direction of the target image.

[0041] The welding direction is specifically:

[0042] Perform edge detection on the target image, extract the weld contour, and perform line fitting based on the Hough transform. Use the direction of the fitted line as the welding direction.

[0043] Obtain the similarity, specifically:

[0044] ;

[0045] In the formula, is the similarity between the first deviation degree and the second deviation degree, is the first deviation degree, is the second deviation degree, is the exponential function with the natural constant as the base. By introducing the exponential function to calculate the similarity, the relationship between the deviation degrees can be described smoothly, so that the parts with smaller deviations retain a higher similarity, while the similarity of the parts with larger deviations decreases rapidly. This design improves the sensitivity to detail changes and can effectively eliminate the noise influence caused by small deviations in the image, thereby more accurately identifying abnormalities or defects in the image. It ensures a reasonable reflection of the similarity between local regions in the image, further enhances the robustness and reliability of defect detection, and at the same time, through the smooth exponential decay characteristic, helps to avoid over-sensitive false detection phenomena, improving the overall detection effect and stability.

[0046] In another embodiment, a Gaussian kernel function can be used to calculate the similarity between the first deviation degree and the second deviation degree. By using the Gaussian kernel function to calculate the similarity between the first deviation degree and the second deviation degree, the non-linear relationship between the two can be processed more naturally. The Gaussian kernel function has smoothness and can effectively reduce the interference of noise, making the similarity calculation more stable and avoiding the influence of extreme values on the result. This method helps to achieve a more refined similarity evaluation under different deviation degrees, enabling the full capture of subtle deviations and differences in the image, thereby improving the accuracy and robustness of defect detection.

[0047] In one embodiment, calculate the overlap of the gray value distribution curves of the th target image in the current image and the th target image in all historical images:

[0048] ;

[0049] is the th target image in the current image and the th historical image and the th target image in the divergence of the gray value distribution curve, is the total number of historical images, is the exponential function with the base of the natural constant e.

[0050] By calculating the coincidence degree of the gray value distribution curves of the target images in the current image and the historical images, the similarity between the images is effectively evaluated. The KL divergence is used to measure the difference in gray scale distribution, and then smoothed by the exponential function, so that the coincidence degree can accurately reflect the similarity degree of the images in gray scale distribution. Through this method, the subtle differences between the images can be captured more precisely. Especially when the gray scale distributions are similar, the potential defects or abnormalities in the images can be effectively identified. This not only enhances the accuracy of defect detection, but also improves the sensitivity to small changes in complex image scenes, thereby optimizing the effect of anomaly detection.

[0051] S3: Calculate the anomaly degree of each target image in the current image based on the mutual information entropy of the similarity and the coincidence degree with the label.

[0052] In one embodiment, calculating the mutual information entropy of the similarity and the coincidence degree with the label is the prior art, and this solution will not be elaborated here. Calculate the anomaly degree of the th target image in the current image :

[0053] ;

[0054] wherein, is the similarity between the second deviation degree of the th target image in the current image and the first deviation degree, is the coincidence degree of the gray value distribution curves of the th target image in the current image and the th target image in all historical images, is the label of the th target image in the current image, is the normalization function, is the mutual information entropy function.

[0055] By combining the mutual information entropy of the similarity and the coincidence degree, calculate the anomaly degree of the target image, and use the function for normalization processing, so as to ensure that the result of the anomaly degree is within a reasonable range. By introducing the mutual information entropy of the deviation degree and the coincidence degree with the label, the matching degree between the image and the label can be evaluated more accurately, so as to achieve more precise defect detection. Compared with the traditional method, it can effectively handle the complex similarity and difference in the image, especially under the changes of image details and gray scale distribution, and can improve the sensitivity and accuracy of anomaly detection.

[0056] In another embodiment, calculate the abnormality degree of the th target image in the current image :

[0057] ;

[0058] In the formula, is the similarity between the second deviation degree and the first deviation degree of the th target image in the current image, is the coincidence degree of the gray value distribution curves of the th target image in the current image and the th target image in all historical images, is the label of the th target image in the current image, is the normalization function, is the mutual information entropy function.

[0059] By improving the calculation method of the abnormality degree, the square root and more refined weight balance are introduced, further enhancing the evaluation accuracy of the abnormality degree of the target image. By using function normalization, it can ensure that the calculation results are within a reasonable range and avoid the influence of extreme values. The mutual information entropy is used as the key index to measure the relationship between similarity, coincidence degree and label, so that the relationship between deviation degree and gray coincidence degree and label can more comprehensively reflect the quality difference of the image. Compared with the traditional method, this method has higher sensitivity to subtle changes and complex patterns, effectively improving the accuracy and robustness of defect detection. Especially when dealing with diverse and complex images, it can better capture potential abnormal situations.

[0060] S4: Respond that the target image with an abnormality degree less than the set threshold has a welding defect.

[0061] The above set threshold value can be 0.5. Of course, it can also be determined according to the actual situation.

[0062] In one embodiment, the set threshold is used to judge whether the target image has a welding defect. If the abnormality degree of the target image in the current image is less than the set threshold, it is automatically determined that the target image has a welding defect. In this way, not only can it ensure high accuracy while flexibly adapting to the requirements of different welding processes, but also it can cope with the changes in image quality and shooting conditions, improving the robustness and stability of detection. This threshold setting strategy further optimizes the defect detection process, enabling the precise identification and location of defect areas in various welding processes, improving the overall quality control level, and reducing the need for manual intervention and adjustment at the same time.

[0063] The solution of the present invention comprehensively utilizes multiple historical images and the current image, performs grayscale conversion and median filtering on the images, and divides each image into multiple target images. Furthermore, the texture main direction and the welding direction of the target images are extracted, the local texture energy distribution and the weld contour direction are obtained by using Fourier transform and Hough transform respectively, the deviation degree is calculated, and the coincidence degree of the gray histogram curves of the corresponding target images in the historical images is used as a reference. The abnormality degree of the target images is finely quantified by methods such as exponential function and mutual information entropy. When the abnormality degree is lower than the preset threshold, it is automatically determined that there are welding defects, thereby realizing the automatic and accurate detection of welding quality, effectively filtering out noise interference, improving the stability, robustness and overall detection efficiency of the detection, and providing reliable data support for the quality control of the welding process.

[0064] In the description of this specification, the meanings of "multiple" and "several" are at least two, such as two, three or more, etc., unless otherwise specifically defined.

[0065] Although this specification has shown and described multiple embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, alterations and alternative ways without departing from the spirit and scope of the present invention. It should be understood that various alternative solutions to the embodiments of the present invention described herein can be adopted in the practice of the present invention.

Claims

1. A method for identifying defects in laser welding of injection molded pipes based on image processing, characterized in that: include: Collect multiple historical images and current images of laser welding of injection molded pipe fittings, divide any one of the multiple historical images and current images into multiple target images, and obtain a label of each target image; Obtain the main texture direction and welding direction of each target image; take the average of the absolute values ​​of the difference between the main texture direction and the welding direction of each target image in all historical images as the first deviation degree, and take the absolute value of the difference between the main texture direction and the welding direction of each target image in the current image as the second deviation degree; Obtaining a similarity between the first deviation degree and the second deviation degree; Calculate the current image The target image and all the historical images The overlap of the gray value distribution curves of the target images , , The current image The target image and The historical image The gray value distribution curve of the target image Divergence, is the total number of historical images, The natural constant An exponential function with base ; Obtain the mutual information entropy of the similarity, overlap and label respectively; the label is divided into 0 or 1, 0 represents defect, 1 represents no defect; calculate the abnormality degree of each target image in the current image, the first The abnormality of the target image , where The current image similarity between the second deviation degree of the target image and the first deviation degree, The current image The target image and all the historical images The overlap of the gray value distribution curves of the target images, The current image The labels of the target images, is the normalization function, is the mutual information entropy function; In response to the target image having an abnormality level less than a set threshold, a welding defect exists.

2. The method for identifying defects in laser welding of injection molded pipes based on image processing according to claim 1 is characterized in that: The main texture direction is specifically: Perform a two-dimensional Fourier transform on the target image and obtain a spectrum diagram; in the spectrum diagram, convert the high-frequency area to a polar coordinate system, count the energy distribution in different angle directions, and select the direction with the largest energy as the main texture direction of the target image.

3. The method for identifying defects in laser welding of injection molded pipes based on image processing according to claim 1 is characterized in that: The welding direction is specifically: The target image is edge detected, the weld contour is extracted, and a straight line is fitted based on the Hough transform, and the direction of the fitted straight line is used as the welding direction.

4. The method for identifying defects in laser welding of injection molded pipes based on image processing according to claim 1 is characterized in that: Get the similarity, specifically: ; In the formula, is the similarity between the first deviation degree and the second deviation degree, is the first deviation degree, is the second deviation degree, The natural constant An exponential function with base .

5. The method for identifying defects in laser welding of injection molded pipes based on image processing according to claim 1, characterized in that: Dividing any one image into multiple target images includes equally dividing the any one image to obtain multiple target images of the same size.

6. The method for identifying defects in laser welding of injection molded pipes based on image processing according to claim 1, characterized in that: It is beneficial for a CCD camera or a CMOS camera to collect multiple historical images and current images of laser welding of injection molded pipe fittings.

7. The method for identifying defects in laser welding of injection molded pipes based on image processing according to claim 1, characterized in that: The method also includes graying and median filtering the multiple historical images and the current image of the injection molded pipe laser welding.

8. The method for identifying defects in laser welding of injection molded pipes based on image processing according to claim 1, characterized in that: The threshold is set to 0.5.

Citation Information

Patent Citations

  • Vision-based composite copper bar conducting layer welding defect detection method

    CN117132588A

  • Welding defect identification method and system for stainless steel plate

    CN118840361A