A magnetic non-destructive testing system for welds and a control method thereof
By designing a magnetic non-destructive testing system and combining it with image recognition technology, the problem of contaminant interference in the inspection of internal welds of U-ribs in pressure vessels and bridges was solved, realizing automated and accurate weld defect detection and improving the reliability of the inspection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU MARITIME INST
- Filing Date
- 2025-05-28
- Publication Date
- 2026-07-21
AI Technical Summary
In the existing technology, it is difficult to achieve accurate non-destructive testing of the internal welds of pressure vessels and bridge U-ribs, especially because there are contaminants inside the welds and the test results need to be manually evaluated, which leads to inaccurate test results.
A magnetic non-destructive testing system was designed, including a moving module, a cleaning module, a spraying module, a magnetizing module, a detection module, and an illumination module. Through system parameter setting and image recognition technology, the system can automatically detect weld defects, reduce contaminant interference, and improve image recognition accuracy.
The system's automated cleaning and uniform lighting improve the accuracy of magnetic particle testing, ensure the uniformity of the sprayed magnetic powder liquid and the strength of the magnetic field, and realize the automated and accurate detection of weld defects, reducing errors caused by manual evaluation.
Smart Images

Figure CN120334345B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of weld inspection equipment technology, specifically to a magnetic non-destructive testing system for welds and its control method. Background Technology
[0002] Welding is a crucial joining process in the manufacturing of pressure vessels and bridge U-ribs, and good weld quality contributes to improving the stability and durability of these components. However, during production, minute defects such as cracks and porosity often appear on the weld surfaces, posing safety hazards. Since some welds on pressure vessels and bridge U-ribs are located inside the workpiece, detecting these internal weld defects is difficult to perform manually.
[0003] In defect detection technology, magnetic particle testing uses the leakage magnetic field generated at minute defects to attract magnetic particles, thereby revealing the location and size of defects on the weld surface, enabling non-destructive testing of welds. Integrating magnetic particle testing equipment into automated inspection systems allows it to enter the interior of the workpiece and perform defect detection on the weld surface inside.
[0004] Although non-destructive testing systems with magnetic particle testing capabilities have been deployed for weld inspection of complex workpieces with numerous internal welds, such as bridge U-ribs, inaccurate test results still exist due to contaminants on the surface of the internal welds and the need for manual evaluation of the test results. Summary of the Invention
[0005] In order to solve the problems existing in the prior art, the purpose of this application is to provide a magnetic non-destructive testing system for welds and its control method.
[0006] In a first aspect, this application provides a magnetic non-destructive testing system for welds, comprising: The moving module is used to perform horizontal linear motion inside the workpiece to be measured; The cleaning module is used to clean the weld seams of the workpiece to be tested; The spraying module is used to spray magnetic powder liquid onto the weld seam of the workpiece to be tested; Magnetization module, used for magnetizing weld seams; The detection module is used to acquire images of the magnetic particle distribution on the weld. Lighting module, used to provide uniform illumination to the weld seam; The control module, movement module, cleaning module, spraying module, magnetization module, detection module, and lighting module are all connected to the control module via signals.
[0007] Secondly, this application provides a magnetic nondestructive testing control method for welds, applied to the magnetic nondestructive testing system for welds provided in the first aspect of this application. The control method includes the following steps: S1, in response to the workpiece parameters of the workpiece to be tested, sets the working parameters of magnetic particle detection; the workpiece parameters include the workpiece length and magnetic permeability; the working parameters include the coating amount of the spraying module and the magnetic field strength of the magnetization module. S2, calibrate the weld of the workpiece under test according to the working parameters, and obtain the change stages of magnetic powder distribution by image recognition of the calibration process; the change stages include magnetic powder accumulation, stable magnetic trace and magnetic trace diffusion; S3, the critical detection time is obtained based on the change stage of magnetic powder distribution, and the critical moving speed is obtained according to the critical detection time and the preset module spacing; the critical detection time is the time from the spraying of magnetic powder liquid to the magnetic powder distribution entering the stable magnetic trace stage. S4, control the magnetic non-destructive testing system to move within the workpiece at a critical moving speed, and simultaneously perform magnetic particle testing on the weld of the workpiece to obtain a magnetic particle distribution image on the weld surface. S5, extract images of each position of the weld from the magnetic powder distribution image to obtain the time sequence image of the weld at each spraying time; the spraying time is the time from spraying the magnetic powder liquid to acquiring the magnetic powder distribution image; S6. Extract magnetic trace features from the time-series image and obtain weld defect information based on the magnetic trace features; the magnetic trace features include magnetic trace shape, magnetic trace generation rate and magnetic trace diffusion rate; the defect information includes defect type, defect distribution and defect depth.
[0008] In one embodiment, step S2 includes: S21, control the magnetic non-destructive testing system to enter the workpiece to be tested and move it to the preset position; the preset position is set according to the detection range of the detection module; S22, During the movement of the magnetic non-destructive testing system, magnetic powder liquid is sprayed onto the weld in the preset position according to the amount of spraying and the weld in the preset position is magnetized according to the magnetic field strength. S23, when the magnetic non-destructive testing system moves to the preset position, continuously acquire magnetic powder distribution calibration images on the weld within the preset position; S24, based on the magnetic particle distribution calibration image, the change stage of magnetic particle distribution is identified by optical flow method.
[0009] In one embodiment, step S24 includes: S241, perform preprocessing operations on the magnetic particle distribution calibration image; the preprocessing operations include region alignment and grayscale conversion; S242, based on the preprocessed magnetic powder distribution calibration image, the average movement velocity of the magnetic powder is calculated by the dense optical flow method; S243, determine the stage of change in magnetic powder distribution based on the average movement speed; if the average movement speed is greater than the preset value, it is in the magnetic powder accumulation stage; if the average speed is not greater than the preset value, it is in the stable magnetic trace stage; if the movement direction is reversed, it is in the magnetic trace diffusion stage.
[0010] In one embodiment, step S3 includes: The magnetic powder distribution image on the weld at the preset position is obtained, and the critical detection time is determined based on the change time of the magnetic powder distribution; the critical detection time is the time from the application of magnetic powder liquid to the entry of magnetic powder distribution into the stable magnetic trace stage. The critical moving speed is obtained based on the critical detection time and the preset module spacing; the preset module spacing is the distance between the spraying module and the detection module.
[0011] In one embodiment, step S5 includes: The time-series pixel length is obtained based on the critical moving speed and the preset acquisition interval; Starting from the middle of the magnetic powder distribution image, the magnetic powder distribution image is segmented by the time-series pixel length to obtain magnetic powder distribution fragment images of each location of the weld at each spraying time. By stitching together images of magnetic powder distribution fragments at different weld locations with the same spraying time, a time-series image is obtained.
[0012] In one embodiment, step S6 includes: Each magnetic trace region is obtained through edge detection, and the size and location of each magnetic trace region are determined. The aspect ratio of each magnetic trace region during the magnetic trace stabilization phase is calculated to obtain the shape of the magnetic trace, and the type of defect displayed by the magnetic trace is determined; the defect types include linear defects and point defects. The growth rate and diffusion rate of magnetic traces in each region were calculated using the optical flow method, and the defect depth of each region was obtained by combining the growth rate and diffusion rate.
[0013] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the methods in the second aspect of this application.
[0014] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method of any one of the second aspects of this application.
[0015] The magnetic nondestructive testing system and control method for welds described in this application have the following advantages: The system uses a cleaning module to clean contaminants from the weld seam inside the workpiece before testing, improving the uniformity of the magnetic powder spraying and the adsorption of defects within the weld seam. The illumination module provides sufficient and uniform illumination to the weld seam, improving the image quality acquired by the detection module and thus enhancing the accuracy of image recognition. By cleaning weld seam contaminants and providing uniform illumination, the system reduces contaminant interference during magnetic particle testing, thereby improving the accuracy of magnetic particle testing.
[0016] The control method ensures the uniformity of the magnetic powder coating and the magnetic field strength meet requirements by setting the system's operating parameters for magnetic particle testing based on the parameters of the workpiece to be tested. By performing a magnetic particle testing calibration operation at the beginning of the testing process to obtain the time required for different stages of magnetic powder distribution from the spraying of magnetic powder onto the weld, the critical detection time is calibrated, and the critical moving speed of the system is further determined. This allows the detection module to reach the weld to be tested within the appropriate time and acquire a clear and accurate image of the magnetic powder distribution. By segmenting the images of each location of the weld at different spraying times and stitching them together to obtain a time-series image, and then extracting features from the time-series image to obtain defect information at each location, the accuracy of image recognition is improved. The above method automatically obtains the magnetic particle testing results of the weld by adjusting the critical moving speed and recognizing time-series images at different times, effectively avoiding the problem of inaccurate test results caused by manual evaluation. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of the structure of a magnetic non-destructive testing system for welds provided in this application; Figure 2 This is a flowchart of the steps of a magnetic non-destructive testing control method for welds provided in this application; Figure 3 This is a flowchart of the steps for identifying different stages of magnetic particle distribution changes provided in this application; Figure 4 This application provides a flowchart of the steps for determining the changes in magnetic powder distribution based on the movement speed of the magnetic powder.
[0019] Explanation of reference numerals in the attached figures: 1-Moving module; 2-Cleaning module; 3-Spraying module; 4-Magnetization module; 5-Detection module; 6-Control module; 7-Cleaning fluid container; 8-Magnetic powder liquid container; 9-Magnetic field generator. Detailed Implementation
[0020] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings, which illustrate embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of this application will be thorough and complete.
[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be noted that when an element is considered to be "connected" to another element, it can be directly connected to the other element or connected to the other element through an intermediary element. Furthermore, in the following embodiments, "connection" should be understood as "electrical connection," "communication connection," etc., if there is transmission of electrical signals or data between the connected objects.
[0022] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising / including” or “having,” etc., specify the presence of the stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.
[0023] In one embodiment, this application provides a magnetic non-destructive testing system for welds, such as... Figure 1 As shown, it includes: The moving module 1 is used for horizontal linear movement inside the workpiece to be measured; The cleaning module 2 is located at both ends of the moving module 1 and is used to clean the weld seams of the workpiece to be tested; The spraying module 3 is set on both sides of the moving module 1 and is used to spray magnetic powder liquid onto the weld of the workpiece to be tested. The magnetization module 4 is located on both sides of the moving module 1 and adjacent to the spraying module 3, and is used to magnetize the weld. The detection module 5 is located on both sides of the moving module 1 and adjacent to the magnetization module 4, and is used to acquire images of the magnetic powder distribution on the weld. The lighting module, not shown in the figure, uses existing technology to install LED light sources on the moving module 1. These light sources can be located on both sides of the moving module 1 to provide uniform illumination to the weld. The control module 6 is mounted on the moving module 1 and close to one end. The moving module 1, the cleaning module 2, the spraying module 3, the magnetizing module 4, the detection module 5, and the lighting module are all connected to the control module 1 via signals. Cleaning fluid containers 7 are respectively installed at both ends of the moving module 1. The cleaning fluid container 7 at the same end is connected to the cleaning module 2. The cleaning fluid container 7 is filled with cleaning fluid and is used to provide cleaning fluid to the cleaning module 2. The magnetic powder liquid container 8 is mounted on the moving module 1 and is located at the end furthest from the control module 6. It is connected to the spraying module 3. The magnetic powder liquid container 8 contains magnetic powder liquid and is used to supply magnetic powder liquid to the spraying module 3. The magnetic field generator 9 is mounted on the moving module 1 and electrically connected to the magnetization module 4. It is used to generate and provide a magnetic field to the magnetization module 4. The magnetic field is used to magnetize the workpiece to be tested.
[0024] The magnetic non-destructive testing system for welds described in this application uses a cleaning module to clean contaminants on the weld seam inside the workpiece before testing, improving the uniformity of the magnetic powder spraying and the adsorption of defects within the weld seam. The illumination module provides sufficient and uniform illumination to the weld seam, improving the image quality acquired by the detection module and thus enhancing the accuracy of image recognition. This system improves the quality of magnetic particle inspection images through weld contaminant cleaning and uniform illumination, effectively avoiding inaccurate test results.
[0025] In one embodiment, this application provides a magnetic nondestructive testing control method for welds, applied to the magnetic nondestructive testing system for welds as provided in the first aspect of this application, such as... Figure 2 As shown, the control method includes the following steps S1 to S6: S1, in response to the workpiece parameters of the workpiece to be tested, sets the working parameters of magnetic particle detection; the workpiece parameters include the workpiece length and magnetic permeability; the working parameters include the coating amount of the spraying module and the magnetic field strength of the magnetization module.
[0026] It should be noted that this system uses the magnetic yoke method to apply the magnetic field. That is, by contacting the test surface with the two magnetic yokes of the magnetization module 4, a closed magnetic field can be formed between the magnetization module 4 and the test surface. Defects on the test surface will cause the magnetic field to be distorted and generate a leakage magnetic field. This system also uses wet detection in magnetic particle testing. That is, a suspension containing magnetic powder is sprayed onto the test area through the spraying module 3. The magnetic powder in the suspension is attracted by the leakage magnetic field at the defect and will accumulate on the defect, making the originally invisible minute defects visible to the naked eye.
[0027] Specifically, the staff measures and inputs the parameters of the workpiece to be tested, such as the magnetic permeability of the U-rib of the bridge and the overall length of the U-rib; in response to the input parameters of the workpiece to be tested, the working parameters of the required modules are calculated according to the basic parameters of the required modules for magnetic particle testing; the basic parameters of the required modules may include the magnetic powder liquid capacity of the spraying module 3 and the magnetic pole spacing of the magnetization module 4; the working parameters of the required modules may include the magnetic powder liquid spraying amount of the spraying module 3, the magnetic field strength of the magnetization module 4, and the critical moving speed of the moving module 1.
[0028] S2, according to the working parameters, the weld of the workpiece to be tested is calibrated, and the change stage of magnetic powder distribution is obtained by image recognition of the image of the calibration operation process; the change stage includes magnetic powder accumulation, stable magnetic trace and magnetic trace diffusion.
[0029] It should be noted that, since internal welds are difficult to grind, their surfaces are usually not smooth, and the recessed areas may affect the magnetic field distribution on the weld surface, forming false magnetic traces. Due to the different materials used for welding and the workpiece materials, false magnetic traces may also appear at the weld toe due to the different magnetic permeability of the materials. Performing magnetic particle testing calibration on a small area of the weld before inspection can determine the accumulation and demagnetization time of magnetic particles under the current magnetization detection parameters by observing the formation time, stabilization time, and dissipation time of false magnetic traces. It can also obtain some image features of false magnetic traces, which helps to reduce interference from false magnetic traces in subsequent image processing.
[0030] Specifically, the magnetic particle inspection calibration operation includes cleaning the weld, spraying magnetic powder liquid, and magnetizing the weld area while entering the workpiece at an initial speed; stopping the movement, spraying, and magnetization upon reaching the endpoint of a small weld area, and recording images of the small weld area over a period of time; identifying false magnetic traces and possible defect magnetic traces through the magnetic powder distribution in the images, and determining the changing stages of magnetic powder distribution based on the accumulation and diffusion of magnetic traces and false magnetic traces, and calculating the magnetic powder accumulation time and stabilization time; the accumulation time is the time from magnetization to the magnetic trace stabilization stage; the stabilization time is the time from magnetization to the diffusion of the magnetic trace.
[0031] S3, the critical detection time is obtained based on the change stage of magnetic powder distribution, and the critical moving speed is obtained according to the critical detection time and the preset module spacing; the critical detection time is the time from the spraying of magnetic powder liquid to the magnetic powder distribution entering the stable magnetic trace stage.
[0032] Specifically, based on the time it takes for magnetic particles to migrate and form a stable magnetic mark, the magnetic particle detection operation time for any point on the weld is obtained, and the critical moving speed is obtained by combining the distance from the spraying module 3 to the detection module 5; the magnetic particle detection operation time can be taken as a value within the stable time range.
[0033] S4 controls the magnetic non-destructive testing system to move within the workpiece at a critical speed, while simultaneously performing magnetic particle testing on the weld of the workpiece to obtain an image of the magnetic particle distribution on the weld surface.
[0034] Specifically, the control module 1 moves forward inside the workpiece based on a critical moving speed, while simultaneously controlling the cleaning module 2, spraying module 3, magnetization module 4, and detection module 5 to jointly perform magnetic particle detection on the internal weld and obtain an image of the magnetic particle distribution on the weld surface.
[0035] S5, extract images of each position of the weld from the magnetic powder distribution image to obtain the time sequence image of the weld at each spraying time; the spraying time is the time from spraying the magnetic powder liquid to acquiring the magnetic powder distribution image.
[0036] Understandably, since the magnetic particle detection of the workpiece is continuous, the images acquired by the detection module will simultaneously include images of the magnetic trace stabilization stage at that location, images of the magnetic trace diffusion stage at the previous location, and images of the accumulation stage at the subsequent location. Moreover, since the moving module 1 moves at a constant speed, the continuously acquired magnetic particle distribution images should include images of each location of the weld at each spraying time. By segmenting the magnetic particle distribution images and stitching them together in a time sequence, the time sequence images of the workpiece at each spraying time can be obtained.
[0037] Specifically, the acquired magnetic powder distribution images are preprocessed, including segmentation, noise reduction, alignment, and contrast enhancement. The segmentation length of the magnetic powder distribution image is obtained based on the critical moving speed and acquisition interval, and the image is divided into several images according to the segmentation length. Each image contains the magnetic powder distribution of the image within a certain spraying time. Images at different positions corresponding to the same spraying time are stitched together according to their positional order to obtain one or more time-series images of the workpiece under test from the stage of magnetic powder spraying to magnetic trace diffusion.
[0038] S6. Extract magnetic trace features from the time-series image and obtain weld defect information based on the magnetic trace features; the magnetic trace features include magnetic trace shape, magnetic trace generation rate and magnetic trace diffusion rate; the defect information includes defect type, defect distribution and defect depth.
[0039] Specifically, by extracting the magnetic trace region and its features, the defect type and its distribution shown by the magnetic trace are obtained based on the features of the magnetic trace region.
[0040] Furthermore, by analyzing the time-series image of the magnetic indentation region at any point in the weld using an algorithm, the speed at which magnetic powder migrates and accumulates on the defect to generate magnetic indentations, as well as the speed at which magnetic indentations diffuse at the defect during demagnetization, can be obtained. Based on the magnetic indentation generation speed and diffusion speed, the depth of the defect can be determined.
[0041] In this embodiment, the magnetic non-destructive testing control method for welds provided in this application ensures the uniformity of the sprayed magnetic powder liquid and the magnetic field strength meet the requirements by setting the working parameters of the system during magnetic particle testing according to the parameters of the workpiece to be tested. By performing a magnetic particle testing calibration operation at the beginning of the magnetic particle testing to obtain the time required for different stages of magnetic powder distribution after weld magnetization, the critical detection time is calibrated, and the critical moving speed of the system is further determined, enabling the detection module to reach the weld to be tested within an appropriate time and acquire a clear and accurate magnetic powder distribution image. By segmenting the images of each position of the weld at different spraying times and stitching them together to obtain a time-series image, and then extracting features from the time-series image to obtain the defect information at each position, the accuracy of image recognition can be improved. The above method automatically obtains the magnetic particle testing results of the weld by adjusting the critical moving speed and recognizing the time-series images at different times, effectively avoiding the problem of inaccurate test results caused by manual evaluation.
[0042] In an exemplary embodiment, step S1 specifically includes: S11, the magnetic field strength of the magnetization module is obtained based on the magnetic permeability of the workpiece; S12, the amount of coating applied by the coating module is determined based on the length of the workpiece.
[0043] Specifically, during magnetic particle inspection, the magnetic flux density on the workpiece surface determines the efficiency of magnetic powder adsorption by defects. The magnetic flux density depends on the applied magnetic field strength and the magnetic permeability of the workpiece. The magnetic field strength of the magnetization module corresponds to the magnetic flux density sufficient to magnetize the workpiece and produce clearly visible magnetic traces on its surface, generally not less than 1T. On the other hand, due to the limitation of the magnetic powder liquid container in the spraying module 3, the amount of magnetic powder liquid for each magnetic particle inspection is limited. Therefore, it is necessary to obtain the maximum spraying amount for each segment of the weld seam based on the length of the workpiece to be tested. The spraying amount should be sufficient to display the defect magnetic traces on the weld seam, but it should not be too large, otherwise the probability of false magnetic traces will increase.
[0044] Furthermore, the formula for calculating the magnetic field strength based on the magnetic permeability is as follows:
[0045] in, The magnetic field strength; Magnetic flux density; Let be the vacuum permeability, and take . ; The relative permeability of the workpiece.
[0046] For example, if the minimum magnetic flux density on the workpiece surface is taken as 1T, and low carbon steel is used for common bridge U-ribs with a relative permeability of 2000, the minimum magnetic field strength can be obtained as 398A / m; the operating current of the magnetization module 4 can also be obtained based on the minimum magnetic field strength of the magnetization module 4 and the pole spacing of the yoke in the magnetization module 4.
[0047] For example, the length of the workpiece to be tested is 20m, and the capacity of the magnetic powder liquid container is 200mL; if the welds on both sides are tested at the same time, the total length is 40m, then the maximum amount of spraying per 1m is 50mL; if the initial moving speed of the system is 1m / min, then the maximum initial spraying flow rate is approximately 0.83mL / s.
[0048] In one exemplary embodiment, such as Figure 2 As shown, step S2 specifically includes the following steps S21 to S24: S21, control the magnetic non-destructive testing system to enter the workpiece to be tested and move it to the preset position; the preset position is set according to the detection range of the detection module.
[0049] Specifically, when the moving module limiter is adjusted to be in close contact with the inner wall of the workpiece to be tested, the moving module 1 moves into the interior of the workpiece to be tested according to the initial moving speed, and the front cleaning module 2 is activated to clean the weld seam until only the image of the weld seam is visible within the detectable range of the detection module 5.
[0050] S22, During the movement of the magnetic non-destructive testing system, magnetic powder liquid is sprayed onto the weld seam in the preset position according to the amount of spraying and the weld seam in the preset position is magnetized according to the magnetic field strength.
[0051] Specifically, during the process of driving into the workpiece to be tested, if the spray nozzle has reached the workpiece, the control spray module 3 sprays magnetic powder liquid onto the weld according to the initial spray flow rate, and then the magnetization module 4 and the detection module 5 are started to perform magnetic powder detection.
[0052] S23, when the magnetic non-destructive testing system moves to the preset position, continuously acquire magnetic powder distribution calibration images on the weld within the preset position.
[0053] Specifically, the preset position is set according to the size of the detectable range of the detection module; when only the image of the workpiece to be tested is found within the detectable range of the detection module 5, the moving module 1, cleaning module 2, spraying module 3 and magnetizing module 4 are controlled to stop working, and the detection module 5 is controlled to collect continuous magnetic powder distribution calibration images of the preset position of the weld seam in the workpiece to be tested at intervals within a preset time period.
[0054] Preferably, the preset duration is set to 15 seconds, including the time for magnetic powder to accumulate on the defect to form magnetic traces and the time for magnetic powder to diffuse after the magnetization weakens.
[0055] S24, based on the magnetic particle distribution calibration image, the change stage of magnetic particle distribution is identified by optical flow method.
[0056] Step S24 includes the following steps S241 to S243: S241, perform preprocessing operations on the magnetic particle distribution calibration image; the preprocessing operations include region alignment and grayscale conversion.
[0057] Specifically, camera shake is eliminated by SIFT or ORB feature matching to ensure that the optical flow is dominated by magnetic powder; and magnetic powder contrast is enhanced by grayscale or RGB channel separation.
[0058] S242, based on the preprocessed magnetic powder distribution calibration image, calculates the average movement velocity of the magnetic powder using the dense optical flow method.
[0059] Specifically, the motion vector of the magnetic powder in the weld area is calculated based on the change of the magnetic powder position in the calibration image using the dense optical flow method, and the velocity amplitude map and motion direction map are calculated based on the motion vector; the calibration image is divided into regions according to different directions in the motion direction map, and the average velocity of each region is calculated in combination with the velocity amplitude map.
[0060] S243, determine the stage of change in magnetic powder distribution based on the average movement speed; if the average movement speed is greater than the preset value, it is in the magnetic powder accumulation stage; if the average speed is not greater than the preset value, it is in the stable magnetic trace stage; if the movement direction is reversed, it is in the magnetic trace diffusion stage.
[0061] Specifically, since the magnetic powder has a very small mass, it migrates very quickly under the influence of a magnetic field. Therefore, the completion of magnetic powder migration can be determined by its movement speed. When the average movement speed of the magnetic powder in each region is greater than the preset speed value, the magnetic powder migration is in the accumulation stage. When the average movement speed of the magnetic powder in each region is not greater than the preset value, the magnetic powder migration is in the stable stage. When the direction of magnetic powder movement is opposite to the initial direction in any region, the magnetic powder migration is in the diffusion stage. At this time, the surface magnetic field at that location begins to demagnetize, the magnetic field's attraction to the magnetic powder is insufficient, and under the influence of gravity, the magnetic powder diffuses from the magnetic trace.
[0062] The method in this embodiment uses optical flow to determine the stage of change in magnetic particle migration during the calibration operation, and obtains the time for magnetic particle migration to reach a stable stage under the current operating parameters, providing a basis for determining the critical detection time of the detection module 5 and the critical moving speed of the moving module 1.
[0063] In an exemplary embodiment, step S3 includes the following steps S31 to S32: S31, acquire the magnetic powder distribution image on the weld at the preset position, and determine the critical detection time based on the change time of the magnetic powder distribution; the critical detection time is the time from the application of magnetic powder liquid to the magnetic powder distribution entering the stable magnetic trace stage.
[0064] Specifically, by extracting image features from magnetic powder distribution images, the process of magnetic powder migration is identified, and the optimal critical detection time is selected within the time range of forming stable magnetic traces.
[0065] It is understandable that during the process of magnetic powder accumulation, the grayscale gradient of the image continuously increases due to the accumulation of magnetic powder, and the contrast also increases; when the magnetic powder accumulates to form a stable magnetic trace, the contrast reaches its maximum and the edges of the magnetic trace are clear; during the demagnetization process, the magnetic powder diffuses due to gravity, the contrast decreases and the grayscale distribution changes.
[0066] S32, the critical moving speed is obtained based on the critical detection time and the preset module spacing; the preset module spacing is the distance between the spraying module and the detection module.
[0067] Specifically, the preset module spacing is the distance between the magnetization module and the detection module. By adjusting the moving speed to the critical moving speed, the detection module arrives at the weld seam within the critical detection time after the magnetic powder liquid is sprayed onto the weld seam, so that clear and stable magnetic traces can be collected.
[0068] Optionally, the moving speed can also be set according to the time from the application of the magnetic powder liquid to the entry into the magnetic indication diffusion stage, since the magnetic indication stabilization stage has a certain duration.
[0069] The method in this embodiment obtains the critical moving speed through the critical detection time, ensuring that the detection module 5 can acquire a stable and clear magnetic trace image within the critical detection time.
[0070] In an exemplary embodiment, step S4 includes steps S41 to S45: S41 controls the magnetic non-destructive testing system to move forward at a critical speed inside the workpiece to be tested, while simultaneously controlling the front-end cleaning module to clean the weld seam in front.
[0071] Specifically, after the magnetic particle testing and calibration operation, the control moving module 1 moves forward inside the workpiece to be tested according to the obtained critical moving speed, and at the same time, the front cleaning module 2, spraying module 3, magnetization module 4 and lighting module are activated.
[0072] S42 controls the spraying module to spray magnetic powder liquid onto the cleaned weld seam.
[0073] Specifically, the spraying flow rate of the spraying module 3 is reset according to the obtained critical moving speed. During the movement, the spraying module 3 uniformly sprays magnetic powder liquid onto the internal weld of the workpiece to be tested.
[0074] S43 controls the magnetization module to magnetize the sprayed weld seam.
[0075] Specifically, the magnetic yoke of the magnetization module 4 is in close contact with both sides of the weld, and magnetizes the weld area during the movement.
[0076] S44, control the detection module to acquire images of the magnetic powder distribution on the magnetized weld.
[0077] Specifically, during the movement, the lighting module illuminates the weld seam with uniform white light; the detection module 5 acquires the magnetic particle distribution image of the current weld seam according to the preset acquisition interval; the acquisition interval should not be too long, and the continuous images should be able to clearly record the change process of magnetic particle distribution at any point in the weld seam.
[0078] S45, when the rear cleaning module reaches the sprayed weld seam, cleans the magnetic powder liquid on the weld seam.
[0079] Specifically, when the rear cleaning module 2, located at the rear of the moving module 1, enters the workpiece to be tested, the rear cleaning module 2 is activated to clean the weld that has completed magnetic particle testing.
[0080] In an exemplary embodiment, step S5 includes the following steps S51 to S53: S51, the time sequence pixel length is obtained based on the critical moving speed and the preset acquisition interval.
[0081] Specifically, the physical length of the segment is obtained by multiplying the critical moving speed by the preset acquisition interval, and then the temporal pixel length is obtained according to the calibration coefficient.
[0082] For example, if the critical moving speed is 1 m / min and the preset acquisition interval is 1 s, then the physical length to be segmented is approximately 16.7 mm. If the same position differs by 100 pixels in two adjacent acquired images, then the calibration coefficient is 16.7 mm divided by 100 pixels, that is, 1 pixel corresponds to 0.167 mm. The calibration coefficient is used to correlate the physical length and the pixel length, and it is also used in the process of determining the location of defects on the workpiece.
[0083] S52, starting from the middle of the magnetic powder distribution image, the magnetic powder distribution image is divided by the time-series pixel length to obtain magnetic powder distribution fragment images of each position of the weld at each spraying time.
[0084] Specifically, since the magnetic powder distribution image has a clear and stable magnetic trace image in the middle, several magnetic powder distribution fragment images with different spraying times at different positions are segmented from the middle of each magnetic powder distribution image by the time sequence pixel length.
[0085] For example, if a magnetic powder distribution image is 1600×1200 in size, then starting from the horizontal coordinate 750-850 and using 100 pixels as the temporal pixel length, the image with the horizontal coordinate 50-1550 can be divided into 15 fragment images of size 100×1200.
[0086] S53. By stitching together images of magnetic powder distribution fragments at different weld locations with the same spraying time, a time-series image is obtained.
[0087] Specifically, after the magnetic powder distribution image is segmented into several fragment images, the fragment images at the same position in each image are images at different positions of the same spraying time; the fragment images at the same position in each magnetic powder distribution image are spliced together in positional order to form several time-series images of a preset length; the preset length corresponds to the input image length allowed by the image recognition algorithm.
[0088] For example, the fragmented images, divided into 15 pieces, are sequentially numbered from 1 to 15, corresponding to spraying times of 1 to 15 seconds respectively. If a total of 200 magnetic powder distribution images are collected, with an image length of 1600, the image numbered 1 among the 200 magnetic powder distribution images can be stitched together to obtain 12 images with a length of 1600 and 1 time-series image with a length of 800. These time-series images show the magnetic powder distribution of the weld seam of the workpiece under test when the spraying time is 1 second.
[0089] The method in this embodiment obtains a time sequence image of the weld by segmenting magnetic powder distribution images at different locations and stitching together images with the same spraying time, providing data for identifying defect information corresponding to magnetic marks.
[0090] In an exemplary embodiment, step S6 includes the following steps S61 to S63: S61, obtain each magnetic trace region through edge detection, and determine the size and position of each magnetic trace region.
[0091] Specifically, the time-series images are preprocessed by alignment and denoising to remove false magnetic traces as noise; then, the magnetic trace regions in the time-series images corresponding to the clear magnetic trace stage are obtained through edge detection, and the area of the magnetic trace regions is also obtained; a rectangular coordinate system is established in the time-series images, and the position of each defect region in the weld is obtained by combining the calibration coefficients.
[0092] S62, calculate the aspect ratio of each magnetic trace region during the magnetic trace stabilization stage to obtain the shape of the magnetic trace, and determine the defect type displayed by the magnetic trace; the defect type includes linear defects and point defects.
[0093] Specifically, by calculating the aspect ratio of the defect, that is, the ratio of the length of the long side to the length of the short side of the magnetic powder accumulation area, it can be determined whether the defect is a linear crack or a point defect; the area occupied by the defect is obtained by multiplying the number of pixels in the magnetic powder accumulation area by the calibration coefficient.
[0094] S63, calculate the magnetic trace growth rate and diffusion rate of each magnetic trace region according to the optical flow method, and combine the growth rate and diffusion rate to obtain the defect depth displayed in each magnetic trace region.
[0095] It is understandable that, due to the large leakage magnetic field of surface defects, magnetic powder will migrate and accumulate on the surface defects more quickly, and the magnetic trace can remain for a long time after the magnetic yoke leaves. On the other hand, near-surface defects are buried within 2 mm below the workpiece surface, so the leakage magnetic field on the workpiece surface is smaller, and the ability to attract magnetic powder is weaker. Therefore, the magnetic powder cannot migrate to the near-surface defects quickly, and the magnetic trace is prone to diffusion after the magnetic yoke leaves.
[0096] Specifically, the optical flow field during the magnetic particle migration process in adjacent time-series images can be calculated using the optical flow method, and then the migration velocity can be statistically analyzed. If the magnetic particle migration velocity is greater than a first preset value, it indicates that there is a surface defect in the defect region. If the magnetic particle migration velocity is not greater than the first preset value, it indicates that there is a near-surface defect in the defect region. The first preset value is the maximum migration velocity of magnetic particles attracted by near-surface defects.
[0097] On the other hand, the optical flow field of the magnetic powder diffusion process after the magnetic yoke leaves the adjacent time-series images is calculated by optical flow method to further obtain the diffusion velocity; if the diffusion velocity is not greater than the second preset value, it indicates that there is a surface defect in the defect area, otherwise there is a near-surface defect; the second preset value is the maximum value of the magnetic powder diffusion velocity on the surface defect after the magnetic yoke leaves; the first preset value and the second preset value can be obtained by defect test piece experiment.
[0098] The method in this embodiment extracts and identifies various features of the magnetic trace region, thereby obtaining defect information of defects in each magnetic trace region, improving the speed and accuracy of obtaining defect information, and reducing errors caused by manual evaluation.
[0099] It should be understood that, although Figure 2-4 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2-4At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0100] Thirdly, this application provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of any one of the magnetic non-destructive testing control methods for welds provided in this application.
[0101] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the magnetic non-destructive testing control methods for welds provided in this application.
[0102] In the description of this application, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is usually based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this application and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this application.
[0103] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this application.
Claims
1. A magnetic non-destructive testing control method for welds, applied to a magnetic non-destructive testing system for welds for testing and control, wherein the magnetic non-destructive testing system for welds includes a moving module (1), a cleaning module (2), a spraying module (3), a magnetizing module (4), a detection module (5), an illumination module, and a control module (6). The moving module (1), the cleaning module (2), the spraying module (3), the magnetization module (4), the detection module (5), and the lighting module are all signal-connected to the control module (6); Its features are, The control method includes the following steps: S1, in response to the workpiece parameters of the workpiece to be tested, set the working parameters of the magnetic particle detection; the workpiece parameters include the workpiece length and magnetic permeability; the working parameters include the coating amount of the spraying module and the magnetic field strength of the magnetization module; S2, calibrate the weld of the workpiece to be tested according to the working parameters, and obtain the change stages of magnetic powder distribution by image recognition of the image of the calibration operation process; the change stages include magnetic powder accumulation, stable magnetic trace and magnetic trace diffusion. S3, the critical detection time is obtained based on the change stage of the magnetic powder distribution, and the critical moving speed is obtained according to the critical detection time and the preset module spacing; the critical detection time is the time from the spraying of magnetic powder liquid to the magnetic powder distribution entering the stable magnetic trace stage. S4, control the magnetic non-destructive testing system to move within the workpiece to be tested at the critical moving speed, and simultaneously perform magnetic particle testing on the weld of the workpiece to be tested to obtain a magnetic particle distribution image on the weld surface. S5, extract images of each position of the weld in the magnetic powder distribution image to obtain a time sequence image of the weld at each spraying time; the spraying time is the time from spraying the magnetic powder liquid to acquiring the magnetic powder distribution image; S5 includes: The temporal pixel length is obtained based on the critical moving speed and the preset acquisition interval; Starting from the middle of the magnetic powder distribution image, the magnetic powder distribution image is divided by the time sequence pixel length to obtain magnetic powder distribution fragment images of each position of the weld at each spraying time; The time-series image is obtained by stitching together magnetic powder distribution fragment images of different weld locations at the same spraying time; S6, extract the magnetic trace features from the time-series image, and obtain the defect information of the weld based on the magnetic trace features; the magnetic trace features include the shape of the magnetic trace, the generation rate of the magnetic trace, and the diffusion rate of the magnetic trace; the defect information includes the defect type, defect distribution, and defect depth; S6 includes: Each magnetic trace region is obtained through edge detection, and the size and location of each magnetic trace region are determined. The aspect ratio of each magnetic trace region during the magnetic trace stabilization phase is calculated to obtain the shape of the magnetic trace, and the type of defect displayed by the magnetic trace is determined; the defect types include linear defects and point defects. The growth rate and diffusion rate of magnetic traces in each region are calculated using the optical flow method, and the defect depth of each region is obtained by combining the growth rate and the diffusion rate.
2. The magnetic non-destructive testing control method for welds according to claim 1, characterized in that, Step S2 includes: S21, control the magnetic non-destructive testing system to enter the workpiece to be tested and move it to a preset position; the preset position is set according to the detection range of the detection module; S22, during the movement of the magnetic non-destructive testing system, magnetic powder liquid is sprayed onto the weld in the preset position according to the spraying amount and the weld in the preset position is magnetized according to the magnetic field strength; S23, when the magnetic non-destructive testing system moves to a preset position, continuously acquire magnetic particle distribution calibration images on the weld within the preset position; S24, Based on the magnetic powder distribution calibration image, the change stage of magnetic powder distribution is identified by optical flow method.
3. The magnetic non-destructive testing control method for welds according to claim 2, characterized in that, Step S24 includes: S241, Perform preprocessing operations on the magnetic particle distribution calibration image; the preprocessing operations include region alignment and grayscale conversion; S242, based on the preprocessed magnetic powder distribution calibration image, the average movement velocity of the magnetic powder is calculated by the dense optical flow method; S243, determine the stage of change in magnetic powder distribution based on the average movement speed; if the average movement speed is greater than a preset value, it is in the magnetic powder accumulation stage; if the average movement speed is not greater than the preset value, it is in the stable magnetic trace stage; if the movement direction reverses, it is in the magnetic trace diffusion stage.
4. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3.
5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-3.