Welding seam X-ray negative film automatic defect detection and analysis method and device

By automatically digital acquisition and intelligent defect identification of weld X-ray films, the problem of strong subjectivity in manual assessment is solved, and efficient and accurate weld detection and analysis is achieved.

CN120064688AInactive Publication Date: 2025-05-30TAIYUAN UNIVERSITY OF SCIENCE AND TECHNOLOGY
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510549821.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-05-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the evaluation of weld X-ray negative films mainly relies on manual labor, and there are problems such as strong subjectivity and difficult to guarantee the quality of testing.

Method used

Design a method for automatic defect detection and analysis of weld X-ray negative films, and realize automated digital acquisition and processing of ray negative films through the improvement of existing viewing lamps, and use artificial intelligence and computer vision technology to identify and evaluate negative films.

Benefits of technology

It realizes automatic detection of weld X-ray negative films, improves detection accuracy and efficiency, reduces labor intensity and detection costs, and can continuously and accurately detect and in-depth data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120064688A_ABST
    Figure CN120064688A_ABST
Patent Text Reader

Abstract

The invention relates to the field of nondestructive testing, in particular to an automatic defect detection and analysis method and device for a welding seam X-ray negative film. Comprising an automatic transmission film viewing device, a digital acquisition device and an intelligent detection and evaluation device. According to the method, X-ray negative films are transmitted, transported, polished and observed, the digital acquisition device carries out image recognition and acquisition through an industrial camera, acquired data are transmitted to a PC (Personal Computer) terminal, and a neural network self-optimized X-ray welding seam defect detection and size measurement method is adopted for recognition and acquisition operation to detect and analyze welding seam defects. According to the method, a PC terminal-PLC-industrial camera cooperative work method is constructed, intelligent defect identification and evaluation are carried out on the negative film by utilizing artificial intelligence and computer vision technologies, the welding seam X-ray negative film is detected by adopting YOLOv5 as a defect detection algorithm, the welding quality is evaluated, the welding problem is positioned, and an optimization direction is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of nondestructive testing, and more particularly to an automatic defect detection and analysis method and device for weld X-ray films. Background Art

[0002] Metal materials have been widely used in daily life and industry, and the application scenarios have gradually expanded. More importantly, they are involved in national defense, aerospace and other aspects, and the quality requirements for metal materials in these fields are extremely strict. In the process of using metal materials for production, due to the manufacturing process, some metal materials may have local invisibility due to welding. The welds, which are the weakest areas of the complete components, often have defects such as pores, slag inclusions, and cracks, making it difficult to achieve high-quality narrow-gap welding; and with the increase in service life and the influence of the operating environment, new defects will also occur. Accidents caused by neglecting weld quality are common, which requires strict quality inspection of welds to minimize economic losses and reduce the occurrence of safety accidents.

[0003] Therefore, how to improve the detection accuracy, detection efficiency, and automation level will be an important research direction in the future for the defect detection of metal materials, with broad application and development prospects.

[0004] At present, as a main nondestructive testing method, X-ray testing has the advantages of high resolution, stability and reliability, and is conducive to qualitative and quantitative analysis. With the integration of electronic technology and information technology, emerging cutting-edge technologies such as computed radiography, real-time radiography, and digital radiography based on electronic and information technology have emerged. However, although new radiographic technologies emerge in an endless stream, the evaluation of their films is still mainly manual. The disadvantages of manual evaluation are also obvious: manual recognition mainly uses the method of manual visual recognition, which is simple, but this method is dominated by people's subjective feelings and experience, so it is difficult to form a unified standard; moreover, the production site environment is harsh, and the physical and mental health of quality inspection personnel is extremely vulnerable to influence, so the inspection quality is difficult to guarantee. Summary of the Invention

[0005] In order to solve these unavoidable problems of manual evaluation in the above-mentioned prior art, the present invention designs an automatic defect detection and analysis method and device for weld X-ray films. By improving the existing view box, automatic digital acquisition and processing of ray films are realized; and artificial intelligence and computer vision technology are used to intelligently identify and evaluate the defects on the films.

[0006] An automatic defect detection and analysis method for weld X-ray films designed by the present invention includes the following steps: S100: X-ray film transmission: The X-ray film is pre-stored in the film storage module to be inspected. The polyurethane-coated friction wheels are used to slice the X-ray film. The sliced X-ray film is driven by multiple subsequent groups of polyurethane-coated friction wheels to be transmitted to the designated polishing and acquisition position. When the X-ray film is in place, the PLC control stops the transmission of the X-ray film and enhances the light intensity in the viewing area; S200: X-ray film information acquisition: The industrial camera is aligned with the X-ray film polishing and acquisition position to collect the digital image of the welded joint X-ray film that has been transmitted and in place, and transmit it to the PC-side host computer; The PC timely starts to control the industrial camera to collect the film digital image in units of video frames through the OpenCV call of the UVC protocol according to the feedback information of the PLC. Each film is collected at intervals set by the GUI in units of frames; S300: Recognition and operation: The YOLOv5 algorithm is used as the core algorithm for defect detection; S400: Information storage: When the digital image of the welded joint X-ray film, the film number, and the defect information are collected, they are uploaded to the server for storage. The server system uses Ubuntu Server, and the database uses MySQL for storage; S500: Transmit the inspected X-ray film into the film storage box, and repeat steps S100~S500 to perform the transmission and inspection of the next X-ray film.

[0007] Further, step S300 includes: S310: Extract the contour of the welded joint defect; S320: Obtain the pixel size; S330: Determine the mapping relationship between the pixel size and the actual size.

[0008] Further, step S310 includes: S311: Perform object detection with the trained detection model; S312: Use the OpenCV contour recognition algorithm to fit the contour features of the welded joint defect; S313: Perform linear fitting on the extracted contour point pixels according to the principle of the minimum sum of squared deviations; The calculation formula is: Where represents the contour pixel point coordinates, and , is the fitted binomial function, is the square of the deviation of the fitted straight line on ; S314: Use the minimum bounding rectangle to characterize its size information; Step S320 includes: S321: Obtain the coordinates of the top-left pixel and the bottom-right pixel; S322: Calculate the distance between these two diagonal points; S323: Calculate the pixel width and pixel height of the weld defect; Step S330 includes: Introduce a conversion factor to convert the pixel size to the actual size.

[0009] In addition, the present application also provides a device for automatic defect detection and analysis of weld X-ray films, which can implement the above-mentioned method for automatic defect detection and analysis of weld X-ray films, including: an automatic film conveying and viewing device, a digital acquisition device, and an intelligent detection and evaluation device; the automatic film conveying and viewing device includes a structural frame, the structural frame is set as a right trapezoid, two of the structural frames are symmetrically arranged, the inner bottom is provided with a bottom plate connection, the upper inclined surfaces of the two structural frames are provided with an acrylic plate connection, a film storage and to-be-inspected module is arranged at the lower part of one end of the structural frame, a film storage box is arranged at the upper part of the other end of the structural frame, the structural frame is provided with a film conveying system, the film conveying system conveys the X-ray film in pieces from the film storage and to-be-inspected module to the acrylic plate for information acquisition by the digital acquisition device, the acquired information is transmitted to the intelligent detection and evaluation device for analysis, after the acquisition is completed, the film conveying system continues to convey the X-ray film to the film storage box; a digital acquisition device is arranged on the obliquely upward side of the acrylic plate, the digital acquisition device includes an industrial camera and a support frame at the lower part; the intelligent detection and evaluation device includes a PC and a server, and the automatic film conveying and viewing device and the digital acquisition device perform signal interaction and transmission with the PC.

[0010] Further, side plates are provided on both sides of the upper part of the acrylic plate, and the negative film conveying system is installed on the bottom plate and the side plates. Specifically, a first motor is fixedly arranged on the bottom plate, a film-splitting rotating shaft is movably arranged on the side plate, film-splitting synchronous belt wheels are arranged on the same side of the first motor and the film-splitting rotating shaft, and the two film-splitting synchronous belt wheels are connected by a synchronous belt. A film-splitting synchronous belt wheel is fixedly arranged on the film-splitting rotating shaft, and a film-splitting rubber-coated friction wheel is fixedly arranged on the film-splitting rotating shaft; an upper clamping conveying shaft is movably arranged on the side plate obliquely above the film-splitting rotating shaft, upper clamping synchronous belt wheels are arranged on the same side of the film-splitting rotating shaft and the upper clamping conveying shaft, and the two upper clamping synchronous belt wheels are connected by a synchronous belt. An upper clamping conveying rubber-coated friction wheel is fixedly arranged on the upper clamping conveying shaft; a second motor is fixedly arranged on the bottom plate, a lower clamping conveying shaft is symmetrically arranged obliquely below the acrylic plate with respect to the upper clamping conveying shaft, lower clamping synchronous belt wheels are arranged on the same side of the second motor and the lower clamping conveying shaft, and a lower clamping conveying rubber-coated friction wheel is correspondingly arranged at a position corresponding to the upper clamping conveying rubber-coated friction wheel on the lower clamping conveying shaft. The gap between the upper clamping conveying rubber-coated friction wheel and the lower clamping conveying rubber-coated friction wheel is smaller than the thickness of the X-ray negative film; a groove is arranged at the position of the acrylic plate between the upper clamping conveying rubber-coated friction wheel and the lower clamping conveying rubber-coated friction wheel; a third motor is fixedly arranged on the bottom plate, an upper conveying positioning shaft is movably arranged at the upper end of the side plate, upper conveying synchronous belt wheels are arranged on the same side of the third motor and the upper conveying positioning shaft, and the two upper conveying synchronous belt wheels are connected by a synchronous belt. An upper conveying positioning rubber-coated friction wheel is fixedly arranged on the upper conveying positioning shaft; a lower conveying positioning shaft is arranged obliquely below the acrylic plate parallel to the upper conveying positioning shaft, lower conveying synchronous belt wheels are arranged on the same side of the other side of the upper conveying positioning shaft and the lower conveying positioning shaft, and the two lower conveying synchronous belt wheels are connected by a synchronous belt. A lower conveying positioning rubber-coated friction wheel is fixedly arranged on the lower conveying positioning shaft; the gaps between the upper conveying positioning rubber-coated friction wheel and the lower conveying positioning rubber-coated friction wheel and the acrylic plate are smaller than the thickness of the X-ray negative film.

[0011] Further, the negative film storage and to-be-inspected module includes a negative film pre-storage box. Linear guide rails are arranged inside both sides of the negative film pre-storage box. Sliders are slidably arranged on the linear guide rails. A negative film support plate is fixedly arranged on the top of the slider. A spring is arranged between the bottom of the negative film support plate and the negative film pre-storage box. X-ray negative films are placed layer by layer on the upper part of the negative film support plate. A guiding slope is arranged on the upper part of the negative film pre-storage box, and the slope direction of the guiding slope is the same as that of the acrylic plate.

[0012] Compared with the prior art, the beneficial effects of the present invention are: 1. The mechanical structure of the present invention is compact and operates reliably and stably. The automatic film conveying and viewing device realizes the high integration and modularization of multi-functional mechanisms. The integrated design reduces the energy loss that may be caused by too long a transmission path. The modular design divides the device into three modules, improving the assembly efficiency, reducing the maintenance cost, and greatly increasing the compactness, portability and functional expandability of the device.

[0013] 2. The present invention can continuously and accurately detect and conduct in-depth data analysis. The digital acquisition device collects the negative films frame by frame at intervals and sends control instructions to the automatic film transporting device in real time. The present invention constructs a method for the collaborative work of the PC-PLC-industrial camera. By using YOLOv5 as the defect detection algorithm to detect the weld X-ray negative films, the welding quality is evaluated, the welding problems are located, and the optimization direction is proposed.

[0014] 3. The present invention can improve work efficiency and reduce labor intensity. The automated intelligent device can maintain a stable working rhythm and is not affected by factors such as fatigue and emotions, greatly reducing the physical consumption of workers and lowering the labor intensity. For the detection and evaluation of weld X-ray negative films, manual detection and evaluation take a lot of time, and the evaluation results are easily affected by the subjective factors of the inspectors. While artificial intelligence conducts detection according to preset standards and algorithms, without being interfered by subjective factors, and can consistently provide stable and accurate detection results. Description of the Drawings

[0015] Figure 1 is the layout diagram of the device of the present invention; Figure 2 is the structural diagram of the automatic film conveying and viewing device of the present invention; Figure 3 is the structural diagram of the automatic film conveying and viewing device of the present invention from another angle; Figure 4 is the structural diagram of the film conveying system of the present invention; Figure 5 is the structural diagram of the film conveying system of the present invention from another angle; Figure 6 is the exploded view of the structure of the film storage and waiting-for-inspection module of the present invention; Figure 7 is the schematic diagram of the perspective of the industrial camera of the present invention.

[0016] Description of the Reference Numerals: 100 - Automatic film viewing device for transmission; 200 - Digital acquisition device; 1 - Structural frame; 2 - Film storage module to be inspected; 21 - Film pre - storage box; 22 - Guide ramp; 23 - Film support plate; 24 - Linear guide rail; 25 - Slide block; 26 - Spring; 3 - Film storage box; 4 - Acrylic plate; 41 - Groove; 5 - Side plate; 6 - Film transmission system; 601 - First motor; 602 - Film - splitting rotating shaft; 603 - Film - splitting synchronous pulley; 604 - Film - splitting rubber - coated friction wheel; 605 - Upper clamping conveying shaft; 606 - Upper clamping synchronous pulley; 607 - Upper clamping conveying rubber - coated friction wheel; 611 - Second motor; 612 - Lower clamping conveying shaft; 613 - Lower clamping synchronous pulley; 614 - Lower clamping conveying rubber - coated friction wheel; 621 - Third motor; 622 - Upper conveying positioning shaft; 623 - Upper conveying synchronous pulley; 624 - Upper conveying positioning rubber - coated friction wheel; 625 - Lower conveying positioning shaft; 626 - Lower conveying synchronous pulley; 627 - Lower conveying positioning rubber - coated friction wheel; 7 - Bottom plate; 8 - X - ray film; 9 - Weld seam. Detailed implementation mode

[0017] The preferred embodiments of the present invention will be described in more detail below. Although the preferred embodiments of the present invention are described below, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.

[0018] The present invention provides a method and device for automatic defect detection and analysis of X - ray films of weld seams. Among them, an automatic defect detection and analysis device for X - ray films of weld seams includes: an automatic film viewing device for transmission, a digital acquisition device, and an intelligent detection and evaluation device.

[0019] The automatic film viewing device can realize the transportation and lighting of X-ray films. The stepping motor is used as the power source, and the synchronous belt drive is adopted as the transmission mode to drive the polyurethane-coated wheels to rotate at a constant speed for film transportation. When the film reaches the specified film viewing area, the sensor sends a signal to the PLC controller to stop the film transportation and enhance the light intensity in the film viewing area. Meanwhile, the digital acquisition device uses an industrial camera for image recognition and acquisition, and the acquired data is transmitted to the PC side. The recognition and acquisition operation adopts the method of X-ray weld defect detection and size measurement based on neural network self-optimization to detect and analyze weld defects. After the above operations are completed, the server stores the data and results. The server system uses Ubuntu Server, and the database uses MySQL for storage. The client sends the key information of the X-ray film of the weld to the storage service for final storage for future query; the storage of X-ray films adopts the C / S mode (Client / Server), and the connection method uses the reliable connection of the TCP protocol to ensure the accuracy and integrity of X-ray film information. The user's client is the Client side, and the storage server is the Server side. After establishing a connection, the X-ray film with the recorded information is sent to the server, and the server completes the final recording. The client PC side uses Qt to design the graphical user interface (Graphical User Interface, abbreviated as GUI), and the networking part uses the Qtsocket standard library encapsulated by Qt.

[0020] Specifically, as Figures 1 - 7 shown, the digital acquisition device 200 includes an industrial camera and a support frame at the lower part; the industrial camera is aligned with the position of the X-ray film 8 in the automatic film viewing device 100 to facilitate photographing the position of the weld 9 in the X-ray film 8. Among them, the automatic film viewing device 100 includes a film storage and inspection module 2 arranged at the bottom, an acrylic plate 4 inclined in the middle for facilitating the photographing of the industrial camera, and a film storage box 3 arranged at the top.

[0021] The automatic film viewing device 100 includes a structural frame 1. The structural frame 1 is set as a right trapezoid, and two structural frames 1 are symmetrically arranged. The inner bottom is connected with a bottom plate 7. The upper inclined surfaces of the two structural frames 1 are connected with an acrylic plate 4. A film storage and inspection module 2 is arranged at the lower part of one end of the structural frame 1, a film storage box 3 is arranged at the upper part of the other end of the structural frame 1, and a film transmission system 6 is arranged on the structural frame 1. The film transmission system 6 slices and transports the X-ray film 8 from the film storage and inspection module 2 to the acrylic plate 4 for information acquisition by the digital acquisition device 200, and the acquired information is transmitted to the intelligent detection and evaluation device for analysis. After the acquisition is completed, the film transmission system 6 continues to transport the X-ray film 8 to the film storage box 3.

[0022] Among them, the intelligent detection and evaluation device includes a PC and a server. The automatic film viewing device 100 and the digital acquisition device 200 interact and transmit signals with the PC.

[0023] The film storage to-be-inspected module 2 includes a film pre-storage box 21. Linear guide rails 24 are arranged inside both sides of the film pre-storage box 21. A slider 25 is slidably arranged on the linear guide rails 24. A film support plate 23 is fixedly arranged on the top of the slider 25. A spring 26 is arranged between the bottom of the film support plate 23 and the film pre-storage box 21. X-ray films 8 are placed layer by layer on the upper part of the film support plate 23. The spring 26 pushes the X-ray films 8 upward by elastic force until they rub against the film-splitting rubber-coated friction wheel 604. A guiding ramp 22 is arranged on the upper part of the film pre-storage box 21. The slope direction of the guiding ramp 22 is the same as that of the acrylic plate 4, which is convenient for guiding the X-ray films 8 to be obliquely upward conveyed to the acrylic plate 4.

[0024] Specifically, side plates 5 are arranged on both sides of the upper part of the acrylic plate 4. The film conveying system 6 is installed on the bottom plate 7 and the side plates 5. Among them, a first motor 601 is fixedly arranged on the bottom plate 7. A film-splitting rotating shaft 602 is movably arranged on the side plate 5. Film-splitting synchronous belt wheels 603 are arranged on the same side of the first motor 601 and the film-splitting rotating shaft 602. The two film-splitting synchronous belt wheels 603 are connected by a synchronous belt. A film-splitting synchronous belt wheel 603 is fixedly arranged on the film-splitting rotating shaft 602. A film-splitting rubber-coated friction wheel 604 is fixedly arranged on the film-splitting rotating shaft 602. The film-splitting rubber-coated friction wheel 604 moves the X-ray films 8 in the film storage to-be-inspected module 2 to one side by friction force to split the films, and guides the X-ray films 8 to be obliquely upward conveyed to the acrylic plate 4.

[0025] An upper clamping conveying shaft 605 is movably arranged on the side plate 5 obliquely above the film-splitting rotating shaft 602. Upper clamping synchronous belt wheels 606 are arranged on the same side of the other side of the film-splitting rotating shaft 602 and the upper clamping conveying shaft 605. The two upper clamping synchronous belt wheels 606 are connected by a synchronous belt. An upper clamping conveying rubber-coated friction wheel 607 is fixedly arranged on the upper clamping conveying shaft 605; a second motor 611 is fixedly arranged on the bottom plate 7. A lower clamping conveying shaft 612 is symmetrically arranged obliquely below the acrylic plate 4 with respect to the upper clamping conveying shaft 605. Lower clamping synchronous belt wheels 613 are arranged on the same side of the second motor 611 and the lower clamping conveying shaft 612. A lower clamping conveying rubber-coated friction wheel 614 is correspondingly arranged at the position corresponding to the upper clamping conveying rubber-coated friction wheel 607 on the lower clamping conveying shaft 612. The gap between the upper clamping conveying rubber-coated friction wheel 607 and the lower clamping conveying rubber-coated friction wheel 614 is smaller than the thickness of the X-ray film 8; the upper clamping conveying rubber-coated friction wheel 607 and the lower clamping conveying rubber-coated friction wheel 614 clamp the X-ray film 8 and convey it obliquely upward. Specifically, a groove 41 is arranged at the position of the acrylic plate 4 where the upper clamping conveying rubber-coated friction wheel 607 and the lower clamping conveying rubber-coated friction wheel 614 are located, so as to facilitate the arrangement of the upper clamping conveying rubber-coated friction wheel 607 and the lower clamping conveying rubber-coated friction wheel 614.

[0026] The bottom plate 7 is fixedly provided with a third motor 621. The upper end of the side plate 5 is movably provided with an upper conveying positioning shaft 622. On the same side of the third motor 621 and the upper conveying positioning shaft 622, upper conveying synchronous belt pulleys 623 are arranged. The two upper conveying synchronous belt pulleys 623 are connected by a synchronous belt. An upper conveying positioning rubber-coated friction wheel 624 is fixedly arranged on the upper conveying positioning shaft 622. The upper conveying positioning shaft 622 is arranged obliquely below the acrylic plate 4 in parallel with a lower conveying positioning shaft 625. On the other side of the upper conveying positioning shaft 622 and the same side of the lower conveying positioning shaft 625, lower conveying synchronous belt pulleys 626 are arranged. The two lower conveying synchronous belt pulleys 626 are connected by a synchronous belt. A lower conveying positioning rubber-coated friction wheel 627 is fixedly arranged on the lower conveying positioning shaft 625. The gap between the upper conveying positioning rubber-coated friction wheel 624 and the lower conveying positioning rubber-coated friction wheel 627 and the acrylic plate 4 is smaller than the thickness of the X-ray film 8. When the upper conveying positioning rubber-coated friction wheel 624 fixes the upper part of the X-ray film 8 and the lower conveying positioning rubber-coated friction wheel 627 fixes the lower part of the X-ray film 8, the X-ray film 8 to be measured enters the shooting position of the industrial camera, and the weld 9 is photographed.

[0027] By operating the above device, the present application proposes an automatic defect detection and analysis method for weld X-ray films, including the following steps: S100: X-ray film transmission: The X-ray film is pre-stored in the film storage and waiting-to-be-inspected module. The polyurethane rubber-coated friction wheel slices the X-ray film. The sliced X-ray film is driven by subsequent multiple groups of polyurethane rubber-coated friction wheels to be conveyed to the specified light-emitting and acquisition position. When the X-ray film is in place, the PLC control stops the X-ray film transmission and enhances the light intensity of the viewing area. S200: X-ray film information acquisition: The industrial camera is aligned with the light-emitting and acquisition position of the X-ray film, acquires the digital image of the weld X-ray film that has been conveyed and is in place, and transmits it to the upper computer at the PC end. The PC timely controls the industrial camera to acquire the digital image of the film frame by frame through the OpenCV call of the UVC protocol according to the feedback information of the PLC. Each film is acquired at intervals set by the GUI frame by frame. S300: Recognition and operation: The YOLOv5 algorithm is used as the core algorithm for defect detection. During the welding process, the weld size is an important quality index to ensure the structural safety and reliability of the welded part. For this reason, the present application proposes a dimension measurement algorithm applicable to a fixed distance between the camera and the image to be inspected, realizing the integration of weld defect detection and dimension measurement.

[0028] S310: Extract the weld defect contour, including: S311: Perform object detection with the trained detection model. S312: Fit the contour features of the weld defect using the OpenCV contour recognition algorithm (this algorithm determines the boundary of the binary image based on topological analysis, which is conducive to extracting the edge contour); S313: Perform linear fitting on the pixel points of the extracted contour according to the principle of the minimum sum of squared deviations. The fitting result is represented by a polynomial equation, and the calculation formula is: (1) where represents the coordinate of the contour pixel point, and , is the fitted binomial function, is the square of the deviation of the fitted straight line on ; S314: Characterize its size information using the minimum bounding rectangle; S320: Obtain the pixel size; S321: Obtain the coordinates of the upper left pixel point and the lower right pixel point; S322: Calculate the distance between these two diagonal points; S323: Calculate the pixel width and pixel height of the weld defect; Since the shapes of weld defects are complex, diverse, and irregular, this method uses the minimum bounding rectangle to characterize the size information of the polygon defect contour obtained by fitting. In this way, regardless of the type and shape of the weld defect, there can be a unified measurement basis. Then, obtain the coordinates of the upper left pixel point (x 1 , y 1 ) and the lower right pixel point (x 2 , y 2 ) from this rectangular contour, and then calculate the distance between these two diagonal points through a specific formula to calculate the pixel width and pixel height of the weld defect. The specific formula is as follows: (2) (3) In the formula, pixel_width represents the pixel width of the weld defect, and pixel_height represents the pixel height of the weld defect.

[0029] S330: Introduce a conversion factor to convert the pixel size to the actual size.

[0030] Pixel_width and pixel_height can reflect the dimensions at the pixel level, but not the actual dimensions of the weld defects. Therefore, a conversion factor pixel_to_real is introduced in the text to establish the mapping relationship between the pixel size and the actual size, ensuring their consistency. To determine the value of this conversion factor, the actual size of the object and its pixel size in the image need to be known. The calculation formula is as follows: (4) In this formula, real_size represents the actual physical size of the weld defect, pixel_size is its pixel size in the image, and pixel_to_real is the conversion factor that establishes the connection between the two, that is, the mapping ratio from pixels to the actual size. When actually determining real_size and pixel_size, the height or width of the weld defect can be selected to obtain and calculate the relevant data.

[0031] At the same time, the distance from the X-ray film to be measured to the camera should be fixed so that the conversion factor can be correctly calibrated. A simple method is to place the X-ray film at a position with a known distance (such as 0.3m or 0.5m) from the camera, measure the actual size of the weld defect and its pixel size in the image, and then use formula (4) to calculate the conversion factor, thereby realizing the conversion from pixel size to actual size, and there are also corresponding specific conversion formulas.

[0032] (5) (6) In formulas (5) and (6), real_width and real_height correspond to the actual width and actual height of the weld defect respectively, pixel_width and pixel_height represent its pixel width and pixel height in the image respectively, and pixel_to_real is the conversion factor between pixels and the actual size.

[0033] Once the conversion factor is determined, it is a fixed value. Usually, it only needs to be calculated once and does not need to be recalculated every time the defect size is measured, but the premise is that the distance between the camera and the X-ray film to be inspected is fixed. If the position of the camera changes, the conversion factor needs to be recalculated and set.

[0034] S400: Information storage: After the digital images of the weld X-ray films, film numbers, and defect information are collected, they are uploaded to the server for storage. The server system uses Ubuntu Server, and the database uses MySQL for storage; the client sends the key information of the recorded weld X-ray films to the storage service for final storage for future query; the storage of X-ray films adopts the C / S mode (Client / Server), and the connection method uses the reliable connection of the TCP protocol to ensure the accuracy and integrity of the X-ray film information. The user's client is the Client side, and the storage server is the Server side. After establishing a connection, the X-ray film with the recorded information is sent to the server, and the server completes the final recording. The client PC uses Qt to design the graphical user interface (Graphical User Interface, abbreviated as GUI), and the networking part uses the Qtsocket standard library encapsulated by Qt for socket programming.

[0035] S500: Transfer the detected X-ray film to the film storage box, and repeat steps S100~S500 to transfer and detect the next X-ray film.

[0036] The above is only the preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution of the present invention, makes equivalent substitutions or changes, and should be covered by the protection scope of the present invention.

Claims

1. A method for automatic defect detection and analysis of weld X-ray films, characterized in that: The following steps are involved: S100: X-ray film transmission: X-ray films are pre-stored in the film storage module for inspection. The X-ray films are sliced ​​by polyurethane-coated friction wheels. The sliced ​​X-ray films are driven by subsequent sets of polyurethane-coated friction wheels to the designated lighting and collection position. When the X-ray films are in place, the PLC control stops the X-ray film transmission and enhances the light intensity in the viewing area. S200: X-ray film information collection: The industrial camera is aimed at the X-ray film lighting collection position, collects the digital image of the weld X-ray film that has been transferred in place, and transmits it to the PC host computer; the PC promptly calls the UVC protocol through OpenCV based on the feedback information of the PLC to control the industrial camera to collect the digital image of the film in units of video frames. Each film is collected at intervals in units of frames through the GUI; S300: Identification operation: YOLOv5 algorithm is used as the core algorithm for defect detection; S400: Information storage: After the digital image of the weld X-ray film, the film number and the defect information are collected, they are uploaded to the server for storage. The server system uses Ubuntu Server and the database uses MySQL for storage; S500: The X-ray film after detection is transferred to the film storage box, and steps S100 to S500 are repeated to transfer and detect the next X-ray film.

2. The method for automatic defect detection and analysis of weld X-ray films according to claim 1, characterized in that: Step S300 includes: S310: Extract weld defect contour; S320: Obtain pixel size; S330: Determine a mapping relationship between the pixel size and the actual size.

3. The method for automatic defect detection and analysis of weld X-ray films according to claim 2, characterized in that: Step S310 includes: S311: Use the trained detection model for target detection; S312: Fitting weld defect contour features using OpenCV contour recognition algorithm; S313: Perform straight line fitting on the extracted contour point pixels according to the principle of minimum sum of square deviations; the calculation formula is: in represents the coordinates of the contour pixels, and , is the fitted binomial function, For the fitting straight line The square of the deviation on ; S314: Using a minimum circumscribed rectangle to represent its size information; Step S320 includes: S321: Obtain the coordinates of the upper left corner pixel and the lower right corner pixel; S322: Calculate the distance between the two diagonal points; S323: Calculate the pixel width and pixel height of the weld defect; Step S330 includes: introducing a conversion factor to convert the pixel size into an actual size.

4. A weld X-ray film automatic defect detection and analysis device, which can implement a weld X-ray film automatic defect detection and analysis method as claimed in any one of claims 1 to 3, characterized in that: include: An automatic film transmission and viewing device (100), a digital acquisition device (200), and an intelligent detection and evaluation device; the automatic film transmission and viewing device (100) comprises a structure frame (1), the structure frame (1) is arranged in a right-angle trapezoid, two of the structure frames (1) are symmetrically arranged, a bottom plate (7) is arranged at the inner bottom for connection, an acrylic plate (4) is arranged at the upper inclined surface of the two structure frames (1) for connection, a film storage module for inspection (2) is arranged at the lower part of one end of the structure frame (1), a film storage box (3) is arranged at the upper part of the other end of the structure frame (1), and the structure frame (1) is provided with a film transmission system (6), and the film transmission system (6) transfers the X-ray film (8) from the film The storage module (2) is transmitted in pieces to the acrylic plate (4) for information collection through the digital collection device (200), and the collected information is transmitted to the intelligent detection and evaluation device for analysis. After the collection is completed, the film transmission system (6) continues to transmit the X-ray film (8) to the film storage box (3); a digital collection device (200) is provided on the obliquely upward side of the acrylic plate (4), and the digital collection device (200) includes an industrial camera and a lower support frame; the intelligent detection and evaluation device includes a PC terminal and a server, and the automatic transmission and viewing device (100) and the digital collection device (200) perform signal exchange transmission with the PC terminal.

5. The automatic defect detection and analysis device for weld X-ray films according to claim 4 is characterized in that: Side panels (5) are provided on both sides of the upper part of the acrylic plate (4); the bottom film conveying system (6) is installed on the bottom plate (7) and the side panels (5); specifically, the bottom plate (7) is fixedly provided with a first motor (601); the side panels (5) are movably provided with a slice rotating shaft (602); a slice synchronous pulley (603) is provided on the same side of the first motor (601) and the slice rotating shaft (602); the two slice synchronous pulleys (603) are connected by a synchronous belt; a slice synchronous pulley (603) is fixedly provided on the slice rotating shaft (602); a slice rubber-coated friction wheel (604) is fixedly provided on the slice rotating shaft (604); the slice rotating shaft (60 2) An upper clamp conveying shaft (605) is movably arranged through the side plate (5) at an oblique upper portion, an upper clamp synchronous belt pulley (606) is arranged on the other side of the slice rotating shaft (602) and the same side of the upper clamp conveying shaft (605), the two upper clamp synchronous belt pulleys (606) are connected by a synchronous belt, and an upper clamp conveying rubber-coated friction wheel (607) is fixedly arranged on the upper clamp conveying shaft (605); a second motor (611) is fixedly arranged on the bottom plate (7), a lower clamp conveying shaft (612) is symmetrically arranged at an oblique lower portion of the upper clamp conveying shaft (605) and symmetrically to the acrylic plate (4), and a lower clamp synchronous belt pulley is arranged on the same side of the second motor (611) and the lower clamp conveying shaft (612) (613), a lower clamping conveying rubber-coated friction wheel (614) is provided at a position corresponding to the position of the upper clamping conveying rubber-coated friction wheel (607), and a gap between the upper clamping conveying rubber-coated friction wheel (607) and the lower clamping conveying rubber-coated friction wheel (614) is smaller than the thickness of the X-ray film (8); a groove (41) is provided at the position of the upper clamping conveying rubber-coated friction wheel (607) and the lower clamping conveying rubber-coated friction wheel (614); a third motor (621) is fixedly provided on the bottom plate (7), and an upper conveying positioning shaft (622) is movably provided on the upper end of the side plate (5), and the third motor (621) and the upper conveying positioning shaft (62 2) are provided with an upper conveying synchronous belt pulley (623) on the same side, the two upper conveying synchronous belt pulleys (623) are connected by a synchronous belt, and an upper conveying positioning rubber-coated friction wheel (624) is fixedly provided on the upper conveying positioning shaft (622); a lower conveying positioning shaft (625) is provided obliquely below the upper conveying positioning shaft (622) parallel to the acrylic plate (4), and lower conveying synchronous belt pulleys (626) are provided on the other side of the upper conveying positioning shaft (622) and on the same side of the lower conveying positioning shaft (625), the two lower conveying synchronous belt pulleys (626) are connected by a synchronous belt, and a lower conveying positioning rubber-coated friction wheel (627) is fixedly provided on the lower conveying positioning shaft (625);The gap between the upper conveying positioning rubber-coated friction wheel (624) and the lower conveying positioning rubber-coated friction wheel (627) and the acrylic plate (4) is smaller than the thickness of the X-ray film (8).

6. The automatic defect detection and analysis device for weld X-ray films according to claim 4, characterized in that: The film storage module (2) comprises a film pre-storage box (21), linear guide rails (24) are arranged inside the two sides of the film pre-storage box (21), a slider (25) is slidably arranged on the linear guide rails (24), a film support plate (23) is fixedly arranged on the top of the slider (25), a spring (26) is arranged between the bottom of the film support plate (23) and the film pre-storage box (21), X-ray films (8) are placed layer by layer on the top of the film support plate (23), and a guide slope (22) is arranged on the top of the film pre-storage box (21), and the slope direction of the guide slope (22) is consistent with that of the acrylic plate (4).

Citation Information

Patent Citations

  • Scanning device for big data skeleton data acquisition

    CN109769075A

  • An X-ray film rapid scanning device

    CN109819135A

  • Stainless steel weld defect detection method based on multi-domain expression data enhancement and model self-optimization

    CN113129266A

  • Automatic digital acquisition and intelligent detection evaluation device for X-ray negative film of welding seam

    CN113155869A

  • X-ray weld defect intelligent evaluation method based on model self-optimization

    CN117557534A