High-frequency welded pipe weld defect detection method based on image data mining
By obtaining video streams, selecting weld target images, dividing molecular areas, determining thermal imaging stability, screening dynamic interference parts and reselecting detection images in the welded weld detection, solving the problem of multimodal data space registration error during welding, and improving the accuracy and reliability of the detection results.
Patent Information
- Application Number
- CN202510223808.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art has failed to effectively solve the problem of spatial misalignment of infrared thermal imaging and visible light images during pipeline welding, resulting in multimodal data spatial registration error, affecting the image data characterization and accuracy and reliability of the detection results of welded pipe welds.
By obtaining the video stream of welded pipe processing, selecting the weld target image and dividing it into sub-regions, determining the thermal diffusion characterization amount of the sub-regions, determining the thermal imaging stability, screening the characteristic dynamic interference part, reselecting the detection image, and comparing its corresponding infrared thermal imaging with the samples in the database to determine whether there are defects in the welded pipe weld.
The infrared thermal imaging comparison is achieved based on dynamic interference screening images with more stable weld morphology, avoiding errors in temperature information and weld morphology between infrared thermal imaging and visible light images, improving the image data characterization of weld weld detection, and enhancing the accuracy and reliability of the detection results.
Smart Images

Figure CN120163777A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image detection, and particularly to a method for detecting high-frequency welded pipe weld defects based on image data mining. Background Art
[0002] In modern industrial production, pipes of various specifications are widely used in many fields such as construction, machinery manufacturing, petrochemical industry, etc. The weld quality of pipe welding is directly related to the overall performance and safety of the pipe. Therefore, accurate detection of weld defects is crucial. With the development of computer vision and image data mining technologies, using image processing and analysis algorithms to identify defects has the advantages of non-contact, strong real-time performance, high detection accuracy, etc. The welding process of welded pipes is a complex thermal process. Avoiding the influence of various interferences on the matching of visible light images and infrared thermal images, and making the correspondence between the two in terms of spatial position and features more accurate is of great significance for the accuracy and reliability of the detection results.
[0003] For example, Chinese Patent Publication No.: CN110675388A. This invention discloses a method for comparing the similarity of weld images, which includes performing two-dimensional Gaussian transformation on the weld images, discrete integral operation, constructing a weld image pyramid, calculating the second-order partial derivative matrix, extracting weld image feature points and feature matching. This invention can automatically identify most of the repeated weld images, avoid multiple detections of the same weld, obtain multiple sets of film negatives or flat panel detector images, and prevent situations such as passing off film negatives or flat panel detector images that have not been detected in time or have quality problems, improve the engineering quality, and reduce safety accidents.
[0004] There are also the following problems in the prior art:
[0005] The prior art does not consider that due to various interference factors in the pipe welding process, there is a spatial misalignment between the infrared thermal image and the visible light image, resulting in an error in the spatial registration of multi-modal data, and the lack of representativeness of the image data for high-frequency welded pipe weld detection affects the accuracy and reliability of the detection results. Summary of the Invention
[0006] Therefore, the present invention provides a method for detecting high-frequency welded pipe weld defects based on image data mining to overcome the problem that the prior art does not consider the spatial misalignment between the infrared thermal image and the visible light image due to various interference factors in the pipe welding process, resulting in an error in the spatial registration of multi-modal data.
[0007] To achieve the above object, the present invention provides a method for detecting high-frequency welded pipe weld defects based on image data mining, including:
[0008] Obtain a video stream of welded pipe processing, obtain consecutive single-frame images based on the video stream, select a weld target image and mark several dynamic interference parts in the current frame image, and divide the weld target image into several sub-regions along the weld length direction;
[0009] Among them, the sub-regions include a first sub-region and a second sub-region that are symmetrically distributed along the weld;
[0010] Obtain the gray values of the sub-regions in the current frame image and the previous frame image respectively, determine the thermal diffusion characterization quantity of the sub-regions according to the change difference of the gray values of the first sub-region and the second sub-region, and determine whether the current frame image has the characteristic of thermal imaging instability based on the thermal diffusion characterization quantities of each sub-region;
[0011] In response to the determination result that the current frame image has the characteristic of thermal imaging instability, determine a perturbation offset vector according to the perturbation characterization vectors of each dynamic interference part in the current frame image;
[0012] Screen the characteristic dynamic interference parts based on the comparison of each perturbation offset vector with the perturbation offset vector, and reselect a detection image in the video stream according to the characteristic parameters of the characteristic dynamic interference parts and the vector parameters of the perturbation offset vector;
[0013] Among them, the vector parameters include vector direction and vector length;
[0014] Obtain the infrared thermal imaging corresponding to the reselected detection image, and compare the infrared thermal imaging with the thermal imaging samples in the database to determine whether there are defects in the welded pipe weld.
[0015] Furthermore, the process of determining the thermal diffusion characterization quantity includes:
[0016] Determine the difference in gray values of the first sub-region in the current frame image and the previous frame image as the first gray value difference;
[0017] Determine the difference in gray values of the second sub-region in the current frame image and the previous frame image as the second gray value difference;
[0018] Determine the ratio of the first gray value difference to the second gray value difference as the thermal diffusion characterization quantity of the sub-region.
[0019] Furthermore, determining whether the current frame image has the characteristic of thermal imaging instability includes:
[0020] Based on the comparison result that the thermal diffusion characterization quantity meets the thermal imaging stability condition, determine that the current frame image has the characteristic of thermal imaging stability;
[0021] Based on the comparison result that the thermal diffusion characterization quantity does not meet the thermal imaging stability condition, it is determined that the current frame image has the characteristics of unstable thermal imaging;
[0022] Wherein, the thermal imaging stability condition is that the thermal diffusion characterization quantity is within a preset reference quantity range of thermal diffusion characterization.
[0023] Further, determining the perturbation characterization vectors of each dynamic interference part in the current frame image includes:
[0024] Obtaining the vibration amplitude and vibration direction of the dynamic interference part within a preset unit time;
[0025] Determining the vector starting point of the perturbation characterization vector according to the coordinate position of the dynamic interference part within a preset unit time, and determining the vibration direction as the vector direction of the perturbation characterization vector, and determining the vibration amplitude as the vector length of the perturbation characterization vector;
[0026] Wherein, the dynamic interference part includes a fixture for clamping a welded pipe arranged along the length direction of the weld.
[0027] Further, the perturbation offset vector is a vector obtained by adding the perturbation characterization vectors corresponding to each dynamic interference part.
[0028] Further, the process of screening the characteristic dynamic interference part includes:
[0029] Determining the vector angle between the vector direction of the perturbation characterization vector and the vector direction of the perturbation offset vector;
[0030] According to the comparison result that the vector angle does not exceed a preset vector angle threshold, the dynamic interference part corresponding to the perturbation characterization vector is screened as the characteristic dynamic interference part.
[0031] Further, the characteristic parameters of the characteristic dynamic interference part include the vibration amplitude and vibration frequency of the characteristic dynamic interference part.
[0032] Further, the process of reselecting the detection image includes:
[0033] Calculating the average value of the vibration amplitudes and the average value of the vibration frequencies of several characteristic dynamic interference parts;
[0034] According to the average value of the vibration amplitudes, the average value of the vibration frequencies and the vector length of the perturbation offset vector, calculating the time quantity by using the cosine function of simple harmonic vibration;
[0035] Selecting the moment before the current moment and separated from the current moment by the time quantity as the selection moment, and obtaining the single-frame image corresponding to the selection moment in the video stream as the detection image.
[0036] Further, it is determined whether there is a defect in the welded pipe weld according to the coincidence degree of the temperature distribution between the infrared thermal image and the thermal image sample in the database, where
[0037] if the coincidence degree of the temperature distribution is lower than a preset coincidence degree threshold, it is determined that there is a defect in the welded pipe weld;
[0038] if the coincidence degree of the temperature distribution is not lower than the preset coincidence degree threshold, it is determined that there is no defect in the welded pipe weld.
[0039] Further, the database pre-stores infrared thermal image samples corresponding to the detection images in several welding stages.
[0040] Compared with the prior art, the beneficial effects of the present invention are as follows. The present invention selects the weld target image in the current frame image and marks several dynamic interference parts, divides the weld target image into several sub-regions, determines whether the current frame image has the characteristic of unstable thermal imaging by determining the thermal diffusion characterization quantity of the sub-regions, screens the characteristic dynamic interference parts, and re-selects the detection image in the video stream according to the characteristic parameters of the characteristic dynamic interference parts and the vector parameters of the perturbation offset vector, and obtains the infrared thermal imaging corresponding to the re-selected detection image to determine whether there is a defect in the welded pipe weld. Furthermore, it realizes the comparison of infrared thermal imaging by screening images with more stable weld forms according to the dynamic interference of the jig shaking, avoids errors in the correspondence of temperature information and weld form between the infrared thermal imaging and the visible light image, improves the image data representativeness of the welded pipe weld detection, and improves the accuracy and reliability of the detection result.
[0041] Further, the present invention determines whether the thermal imaging is stable by calculating the thermal diffusion characterization quantity. By calculating the difference in gray values between the first sub-region and the second sub-region in the current frame and the previous frame image and taking the ratio as the thermal diffusion characterization quantity, the thermal diffusion conditions on both sides of the weld region can be accurately quantified, improving the detection efficiency and detection applicability.
[0042] Further, the present invention determines the perturbation characterization vector by obtaining the relevant parameters of the dynamic interference part. It can be understood that the vibration amplitude and vibration direction of the dynamic interference part within a preset unit time can quantify the interference situation of dynamic interference parts such as jigs. The vibration amplitude reflects the intensity of the interference, and the vibration direction clarifies the action direction of the interference. Since the vibration of the dynamic interference part will cause quality problems such as image jitter and blurring, by analyzing its vibration amplitude and direction, the degree of image quality degradation can be more accurately evaluated. Furthermore, the detection method can better adapt to complex welding environments and improve the stability and adaptability of the detection system.
[0043] Furthermore, the present invention adds the perturbation characterization vectors corresponding to each dynamic interference part to obtain a perturbation offset vector, and then compares the direction angles between each perturbation characterization vector and the perturbation offset vector, so as to screen out the dynamic interference parts that are more consistent with the overall interference direction as characteristic dynamic interference parts. This can highlight the interference factors that have a major impact on the image, because the interference parts that are consistent with the overall interference direction have a more significant impact on the image in terms of the superposition effect, which helps to concentrate on dealing with the interference sources that cause the main interference, improve the pertinence and efficiency of interference processing, and can also continuously calculate the perturbation offset vector and screen the characteristic dynamic interference parts to adjust the recognition and processing strategies for the main interference factors in real time, enhancing the robustness and stability of the system, and ensuring reliable weld defect detection under different conditions.
[0044] Furthermore, the present invention calculates the average vibration amplitude and average vibration frequency of the characteristic dynamic interference parts, combines the vector length of the perturbation offset vector, and uses the cosine function of simple harmonic vibration to calculate the time quantity to reselect the detection image, so as to find the image corresponding to the moment with less influence from the characteristic dynamic interference parts in the video stream. It can be understood that the cosine function of simple harmonic vibration can simulate the change law of the interference according to the characteristic parameters of the interference, so as to predict the time point with relatively less interference, ensure that the selected image avoids the influence of dynamic interference to the greatest extent, avoid errors in the correspondence between infrared thermal imaging and visible light images in terms of temperature information and weld morphology, improve the image data representativeness of welded pipe weld detection, and improve the accuracy and reliability of the detection results.
[0045] Furthermore, the present invention pre-constructs a database to store infrared thermal imaging samples corresponding to the detection images of several welding stages. It can be understood that in different welding stages, the temperature distribution characteristics of the weld will be different, and the temperature distribution coincidence degree is an objective quantitative index. By comparing the actually collected infrared thermal imaging with the thermal imaging samples in the database, the interference of subjective factors in manual detection is avoided, and the possible defects in the weld can be identified more accurately. Furthermore, it realizes the screening of images with more stable weld morphology for infrared thermal imaging comparison according to the dynamic interference of fixture shaking, avoids errors in the correspondence between infrared thermal imaging and visible light images in terms of temperature information and weld morphology, improves the image data representativeness of welded pipe weld detection, and improves the accuracy and reliability of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a step diagram of the high-frequency welded pipe weld defect detection method based on image data mining according to an embodiment of the present invention;
[0047] Figure 2 It is a step diagram of determining the thermal diffusion characterization quantity according to an embodiment of the present invention;
[0048] Figure 3The logical flowchart for screening the feature dynamic interference part in the embodiment of the present invention;
[0049] Figure 4 The step diagram for reselecting the detection image in the embodiment of the present invention. Detailed implementation manners
[0050] In order to make the objectives and advantages of the present invention clearer, the present invention will be further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0051] The preferred implementation manners of the present invention will be described below with reference to the accompanying drawings. Those skilled in the art should understand that these implementation manners are only used to explain the technical principle of the present invention and do not limit the protection scope of the present invention.
[0052] It should be noted that in the description of the present invention, the terms indicating directions or positional relationships such as "upper", "lower", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings. This is only for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation to the present invention.
[0053] Please refer to Figure 1 As shown, it is the step diagram of the high-frequency welded pipe weld defect detection method based on image data mining in the embodiment of the present invention. A high-frequency welded pipe weld defect detection method based on image data mining of the present invention includes:
[0054] Step S100: Obtain the video stream of the welded pipe processing, obtain continuous single-frame images based on the video stream, frame the weld target image and mark several dynamic interference parts in the current frame image, and divide the weld target image into several sub-regions along the weld length direction;
[0055] Among them, the sub-regions include a first sub-region and a second sub-region symmetrically distributed along the weld;
[0056] Specifically, in the present invention, when the weld target image is divided into several sub-regions along the weld length direction, the shape of each sub-region can be a rectangular shape, and the length and width of each rectangular sub-region can be determined according to the diameter of the pipe. Here, a method for determining the length of the sub-region is provided: L = λ×R, where L is the length of the sub-region, λ is the length value factor, preferably, λ = 0.15, and R is the diameter of the pipe. Here, a method for determining the width of the sub-region is also provided: D = ε×R, where D is the width of the sub-region, ε is the width value factor, preferably, ε = 0.1, and R is the diameter of the pipe.
[0057] Step S200: Obtain the gray values of the sub-regions in the current frame image and the previous frame image respectively, determine the thermal diffusion characterization quantity of the sub-regions according to the change difference of the gray values between the first sub-region and the second sub-region, and determine whether the current frame image has the characteristic of unstable thermal imaging based on the thermal diffusion characterization quantities of the sub-regions;
[0058] Step S300: In response to the determination result that the current frame image has the characteristic of unstable thermal imaging, determine the perturbation offset vector according to the perturbation characterization vectors of the dynamic interference parts in the current frame image;
[0059] Step S400: Screen out the characteristic dynamic interference parts based on the comparison of each perturbation offset vector with the perturbation offset vector, and re-select the detection image in the video stream according to the characteristic parameters of the characteristic dynamic interference parts and the vector parameters of the perturbation offset vector;
[0060] Wherein, the vector parameters include vector direction and vector length;
[0061] Step S500: Obtain the infrared thermal imaging corresponding to the re-selected detection image, and compare the infrared thermal imaging with the thermal imaging samples in the database to determine whether there are defects in the welded pipe weld.
[0062] Specifically, the present invention does not limit the specific method of selecting the weld target image and marking several dynamic interference parts in the current frame image. The color current frame image can be converted into a grayscale image, and the edge detection algorithm can be used to find the weld edge information in the image to highlight the contour of the weld. Then, according to the characteristics such as the area and shape of the contour, the contour corresponding to the weld is selected to complete the selection of the weld target image. The frame difference method or background subtraction algorithm is used to detect the dynamic area in the image, and these dynamic areas are marked as dynamic interference parts. This is the prior art and will not be elaborated here.
[0063] Specifically, the present invention does not limit the method of obtaining the image gray value. The methods of obtaining the image gray value mainly include the direct method, the component method, the weighted average method, etc. This is the prior art and will not be elaborated here.
[0064] This embodiment also provides a computer-readable storage medium, in which computer program code is stored. When the computer program code runs on a computer, the computer is enabled to execute the above related method steps to implement the high-frequency welded pipe weld defect detection method based on image data mining provided in the above embodiment.
[0065] Specifically, please refer to Figure 2 As shown, it is the step diagram for determining the thermal diffusion characterization quantity in the embodiment of the present invention. The process of determining the thermal diffusion characterization quantity includes:
[0066] Step S201: Determine the first grayscale difference by taking the difference in grayscale values of the first sub-region between the current frame image and the previous frame image;
[0067] Step S202: Determine the second grayscale difference by taking the difference in grayscale values of the second sub-region between the current frame image and the previous frame image;
[0068] Step S203: Determine the ratio of the first grayscale difference to the second grayscale difference as the heat diffusion characterization quantity of the sub-region.
[0069] Specifically, determining whether the current frame image has the characteristic of unstable thermal imaging includes:
[0070] Based on the comparison result that the heat diffusion characterization quantity meets the condition of stable thermal imaging, determine that the current frame image has the characteristic of stable thermal imaging;
[0071] Based on the comparison result that the heat diffusion characterization quantity does not meet the condition of stable thermal imaging, determine that the current frame image has the characteristic of unstable thermal imaging;
[0072] Among them, the condition of stable thermal imaging is that the heat diffusion characterization quantity is within a preset heat diffusion characterization reference quantity range.
[0073] In practice, when the heat diffusion characterization quantity is within the preset heat diffusion characterization reference quantity range, it indicates that the heat diffusion is stable and uniform. Those skilled in the art can set the heat diffusion characterization reference quantity range according to this setting standard. The smaller the interval length of the heat diffusion characterization reference quantity range is set, the stricter the condition indicating that the heat diffusion is stable and uniform is. Preferably, the heat diffusion characterization reference quantity range can be set as [0.92, 1.08].
[0074] Specifically, those skilled in the art can understand that during the welding process of the pipeline weld, heat is transferred and diffused. The melted material in the weld fills the weld joint and integrates into the end faces at both ends of the weld joint. By determining the change in grayscale values of the first sub-region and the second sub-region distributed at both ends of the weld, and taking the ratio of the first grayscale difference to the second grayscale difference as the heat diffusion characterization quantity of the sub-region, in the case of normal heat diffusion, the heat diffusion conditions of the first sub-region and the second sub-region should be similar, that is, their grayscale value change trends and amplitudes also have a certain similarity. Therefore, by calculating the ratio of the grayscale differences between the two, the relative difference degree of heat diffusion between the two sub-regions can be measured. If the heat diffusion is stable and uniform, this ratio should be within a relatively stable range; conversely, if the ratio fluctuates greatly, it indicates that the heat diffusion may be unstable.
[0075] Specifically, the present invention determines whether the thermal imaging is stable by calculating the thermal diffusion characterization quantity. By calculating the grayscale value difference between the first sub-region and the second sub-region in the current frame and the previous frame image, and taking the ratio as the thermal diffusion characterization quantity, the thermal diffusion conditions on both sides of the weld area can be accurately quantified, thereby improving the detection efficiency and detection applicability.
[0076] Specifically, determining the disturbance characterization vector of each dynamic interference part in the current frame image includes:
[0077] Obtaining the vibration amplitude and vibration direction of the dynamic interference part within a preset unit time;
[0078] Determine the vector starting point of the disturbance characterization vector according to the coordinate position of the dynamic interference part within a preset unit time, determine the vibration direction as the vector direction of the disturbance characterization vector, and determine the vibration amplitude as the vector length of the disturbance characterization vector;
[0079] Wherein, the dynamic interference part includes a clamp arranged along the length direction of the weld to clamp the weld pipe.
[0080] Specifically, the longer the set length of the preset unit time is, the more position coordinates the dynamic interference part obtains within the preset unit time, and the more accurate the position information of the dynamic interference part is determined by calculating the average value of each coordinate value. However, an excessively long preset unit time brings a large amount of data calculation, which affects the efficiency of detection. The value range of the preset unit time is [3s, 10s]. Preferably, the value of the preset unit time is 5s.
[0081] Specifically, it can be understood that the vibration amplitude refers to the maximum distance that the dynamic interference part deviates from the equilibrium position during the vibration process, which reflects the intensity of the vibration. The vibration amplitude of the dynamic interference part is determined as the vector length of the disturbance characterization vector because the larger the vibration amplitude, the more violent the vibration of the interference part, and the greater the impact on the image. By using the vector length to represent the vibration amplitude, the intensity of the interference can be intuitively reflected. The vibration direction refers to the direction in which the dynamic interference part moves during the vibration process. The vibration direction of the dynamic interference part is determined as the vector direction of the disturbance characterization vector because the vibration direction of the interference part determines the direction in which it affects the image. By using the vector direction to represent the vibration direction, the direction of the interference's impact on the image can be clearly defined.
[0082] Specifically, the present invention determines the perturbation characterization vector by obtaining relevant parameters of the dynamic interference part. It can be understood that the vibration amplitude and vibration direction of the dynamic interference part within a preset unit time can quantify the interference situation of dynamic interference parts such as jigs. The vibration amplitude reflects the intensity of the interference, and the vibration direction clarifies the acting direction of the interference. Since the vibration of the dynamic interference part will cause quality problems such as image jitter and blurring, by analyzing its vibration amplitude and direction, the degree of image quality degradation can be more accurately evaluated. Furthermore, the detection method can better adapt to complex welding environments, improving the stability and adaptability of the detection system.
[0083] Specifically, the perturbation offset vector is a vector obtained by adding the perturbation characterization vectors corresponding to each dynamic interference part.
[0084] Specifically, please refer to Figure 3 As shown, it is the logic flowchart for screening characteristic dynamic interference parts in the embodiment of the present invention. The process of screening characteristic dynamic interference parts includes:
[0085] Determine the vector angle between the vector direction of the perturbation characterization vector and the vector direction of the perturbation offset vector;
[0086] According to the comparison result that the vector angle does not exceed the preset vector angle threshold, screen the dynamic interference part corresponding to the perturbation characterization vector as the characteristic dynamic interference part;
[0087] According to the comparison result that the vector angle exceeds the preset vector angle threshold, do not screen the dynamic interference part corresponding to the perturbation characterization vector.
[0088] In practice, the selection of the preset vector angle threshold can be set by those skilled in the art according to requirements. The smaller the selected value of the vector angle threshold, the higher the direction consistency between the screened perturbation characterization vector and the perturbation offset vector. The setting range of the vector angle threshold is [5°, 15°]. Preferably, the value of the vector angle threshold is 8°, which can meet the requirement of screening dynamic characterization vectors with key impacts while avoiding low calculation efficiency caused by too many screened dynamic characterization vectors.
[0089] Specifically, it can be understood that in the high-frequency welded pipe weld detection scenario, there are multiple dynamic interference parts, and each dynamic interference part will generate its own perturbation. The impacts of these perturbations on the image quality are superimposed on each other. Vectors have the property of synthesis. Adding the perturbation characterization vectors corresponding to each dynamic interference part to obtain the perturbation offset vector. Physically speaking, it is to synthesize the perturbations generated by each dynamic interference part to obtain a vector representing the overall interference effect. The direction and magnitude of this vector reflect the overall interference direction and intensity on the image under the combined action of all dynamic interference parts.
[0090] Specifically, in the present invention, the perturbation offset vector is obtained by adding the perturbation characterization vectors corresponding to each dynamic interference part, and then the direction angles between each perturbation characterization vector and the perturbation offset vector are compared, so as to screen out the dynamic interference parts that are more consistent with the overall interference direction as the characteristic dynamic interference parts. This can highlight the interference factors that have a major impact on the image, because the interference parts that are consistent with the overall interference direction have a more significant impact on the image in the superposition effect, which helps to concentrate on dealing with the interference sources that cause the main interference, improve the pertinence and efficiency of interference processing, and can also continuously calculate the perturbation offset vector and screen the characteristic dynamic interference parts to adjust the recognition and processing strategies for the main interference factors in real time, enhancing the robustness and stability of the system, and ensuring reliable weld defect detection under different conditions.
[0091] Specifically, the characteristic parameters of the characteristic dynamic interference part include the vibration amplitude and vibration frequency of the characteristic dynamic interference part.
[0092] Specifically, please refer to Figure 4 As shown, it is a step diagram for reselecting the detection image in the embodiment of the present invention. The process of reselecting the detection image includes:
[0093] Step S401, calculating the average vibration amplitude and average vibration frequency of several characteristic dynamic interference parts;
[0094] Step S402, calculating the time quantity by using the cosine function of simple harmonic vibration according to the average vibration amplitude, average vibration frequency and the vector length of the perturbation offset vector;
[0095] Step S403, selecting the moment before the current moment and at an interval of the time quantity from the current moment as the selected moment, and obtaining the single-frame image corresponding to the selected moment in the video stream as the detection image.
[0096] Specifically, the vibration of the fixture for clamping the welded pipe is usually caused by the vibration frequency fixed by the production line. Its vibration can be approximately regarded as simple harmonic vibration, and its motion law can be described by the cosine function of simple harmonic vibration. In the inspection of the high-frequency welded pipe weld, therefore, the cosine function of simple harmonic vibration can be used to simulate the vibration process of the characteristic dynamic interference part, so as to predict its vibration state at different times. The general form of the cosine function of simple harmonic vibration is x = Acosωt, where x is the offset, A is the amplitude, ω is the angular frequency, and t is the time. In the technical solution of the present application, the average value of the vibration amplitude can be used as the amplitude A of the simple harmonic vibration. The average value of the vibration frequency f can be converted to obtain the angular frequency ω, ω = 2πf. The vector length of the disturbance offset vector is the offset x. By substituting these parameters into the cosine function of simple harmonic vibration, a time quantity t can be calculated. This time quantity represents the time interval required to trace back from the current moment to the moment when the interference is relatively small.
[0097] Specifically, the present invention calculates the average value of the vibration amplitude and the average value of the vibration frequency of the characteristic dynamic interference part, combines the vector length of the disturbance offset vector, and calculates the time quantity by using the cosine function of simple harmonic vibration to reselect the detection image. It is possible to find the image corresponding to the moment with less influence of the characteristic dynamic interference part in the video stream. It can be understood that the cosine function of simple harmonic vibration can simulate the change law of the interference according to the characteristic parameters of the interference, so as to predict the time point with relatively small interference, ensure that the selected image avoids the influence of dynamic interference to the greatest extent, avoid errors in the correspondence of temperature information and weld morphology between infrared thermal imaging and visible light images, improve the image data representativeness of welded pipe weld inspection, and improve the accuracy and reliability of the inspection results.
[0098] Specifically, it is determined whether there is a defect in the welded pipe weld according to the coincidence degree of the temperature distribution between the infrared thermal imaging and the thermal imaging samples in the database, where
[0099] If the coincidence degree of the temperature distribution is lower than the preset coincidence degree threshold, it is determined that there is a defect in the welded pipe weld;
[0100] If the coincidence degree of the temperature distribution is not lower than the preset coincidence degree threshold, it is determined that there is no defect in the welded pipe weld.
[0101] Specifically, the present invention does not limit the method for determining the coincidence degree of the temperature distribution between the infrared thermal imaging and the thermal imaging samples in the database. Preferably, the present invention can extract geometric features such as the shape, area, and perimeter of the isotherm based on traditional image processing methods, and use the correlation coefficient method to calculate the similarity of the features of the two images. The closer the correlation coefficient is to 1, the higher the coincidence degree. This is the prior art and will not be elaborated here.
[0102] In implementation, to ensure that the preset coincidence degree threshold meets the actual requirements, the coincidence degree threshold can be set according to historical experimental data. First, obtain the coincidence degrees between the infrared thermal images during the welding processes of several pipes of the same specification and the thermal image samples in the database in advance, calculate the average value of the coincidence degrees of several experiments, and determine the average value of the coincidence degrees as the coincidence degree threshold.
[0103] The following table shows the historical data of ten experiments:
[0104] Experiment serial number Coincidence degree of the current infrared thermal image and the database thermal image sample 1 0.92 2 0.94 3 0.90 4 0.88 5 0.89 6 0.92 7 0.91 8 0.90 9 0.95 10 0.93
[0105] Through the above experiments, the coincidence degrees between the infrared thermal images obtained from 10 welding experiments of pipes of the same specification and the thermal image samples in the database were recorded, and then the average value of these coincidence degrees was calculated to be 0.914. Finally, this average value was determined as the coincidence degree threshold.
[0106] Specifically, the database pre-stores infrared thermal image samples corresponding to the detection images of several welding stages.
[0107] Specifically, by pre-constructing a database to store infrared thermal image samples corresponding to the detection images of several welding stages in the present invention, it can be understood that the temperature distribution characteristics of the weld seam will be different in different welding stages. The temperature distribution coincidence degree is an objective quantitative index. By comparing the actually collected infrared thermal images with the thermal image samples in the database, the interference of subjective factors in manual detection is avoided, and the possible defects in the weld seam can be identified more accurately. Furthermore, it realizes the screening of images with more stable weld seam forms for infrared thermal imaging comparison according to the dynamic interference of the jig shaking, avoids the error in the correspondence of temperature information and weld seam form between infrared thermal imaging and visible light images, improves the image data representativeness of the welded pipe weld seam detection, and improves the accuracy and reliability of the detection results.
[0108] So far, the technical solution of the present invention has been described in combination with the preferred embodiments shown in the drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the protection scope of the present invention.
[0109] The above are only the preferred embodiments of the present invention and are not used to limit the present invention; for those skilled in the art, the present invention can have various changes and modifications. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A high-frequency welded pipe weld defect detection method based on image data mining, characterized in that: include: Obtain a video stream of welded pipe processing, obtain continuous single-frame images based on the video stream, frame a weld target image in the current frame image and mark a number of dynamic interference parts, and divide the weld target image into a number of sub-areas along the length direction of the weld; Wherein, the sub-regions include a first sub-region and a second sub-region symmetrically distributed along the weld; Obtaining grayscale values of the sub-regions in the current frame image and the previous frame image respectively, determining a thermal diffusion characterization amount of the sub-region according to a difference in grayscale value changes between the first sub-region and the second sub-region, and determining whether the current frame image has a thermal imaging instability feature based on the thermal diffusion characterization amount of each sub-region; In response to a determination result that the current frame image has a thermal imaging unstable feature, determining a disturbance offset vector according to disturbance characterization vectors of each dynamic disturbance part in the current frame image; Based on the comparison between each disturbance offset vector and the disturbance offset vector, a characteristic dynamic interference part is selected, and a detection image is reselected in the video stream according to the characteristic parameters of the characteristic dynamic interference part and the vector parameters of the disturbance offset vector; Wherein, the vector parameters include vector direction and vector length; The infrared thermal image corresponding to the re-selected detection image is obtained, and the infrared thermal image is compared with the thermal imaging samples in the database to determine whether there is a defect in the weld of the welded pipe.
2. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 1 is characterized in that: The process of determining the thermal diffusion characteristic quantity includes: Determine a grayscale value difference between the first sub-region in the current frame image and the previous frame image as a first grayscale difference; Determine a grayscale value difference between the second sub-area in the current frame image and the previous frame image as a second grayscale difference; A ratio of the first grayscale difference to the second grayscale difference is determined as a heat diffusion characterization value of the sub-region.
3. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 2 is characterized in that: Determining whether the current frame image has thermal imaging instability characteristics includes: Based on the comparison result that the heat diffusion characterization quantity meets the thermal imaging stability condition, determining that the current frame image has a thermal imaging stability feature; Based on the comparison result that the heat diffusion characterization quantity does not meet the thermal imaging stability condition, it is determined that the current frame image has a thermal imaging unstable feature; The thermal imaging stability condition is that the thermal diffusion characterization value is within a preset thermal diffusion characterization reference value range.
4. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 1 is characterized in that: Determining the disturbance characterization vector of each dynamic interference part in the current frame image includes: Obtaining the vibration amplitude and vibration direction of the dynamic interference part within a preset unit time; Determine the vector starting point of the disturbance characterization vector according to the coordinate position of the dynamic interference part within a preset unit time, determine the vibration direction as the vector direction of the disturbance characterization vector, and determine the vibration amplitude as the vector length of the disturbance characterization vector; Wherein, the dynamic interference part includes a clamp arranged along the length direction of the weld to clamp the weld pipe.
5. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 4 is characterized in that: The disturbance offset vector is a vector obtained by adding the disturbance characterization vectors corresponding to each dynamic disturbance part.
6. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 5 is characterized in that: The process of screening the characteristic dynamic interference part includes: Determining a vector angle between a vector direction of the disturbance characterization vector and a vector direction of the disturbance offset vector; According to the comparison result that the vector angle does not exceed a preset vector angle threshold, the dynamic interference part corresponding to the disturbance characterization vector is screened as the characteristic dynamic interference part.
7. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 6 is characterized in that: The characteristic parameters of the characteristic dynamic interference part include the vibration amplitude and the vibration frequency of the characteristic dynamic interference part.
8. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 7 is characterized in that: The process of reselecting the detection image includes: Calculate the average vibration amplitude and the average vibration frequency of several characteristic dynamic interference parts; The time quantity is calculated by using a simple harmonic vibration cosine function according to the average value of the vibration amplitude, the average value of the vibration frequency and the vector length of the disturbance offset vector; A moment before the current moment and separated from the current moment by the time amount is selected as the selection moment, and a single frame image corresponding to the selection moment is obtained in the video stream as the detection image.
9. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 8 is characterized in that: The temperature distribution overlap between the infrared thermal imaging and the thermal imaging samples in the database is used to determine whether the weld of the welded pipe has defects. If the temperature distribution overlap is lower than a preset overlap threshold, it is determined that the weld of the welded pipe has defects; If the temperature distribution overlap is not lower than a preset overlap threshold, it is determined that there is no defect in the weld of the welded pipe.
10. The high-frequency welded pipe weld defect detection method based on image data mining according to claim 9 is characterized in that: The database pre-stores infrared thermal imaging samples corresponding to the detection images of several welding stages.
Citation Information
Patent Citations
Weld joint image similarity comparison method
CN110675388A
Cited By
Fan blade monitoring method and device based on multi-modal analysis, equipment and medium
CN120312508A
Fan blade monitoring method and device based on multi-modal analysis, equipment and medium
CN120312508B
Method and system for detecting large-diameter straight-slit double-sided submerged arc welding steel pipe
CN120734579A